简体   繁体   中英

APT says 'package has no installation candidate' althought it shows it in apt list

I am trying to install ZeroMQ extension for PHP using Docker image php:7.4-apache-buster .

The package is found when running apt list :

$ sudo apt update && apt list php-zmq outputs php-zmq/stable 1.1.3-9 amd64

It is not possible to install it however:

$ sudo apt install php-zmq outputs E: Package 'php-zmq' has no installation candidate

I have checked that the package is not already installed using apt list --installed php-zmq . Underlying libzmq5 library is present on the system.

I wonder how does apt list command work that it suggests packages which apt install is unable to install.

Thanks for any help.

The package php-zmq is available in debian main repository, you need to edit your sources as follows:

deb http://deb.debian.org/debian buster main
deb http://deb.debian.org/debian-security/ buster/updates main
deb http://deb.debian.org/debian buster-updates main

Edit

Manual install:

sudo apt install gdebi
wget http://ftp.us.debian.org/debian/pool/main/p/php-defaults/php-common_69_all.deb
wget http://ftp.us.debian.org/debian/pool/main/p/php-zmq/php-zmq_1.1.3-9_amd64.deb
sudo gdebi php-common_69_all.deb
sudo gdebi php-zmq_1.1.3-9_amd64.deb

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM