我正在尝试从 PHP 5.5 升级到 PHP 5.6。curl
然后我在安装时收到以下错误:
Executing post-install script /tmp/5.6-10.10-frontenddev-post-install
dyld: Library not loaded: /opt/local/lib/libiconv.2.dylib
Referenced from: /opt/local/bin/grep
Reason: Incompatible library version: grep requires version 8.0.0 or later, but libiconv.2.dylib provides version 7.0.0
Restarting Apache
我有:
- 没有为 dylib 设置环境变量
otool -L /opt/local/lib/libiconv.2.dylib
返回:/opt/local/lib/libiconv.2.dylib (compatibility version 8.0.0, current version 8.1.0)
port installed
返回libiconv @1.14_0 (active)
,最新版本。
看起来像:
otool -DL /usr/lib/libiconv.2.dylib
返回:
/usr/lib/libiconv.2.dylib:
/usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)
因此系统版本正在通过 PHP 安装访问。如何使它指向本地 lib 版本?
暂时试试sudo port -n upgrade --force libiconv
。。