我使用Ubuntu 16服务器进行php7.1
测试。我的一个应用使用bcadd
功能。我知道我需要为此安装bcmath
模块,但我无法找到php7.1-bcmath
。当我尝试安装apt install php-bcmath
时,它只是安装了php7.0-bcmath
模块。
我无法在我的服务器上找到php7.1-bcmath
模块。有人有想法吗?
apt 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'
答案 0 :(得分:22)
回答我自己的问题。通过以下repo更新来管理解决此问题。
add-apt-repository ppa:ondrej/php
apt update
apt install php7.1-bcmath
重启apache,一切顺利。
答案 1 :(得分:5)
安装此: https://packages.ubuntu.com/fr/artful/amd64/php7.1-bcmath/download
添加:
deb http://security.ubuntu.com/ubuntu artful-security main universe
到/etc/apt/sources.list
$ sudo apt update
$ sudo apt install php7.1-bcmath
答案 2 :(得分:2)
那些正在寻找 Ubuntu 20.04 的人:
sudo apt install php-bcmath