我正在尝试在 Ubuntu 14.4 上安装软件包 php7.2-bcmath
sudo apt-get install php7.2-bcmath
但我不断收到此错误:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php7.2-bcmath
E: Couldn't find any package by regex 'php7.2-bcmath'
我已经尝试了这些选项:
sudo apt-add-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.2-bcmath
将此添加到/etc/apt/sources.list:
deb http://security.ubuntu.com/ubuntu artful-security main universe
什么都没用!
请帮忙
您应该检查哪个 PHP 版本可用,以及是否解决了正确的软件包名称。
用:
apt-cache search php
以检查 PHP7.2 和所有扩展是否在您的环境中可用。
通过搜索所有可用包来确定 bcmath 包的正确包名称:
apt-cache search php | grep bcmath
如果看到 php7.2 的 bcmath 包,请将此名称与sudo apt-get install ....
语法一起使用。