[英]Unable to install PHP packages with apt-get, gives "E: Unable to locate package"
[英]E: Unable to locate package php7.2-bcmath
我正在尝试在 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 ....
语法一起使用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.