每次我尝试安装 php-mysqli 扩展时,我都会收到类似 "E: Package 'php-mysqli' has no installation candidate" 的错误
Every time I'm trying to install the php-mysqli extension I'm getting error like "E: Package 'php-mysqli' has no installation candidate"
suvo@Suvodip-Lenovo ~ $ sudo apt install php-mysqli
[sudo] password for suvo:
Reading package lists... Done`enter code here`
Building dependency tree
Reading state information... Done
Package php-mysqli is a virtual package provided by:
php7.3-mysql 7.3.2-3+ubuntu16.04.1+deb.sury.org+1
php7.2-mysql 7.2.15-1+ubuntu16.04.1+deb.sury.org+1
php7.1-mysql 7.1.26-1+ubuntu16.04.1+deb.sury.org+1
php5.6-mysql 5.6.40-1+ubuntu16.04.1+deb.sury.org+1
php7.0-mysql 7.0.33-1+ubuntu16.04.1+deb.sury.org+1
You should explicitly select one to install.
E: Package `php-mysqli` has no installation candidate
了解错误信息
Package php-mysqli is a virtual package provided by:
[...]
apt
包管理使用虚拟包来实现依赖关系。虚拟包本身没有任何内容。不能直接安装。它的意思是指示安装了预期的软件,以向其他软件包发出信号,表明它们的依赖关系已解决。
apt
告诉您安装虚拟包的真实包列表。只需安装最新的(或者,如果您已经安装了另一个 PHP 版本,匹配的版本):
sudo apt install php7.3-mysql
suvo@Suvodip-Lenovo ~ $ sudo apt install php-mysqli
[sudo] password for suvo:
Reading package lists... Done`enter code here`
Building dependency tree
Reading state information... Done
Package php-mysqli is a virtual package provided by:
php7.3-mysql 7.3.2-3+ubuntu16.04.1+deb.sury.org+1
php7.2-mysql 7.2.15-1+ubuntu16.04.1+deb.sury.org+1
php7.1-mysql 7.1.26-1+ubuntu16.04.1+deb.sury.org+1
php5.6-mysql 5.6.40-1+ubuntu16.04.1+deb.sury.org+1
php7.0-mysql 7.0.33-1+ubuntu16.04.1+deb.sury.org+1
You should explicitly select one to install.
E: Package `php-mysqli` has no installation candidate
了解错误信息
Package php-mysqli is a virtual package provided by:
[...]
apt
包管理使用虚拟包来实现依赖关系。虚拟包本身没有任何内容。不能直接安装。它的意思是指示安装了预期的软件,以向其他软件包发出信号,表明它们的依赖关系已解决。
apt
告诉您安装虚拟包的真实包列表。只需安装最新的(或者,如果您已经安装了另一个 PHP 版本,匹配的版本):
sudo apt install php7.3-mysql