You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This script uses the standard php shebang, #!/usr/bin/php, but macOS Monterey removes PHP, taking /usr/bin/php with it. This causes bcrypt-hash to fail with the error:
/usr/local/bin/bcrypt-hash: bad interpreter: /usr/bin/php: no such file or directory
I've tried working around it by installing php via brew (brew install php) but this puts it at /usr/local/bin/php so doesn't resolve the error. Further, Apple's system integrity protection prevents changes to the /usr/bin dir so I can't easily fix this with a symlink. Eg. ln -s /usr/local/bin/php /usr/bin/php returns the error:
ln: /usr/bin/php: Operation not permitted
SIP can be turned off but it's generally not recommended.
By manually editing /usr/local/bin/bcrypt-hash and updating the shebang to the correct path (ie. #!/usr/local/bin/php) I have been able to get the script to run. However the php version installed by brew is currently 8.1.3, miles ahead of the version that came previously with macOS (7.3.24 I think?), resulting in a bunch of depreciation warnings:
Deprecated: preg_split(): Passing null to parameter #3 ($limit) of type int is deprecated
Deprecated: Return type of Docopt\Response::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable
Deprecated: Return type of Docopt\Response::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool
Deprecated: Return type of Docopt\Response::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed
Deprecated: Return type of Docopt\Response::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void
Deprecated: Return type of Docopt\Response::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void
The text was updated successfully, but these errors were encountered:
This script uses the standard php shebang,
#!/usr/bin/php
, but macOS Monterey removes PHP, taking/usr/bin/php
with it. This causesbcrypt-hash
to fail with the error:I've tried working around it by installing php via brew (
brew install php
) but this puts it at/usr/local/bin/php
so doesn't resolve the error. Further, Apple's system integrity protection prevents changes to the/usr/bin
dir so I can't easily fix this with a symlink. Eg.ln -s /usr/local/bin/php /usr/bin/php
returns the error:SIP can be turned off but it's generally not recommended.
By manually editing
/usr/local/bin/bcrypt-hash
and updating the shebang to the correct path (ie.#!/usr/local/bin/php
) I have been able to get the script to run. However the php version installed by brew is currently8.1.3
, miles ahead of the version that came previously with macOS (7.3.24
I think?), resulting in a bunch of depreciation warnings:The text was updated successfully, but these errors were encountered: