我在我的 Mac OSX High Sierra
上安装了 ruby,但出于某种原因现在我的 php 安装遇到了问题。我正在使用 php 7.1
。
正在关注 this (也是here)Github建议,我试过了
brew 更新 && brew 重新安装 php71
安装的时候坏了
==> Pouring php@7.1-7.1.23.high_sierra.bottle.tar.gz
==> /usr/local/Cellar/php@7.1/7.1.23/bin/pear config-set php_ini /usr/local/etc/php/7.1/php.ini system
错误:
dyld: Library not loaded: /usr/local/opt/openldap/lib/libldap-2.4.2.dylib
Referenced from: /usr/local/Cellar/php@7.1/7.1.23/bin/php
Reason: image not found
Warning: The post-install step did not complete successfully
You can try again using `brew postinstall php@7.1`
在终端中输入 php
会引发相同的错误。
我尝试过的其他事情:
- 我想也许它没有链接,所以我也尝试了:
brew unlink libldap && brew link libldap
- 但是 Homebrew 不支持libldap
- 然后here ,虽然与 postgres 无关,但它确实讨论了
libldap
的问题并说要通过brew install openldap
安装(我猜libldap
被称为openldap
到 Homebrew)- 安装正常但没有解决问题
我该如何解决这个问题?
最佳答案
根据 this issue ,你需要安装openldap
和libiconv
。
brew install openldap libiconv
我试过了,它适用于我的系统。我最初缺少 PHP intl
扩展。
关于php dyld : Library not loaded for libldap,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52795110/