今天我升级了 Homebrew,这导致 PHP 版本(7.2 - 7.3)被删除。每当我尝试重新安装它们时,都会显示以下错误:
dyld: Library not loaded: /usr/local/opt/libpsl/lib/libpsl.5.dylib
Referenced from: /usr/local/opt/curl-openssl/bin/curl
Reason: image not found
Error: An exception occurred within a child process:
DownloadError: Failed to download resource "php"
Download failed: https://www.php.net/distributions/php-7.3.9.tar.xz
有什么建议吗?
好吧,我已经通过安装这个库解决了这个问题
brew install libpsl
然后重新安装 php
brew reinstall [email protected] --build-from-source
对于 [email protected] 也一样
请注意,重新安装 php 将重置所有 php 配置
这是
php
迁移到OpenSSH 1.1后的一个错误。无需安装libpsl
。
该问题已由 pr-44048 修复。您应该卸载
libpsl
并重新安装 php
。
brew uninstall libpsl
brew reinstall php
删除 Cellar 文件夹并再次安装 PHP 对我有用。
rm -rf /Users/rafaelgomes/.composer/*
rm -rf /usr/local/Cellar/*
brew doctor ; brew update ; brew upgrade
brew install php
我找到了对此的各种答案,但基本上,但基本上我破坏了我的地窖目录的权限,所以我不得不重新安装所有内容。
这是我的错误,它是在我安装 nmap 后发生的:
dyld[32102]: Library not loaded: /opt/homebrew/opt/libtiff/lib/libtiff.5.dylib
Referenced from: <SOME-0E3C-3E56-AEC8-LONG-ID> /opt/homebrew/Cellar/gd/2.3.3_4/lib/libgd.3.dylib
Reason: tried: '/opt/homebrew/opt/libtiff/lib/libtiff.5.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/libtiff/lib/libtiff.5.dylib' (no such file),
'/opt/homebrew/opt/libtiff/lib/libtiff.5.dylib' (no such file),
'/usr/local/lib/libtiff.5.dylib' (no such file),
'/usr/lib/libtiff.5.dylib' (no such file, not in dyld cache),
'/opt/homebrew/Cellar/libtiff/4.5.1/lib/libtiff.5.dylib' (no such file),
'/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/libtiff/4.5.1/lib/libtiff.5.dylib' (no such file),
'/opt/homebrew/Cellar/libtiff/4.5.1/lib/libtiff.5.dylib' (no such file), '/usr/local/lib/libtiff.5.dylib' (no such file), '/usr/lib/libtiff.5.dylib' (no such file, not in dyld cache)
每次我使用 php 时都会发生此错误。甚至
php -v
!
但在执行任何操作之前,请尝试
brew update
和 brew upgrade
在您开始删除所有 php 版本并重新安装之前,这可能会将其消灭在萌芽状态。但这些是我为修复此错误而采取的步骤。
rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
brew search php
查看 php 版本旁边是否还有剩余的 [email protected] ✔
检查标记,删除带有 brew uninstall [email protected]
brew uninstall brew-php-switcher
(如果你使用的话)brew install [email protected]
brew-php-swticher 8.2
我喜欢这个工具! (或者将8.2替换为您需要的版本,只需使用7.4或8.0等)我在 Cellar 中遇到了一个错误的符号链接,并重新安装了与 php 相关的所有内容来修复它。
我通过执行以下操作解决了这个问题
brew uninstall libpsl
brew remove php
brew install libpsl
brew install [email protected]