简体   繁体   中英

Unable to install php7.1-bcmath on ubuntu 16.04

When I run the following command : composer require sonata-project/notification-bundle I have this error:

- 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].

Apparently bcmath is missing so I have run this:

sudo apt-get install php7.1-bcmath

And I get the error below:

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'

Any idea what causing the problem ?

Symfony 4 php 7.1 Ubuntu 16.04

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM