首頁  >  文章  >  開發工具  >  composer install報錯怎麼辦

composer install報錯怎麼辦

爱喝马黛茶的安东尼
爱喝马黛茶的安东尼原創
2019-08-15 09:15:513538瀏覽

composer install報錯怎麼辦

錯誤程式碼如下:

相關推薦:《composer教學

[root@localhost MarketingCenter]# composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.
 
  Problem 1
    - Installation request for php-amqplib/php-amqplib v2.7.0 -> satisfiable by php-amqplib/php-amqplib[v2.7.0].
    - php-amqplib/php-amqplib v2.7.0 requires ext-bcmath * -> the requested PHP extension bcmath is missing from 
    your system.
  Problem 2
    - php-amqplib/php-amqplib v2.7.0 requires ext-bcmath * -> the requested PHP extension bcmath is missing from 
    your system.
    - php-amqplib/thumper v0.5.0 requires php-amqplib/php-amqplib ^2.6 -> satisfiable by php-amqplib/php-amqplib
    [v2.7.0].
    - Installation request for php-amqplib/thumper v0.5.0 -> satisfiable by php-amqplib/thumper[v0.5.0].
 
  To enable extensions, verify that they are enabled in your .ini files:
    - /etc/php.ini
    - /etc/php.d/curl.ini
    - /etc/php.d/fileinfo.ini
    - /etc/php.d/json.ini
    - /etc/php.d/phar.ini
    - /etc/php.d/zip.ini
  You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

由此可見,要給php 增加擴充 ext-bcmath。

1、進入以下目錄  

cd /usr/local/php/lib

2、然後執行如下程式碼

yum install php-bcmath

即可安裝成功,由上圖問題還需要繼續安裝 mbstring。

yum install php-mbstring

回車即可安裝成功,

最後解決了問題,再繼續 composer install,好了操作完成!

以上是composer install報錯怎麼辦的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn