在OS X w/Composer上安装CakePHP失败,lib icu^62.1安装了错误的版本
我正试图通过OSX上的composer向我的CakePHP应用程序添加一个包在OS X w/Composer上安装CakePHP失败,lib icu^62.1安装了错误的版本,php,cakephp,cakephp-3.x,Php,Cakephp,Cakephp 3.x,我正试图通过OSX上的composer向我的CakePHP应用程序添加一个包 └──╼ composer require nbobtc/bitcoind-php Using version ^2.1 for nbobtc/bitcoind-php ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including requi
└──╼ composer require nbobtc/bitcoind-php
Using version ^2.1 for nbobtc/bitcoind-php
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested linked library lib-icu ^62.1 has the wrong version installed, try upgrading the intl extension.
我已经用brew安装了PHP7.3php@7.3
并与brew链接链接php@7.3--强制力
└──╼ php --version
PHP 7.3.9 (cli) (built: Sep 8 2019 14:56:33) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.9, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.9, Copyright (c) 1999-2018, by Zend Technologies
我已经安装了intl扩展
└──╼ php -m | grep intl
intl
我已经安装了icu4c库
└──╼ brew install icu4c
Warning: icu4c 64.2 is already installed and up-to-date
我还链接了icu4c库
└──╼ brew link icu4c --force
如何升级intl软件包?我在intl、icu、composer和cake方面也遇到过类似的问题。这并不简单,但我想我可以帮你提供一些信息 首先,我认为您使用了composer ponting的原生php,而不是与homebrew一起安装的php,因为您仍然得到了这个错误的icu版本 其次,我想使用macOS Mojave附带的原生php和apache。除了官方的php网站告知intl,由于PHP5.3.0,它与php捆绑在一起 但是,在Mac OS Mojave上的PHP7.1.24的本机安装中缺少了它 然后我从PHP.net下载了php7.1,安装了XCode命令行工具、ICU()、Autoconf,重新安装了开发人员工具头文件,最后使用phpize安装了Intl扩展
重要提示:您必须禁用SIP。如果对您有效,请告诉我,好吗?非常感谢您的回复,什么是SIP以及如何禁用它?另外,我如何将composer指向PHP的自制安装。。。我使用apache的虚拟机,所以我不需要使用本机php….Sip:关于composer和php,您需要知道您使用的是哪种php,在终端上尝试哪种php或php在哪里,然后我想您会看到问题的原因,因为brew说您有icu4c 64.2,但composer没有看到这个icu。对我的英语很抱歉