无法在ubuntu 16.04上安装php7.1-bcmath

时间:2018-03-14 15:28:47

标签: php symfony ubuntu-16.04 symfony4

当我运行以下命令时:composer require sonata-project/notification-bundle我有这个错误:

- php-amqplib/php-amqplib v2.7.2 requires ext-bcmath * -> the requested PHP extension bcmath is missing from your system.
    - php-amqplib/php-amqplib v2.7.1 requires ext-bcmath * -> the requested PHP extension bcmath is missing from your system.
    - php-amqplib/php-amqplib v2.7.0 requires ext-bcmath * -> the requested PHP extension bcmath is missing from your system.
    - sonata-project/notification-bundle 3.4.0 requires enqueue/amqp-lib ^0.8 -> satisfiable by enqueue/amqp-lib[0.8.0, 0.8.10, 0.8.11, 0.8.12, 0.8.13, 0.8.15, 0.8.2, 0.8.21, 0.8.23, 0.8.4, 0.8.5, 0.8.9].

显然bcmath不见了,所以我运行了这个:

sudo apt-get install php7.1-bcmath

我收到以下错误:

E: Unable to locate package php7.1-bcmath
E: Couldn't find any package by glob 'php7.1-bcmath'
E: Couldn't find any package by regex 'php7.1-bcmath'

知道是什么导致了这个问题吗?

Symfony 4 PHP 7.1 Ubuntu 16.04

1 个答案:

答案 0 :(得分:0)

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt install php7.1-bcmath