brew install php56 后库未加载错误
Library not loaded error after brew install php56
我正在使用自制软件在 OSX Mavericks 上从 php5.5 升级到 php5.6。我运行
brew install php56
一切 运行s 并完成正常但是当我 运行 php -v
出现以下错误
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.53.dylib
Referenced from: /usr/local/bin/php
Reason: image not found
Trace/BPT trap: 5
我该如何解决这个问题?
就我而言,这是之前安装的符号链接问题。 运行
后一切正常
brew link --overwrite php56
P.S. 在 运行 --overwrite
之前,尝试不使用。如果你像我一样得到下面的错误,那就继续吧。
Linking /usr/local/Cellar/php56/5.6.3...
Error: Could not symlink bin/pear
Target /usr/local/bin/pear
is a symlink belonging to php55. You can unlink it:
brew unlink php55
To force the link and overwrite all conflicting files:
brew link --overwrite php56
To list all files that would be deleted:
brew link --overwrite --dry-run php56
之前的解决方案无效:
$ php -i
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.55.dylib
Referenced from: /usr/local/bin/php
Reason: image not found
Trace/BPT trap: 5
解决方法:
$ brew update && brew upgrade icu4c
为了解决这个问题(Mavericks 10.9.5)需要整个例程描述in this GitHub issue,即:
brew uninstall --force php56
brew update
brew tap --repair
find $(brew --cache) -mindepth 1 -print -delete
brew install -v php56
(在我的情况下,我还需要 brew install php56-mcrypt
,因为它丢失了。)
我之前安装了 PHP 5.4 和 5.6,其中 5.4 是活动的 ("linked") - 我想切换。我已经安装了 php-switcher
包,这是让您执行此操作的一种非常巧妙的方式,但在上述过程之前它不起作用。
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.53.dylib
听起来像是 icu4c
的问题。所以尝试:
brew uninstall icu4c && brew install icu4c
brew unlink icu4c && brew link icu4c --force
如有其他问题,请 brew doctor
进行调查。
试试这个
brew uninstall --ignore-dependencies node icu4c
brew install node
对我来说,升级 php 很有帮助。
brew upgrade php
对应的文件 dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.<version>.dylib
不存在,但存在更新的文件。所以我的 php 版本与其他可能在升级时升级 icu4c 的家属相比有点落后。 (节点还是 postgresql?)
brew uninstall --ignore-dependencies node icu4c
brew install node
对我有用。
我正在使用自制软件在 OSX Mavericks 上从 php5.5 升级到 php5.6。我运行
brew install php56
一切 运行s 并完成正常但是当我 运行 php -v
出现以下错误
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.53.dylib
Referenced from: /usr/local/bin/php
Reason: image not found
Trace/BPT trap: 5
我该如何解决这个问题?
就我而言,这是之前安装的符号链接问题。 运行
后一切正常brew link --overwrite php56
P.S. 在 运行 --overwrite
之前,尝试不使用。如果你像我一样得到下面的错误,那就继续吧。
Linking /usr/local/Cellar/php56/5.6.3...
Error: Could not symlink bin/pear
Target /usr/local/bin/pear
is a symlink belonging to php55. You can unlink it:
brew unlink php55
To force the link and overwrite all conflicting files:
brew link --overwrite php56
To list all files that would be deleted:
brew link --overwrite --dry-run php56
之前的解决方案无效:
$ php -i
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.55.dylib
Referenced from: /usr/local/bin/php
Reason: image not found
Trace/BPT trap: 5
解决方法:
$ brew update && brew upgrade icu4c
为了解决这个问题(Mavericks 10.9.5)需要整个例程描述in this GitHub issue,即:
brew uninstall --force php56
brew update
brew tap --repair
find $(brew --cache) -mindepth 1 -print -delete
brew install -v php56
(在我的情况下,我还需要 brew install php56-mcrypt
,因为它丢失了。)
我之前安装了 PHP 5.4 和 5.6,其中 5.4 是活动的 ("linked") - 我想切换。我已经安装了 php-switcher
包,这是让您执行此操作的一种非常巧妙的方式,但在上述过程之前它不起作用。
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.53.dylib
听起来像是 icu4c
的问题。所以尝试:
brew uninstall icu4c && brew install icu4c
brew unlink icu4c && brew link icu4c --force
如有其他问题,请 brew doctor
进行调查。
试试这个
brew uninstall --ignore-dependencies node icu4c
brew install node
对我来说,升级 php 很有帮助。
brew upgrade php
对应的文件 dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.<version>.dylib
不存在,但存在更新的文件。所以我的 php 版本与其他可能在升级时升级 icu4c 的家属相比有点落后。 (节点还是 postgresql?)
brew uninstall --ignore-dependencies node icu4c
brew install node
对我有用。