A problem with php in the terminal
Hi, when I try to use php in the terminal I get an error. At the same time, there is no such error in the standard terminal. Reinstalling phpstorm doesn't help me. Deleting the .idea folder helps, but after restarting the laptop, the error returns againdyld[3588]: Library not loaded: /opt/homebrew/opt/libsodium/lib/libsodium.23.dylib
Referenced from: <6B625A93-879D-3F26-8598-A8F64800FD85> /opt/homebrew/Cellar/php/8.2.12/bin/php
Reason: tried: '/opt/homebrew/opt/libsodium/lib/libsodium.23.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/libsodium/lib/libsodium.23.dylib' (no such file), '/opt/homebrew/opt/libsodium/lib/libsodium.23.dylib' (no such file), '/usr/local/lib/libsodium.23.dylib' (no such file), '/usr/lib/libsodium.23.dylib' (no such file, not in dyld cache), '/opt/homebrew/Cellar/libsodium/1.0.19/lib/libsodium.23.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/libsodium/1.0.19/lib/libsodium.23.dylib' (no such file), '/opt/homebrew/Cellar/libsodium/1.0.19/lib/libsodium.23.dylib' (no such file), '/usr/local/lib/libsodium.23.dylib' (no such file), '/usr/lib/libsodium.23.dylib' (no such file, not in dyld cache)
[1] 3588 abort php -v
Please sign in to leave a comment.
Please check if disabling Settings | Tools | Terminal | Add default project PHP interpreter to $PATH and opening a new terminal tab helps.
Eugene Morozov, thanks, that helped
Eugene Morozov can you help
i did “Please check if disabling Settings | Tools | Terminal | Add default project PHP interpreter to $PATH and opening a new terminal tab helps.”
php -v
dyld: Library not loaded: @loader_path/../../../../opt/libsodium/lib/libsodium.23.dylib
Referenced from: /usr/local/opt/php@8.1/bin/php
Reason: image not found
zsh: abort php -v
Does it work if you invoke the same `php -v` from the OS terminal zsh?
i did “Please check if disabling Settings | Tools | Terminal | Add default project PHP interpreter to $PATH and opening a new terminal tab helps.”
This receipt helped me with
php -v
dyld[2123]: Library not loaded: /usr/local/opt/icu4c/lib/libicuio.73.dylib
Referenced from: <83730C58-7BC6-3090-87B8-7BC8C762F290> /usr/local/Cellar/php@8.2/8.2.14/bin/php
Reason: tried: '/usr/local/opt/icu4c/lib/libicuio.73.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/icu4c/lib/libicuio.73.dylib' (no such file), '/usr/local/opt/icu4c/lib/libicuio.73.dylib' (no such file), '/usr/local/lib/libicuio.73.dylib' (no such file), '/usr/lib/libicuio.73.dylib' (no such file, not in dyld cache), '/usr/local/Cellar/icu4c/74.2/lib/libicuio.73.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/Cellar/icu4c/74.2/lib/libicuio.73.dylib' (no such file), '/usr/local/Cellar/icu4c/74.2/lib/libicuio.73.dylib' (no such file), '/usr/local/lib/libicuio.73.dylib' (no such file), '/usr/lib/libicuio.73.dylib' (no such file, not in dyld cache)
zsh: abort
Before trying it I failed with next actions:
reinstalling and relinking php, icu4c and nodejs, revalidating caches, updating phpstorm to the latest version.