[英]How to install bcmath in Ubuntu for PHP 7.1
I'm using an Ubuntu 16 server for testing with php7.1<\/code> .
我正在使用 Ubuntu 16 服务器进行测试
php7.1<\/code> 。
One of my app uses
bcadd<\/code> function.
我的一个应用程序使用
bcadd<\/code>功能。
I know that I need to install
bcmath<\/code> module for that but I'm unable to find
php7.1-bcmath<\/code> .
我知道我需要为此安装
bcmath<\/code>模块,但我找不到
php7.1-bcmath<\/code> 。
When I tried to install
apt install php-bcmath<\/code> , it simply installed
php7.0-bcmath<\/code> module.
当我尝试安装
apt install php-bcmath<\/code>时,它只是安装了
php7.0-bcmath<\/code>模块。
I was unable to find
php7.1-bcmath<\/code> module anywhere to install on my server.
我无法在我的服务器上安装的任何地方找到
php7.1-bcmath<\/code>模块。
Does anybody has an idea?有人有想法吗?
apt install php7.1-bcmath<\/code> returned following,
apt install php7.1-bcmath<\/code>返回以下内容,
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'
Answering my own question.回答我自己的问题。 Managed to fix this issue with following repo update.通过以下 repo 更新设法解决了这个问题。
add-apt-repository ppa:ondrej/php
apt update
apt install php7.1-bcmath
Restart apache and all good to go.重启 apache 一切顺利。
install this : https://packages.ubuntu.com/fr/artful/amd64/php7.1-bcmath/download安装这个: https : //packages.ubuntu.com/fr/artful/amd64/php7.1-bcmath/download
add this :添加这个:
deb http://security.ubuntu.com/ubuntu artful-security main universe
to /etc/apt/sources.list到 /etc/apt/sources.list
$ sudo apt update
$ sudo apt install php7.1-bcmath
Those who are looking for Ubuntu 20.04:正在寻找 Ubuntu 20.04 的人:
sudo apt install php-bcmath
It will automatically install the bcmath compatible with your version of PHP.它将自动安装与您的 PHP 版本兼容的 bcmath。
For Ubuntu 16.04: Add this ppa http:\/\/ppa.launchpad.net\/jczaplicki\/xenial-php74-temp\/ubuntu<\/a> Open synaptic, and then uninstall any bcmath module already installed.对于 Ubuntu 16.04:添加这个 ppa http:\/\/ppa.launchpad.net\/jczaplicki\/xenial-php74-temp\/ubuntu<\/a>打开 synaptic,然后卸载任何已经安装的 bcmath 模块。 Then reinstall php7.4 and php7.4-xxx modules然后重新安装php7.4和php7.4-xxx模块
"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.