composer install 出现的问题

时间:2019-09-16
本文章向大家介绍composer install 出现的问题,主要包括composer install 出现的问题使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

今天克隆代码之后,在composer install 的时候出现了一些问题,在此记录一下。

错误代码如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
[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、进入如下目录  

1
cd /usr/local/php/lib

  2、然后执行如下代码

1
yum install php-bcmath

  即可安装成功,

  由上图问题还需要继续安装mbstring

1
yum install php-mbstring

  回车即可安装成功,

  最后解决了问题,在继续composer install,好了操作完成!

如果使用的是 ubuntu

使用 如下命令

sudo apt-get install php-bcmath

原文地址:https://www.cnblogs.com/Json159/p/11527049.html