今天克隆代碼以後,在composer install 的時候出現了一些問題,在此記錄一下。php
錯誤代碼以下:json
[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-bcmathbash
一、進入以下目錄 composer
cd /usr/local/php/lib
二、而後執行以下代碼curl
yum install php-bcmath
便可安裝成功,ide
由上圖問題還須要繼續安裝mbstringui
yum install php-mbstring
回車便可安裝成功,url
最後解決了問題,在繼續composer install,好了操做完成!code