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 again

dyld[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

0

Please check if disabling Settings | Tools | Terminal | Add default project PHP interpreter to $PATH and opening a new terminal tab helps.

5

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

0

Does it work if you invoke the same `php -v` from the OS terminal zsh?

0

请先登录再写评论。