当我尝试使用terminal命令更新软件包时:php composer.phar update
我有此错误消息
您的要求无法解析为可安装的软件包。
问题1
- sensio/distribution-bundle v4.0.0 requires sensiolabs/security-checker ~2.0 -> satisfiable by sensiolabs/security-checker[v2.0.5, v2.0.0, v2.0.1, v2.0.2, v2.0.3, v2.0.4].
- sensio/distribution-bundle v4.0.0 requires sensiolabs/security-checker ~2.0 -> satisfiable by sensiolabs/security-checker[v2.0.5, v2.0.0, v2.0.1, v2.0.2, v2.0.3, v2.0.4].
- sensiolabs/security-checker v2.0.5 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- sensiolabs/security-checker v2.0.4 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- sensiolabs/security-checker v2.0.3 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- sensiolabs/security-checker v2.0.2 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- sensiolabs/security-checker v2.0.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- sensiolabs/security-checker v2.0.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- sensiolabs/security-checker v2.0.5 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- Installation request for sensio/distribution-bundle ~4.0 -> satisfiable by sensio/distribution-bundle[v4.0.0]."
答案 0 :(得分:2)
从消息中可以看出:您需要为PHP安装ext-curl
扩展名。
要在Ubuntu中安装它,您需要运行下一个命令:
sudo apt-get install php5-curl
不要忘记在它之后重启apache(或fpm):
sudo service apache2 restart
或fpm:
sudo service php5-fpm restart
答案 1 :(得分:1)
错误消息告诉您sensio / distribution-bundle v4需要sensiolabs / security-checker v2.0.x,而后者又需要PHP curl扩展,但未安装。因此,作曲家不能(目前)满足你的composer.json中指定的要求。在基本级别,您需要安装curl扩展名。
为什么在你的情况下发生这种情况很难确定而没有更多细节: