Fin*_*inn 3 php macos homebrew openssl
我知道还有许多其他与此错误相关的问题,但我已经尝试了所有答案,但没有任何效果。
完全错误
dyld: Library not loaded: /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib
Referenced from: /usr/local/opt/php@7.1/bin/php
Reason: image not found
Abort trap: 6
Run Code Online (Sandbox Code Playgroud)
错误何时发生?
在通过 RVM 将 Ruby 更新到 2.6.3 之后。
每当我在终端中输入“php”时,就会出现错误。
采取的步骤
版本
Mac OS Mojave 10.14.6
PHP 7.4
运行 Brew Doctor 时
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!
Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and which additional flags to use when
compiling and linking.
Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew-provided
script of the same name. We found the following "config" scripts:
/opt/local/bin/python2.7-config
/opt/local/bin/curl-config
/opt/local/bin/ncursesw6-config
/opt/local/bin/pcre-config
/opt/local/bin/ncurses6-config
/opt/local/bin/pcap-config
Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected header files:
(here it posts all the /usr/local/include/node files, but the list exceeds character limitations)
Run Code Online (Sandbox Code Playgroud)
有关如何解决此错误的任何想法?
小智 14
就我而言,错误是
\n\xe2\x9d\xaf php -v\ndyld[24982]: Library not loaded: /opt/homebrew/opt/libavif/lib/libavif.15.dylib\n Referenced from: <87C1A268-34E4-396F-8BBC-D5591064E333> /opt/homebrew/Cellar/gd/2.3.3_5/lib/libgd.3.dylib\n Reason: tried: '/opt/homebrew/opt/libavif/lib/libavif.15.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/libavif/lib/libavif.15.dylib' (no such file), '/opt/homebrew/opt/libavif/lib/libavif.15.dylib' (no such file), '/usr/local/lib/libavif.15.dylib' (no such file), '/usr/lib/libavif.15.dylib' (no such file, not in dyld cache), '/opt/homebrew/Cellar/libavif/1.0.1/lib/libavif.15.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/libavif/1.0.1/lib/libavif.15.dylib' (no such file), '/opt/homebrew/Cellar/libavif/1.0.1/lib/libavif.15.dylib' (no such file), '/usr/local/lib/libavif.15.dylib' (no such file), '/usr/lib/libavif.15.dylib' (no such file, not in dyld cache)\nRun Code Online (Sandbox Code Playgroud)\n卸载 PHP 还不够,还需要删除 gd 和 libavif。
\n脚步:
\nbrew uninstall php\nrm -rf /opt/homebrew/etc/php\nbrew uninstall gd\nbrew uninstall libavif\nbrew install php\nRun Code Online (Sandbox Code Playgroud)\n最后,此时错误消失了
\n\xe2\x9d\xaf php -v\nPHP 8.2.10 (cli) (built: Aug 31 2023 18:52:55) (NTS)\nRun Code Online (Sandbox Code Playgroud)\n
我会为可能遇到类似问题的其他人回答我自己的问题
卸载并重新安装每一桶啤酒后,我找到了以下解决方案:
结论
就我而言,我认为这只是 PHP 7.1 已经安装,我通过 brew 安装了第二个版本 (7.4)。
错误 'Referenced from: /usr/local/opt/php@7.1/bin/php' 显然是在此文件夹中搜索某些内容,删除它后,错误停止了。
我有类似的问题,我是这样解决的:
brew reinstall php
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4289 次 |
| 最近记录: |