我安装了 bitnami mac 堆栈,主要是因为我的项目至少需要 PHP 5.4.7 版本。但是,我在使用 Composer 时遇到了问题。这是我运行时收到的错误:
php composer.phar install --dev
错误:
Richard-Knops-MacBook-Pro:my-project richardknop$ php composer.phar install --dev
dyld: Library not loaded: /Applications/MAMP/Library/lib/libiconv.2.dylib
Referenced from: /opt/local/bin/php
Reason: Incompatible library version: php requires version 8.0.0 or later, but libiconv.2.dylib provides version 7.0.0
Trace/BPT trap
Richard-Knops-MacBook-Pro:my-project richardknop$
如何解决?
答案1
正如消息清楚表明的那样,您需要升级libiconv
到 8.x。http://www.gnu.org/software/libiconv/