1

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.

user14967413
  • 1,264
  • 1
  • 6
  • 12
  • 1
    I was finally able to install the extension using `phpize` (following instructions at https://eole-io.github.io/sandstone-doc/install-zmq-php-linux#installing-the-php-binding) and `docker-php-ext-enable`. However I still wonder why the first solution with `apt` did not work. – user14967413 Mar 27 '21 at 19:55

1 Answers1

2

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
GAD3R
  • 4,317
  • 1
  • 23
  • 34
  • 1
    Unfortunately, these repositories are already present in my `/etc/apt/sources.list` file, as they are by default in Debian Buster. – user14967413 Mar 28 '21 at 15:49
  • This error shows during manual install: `Dependency is not satisfiable: php-common (>= 1:7.0+33~)`. I think `php-common` dependency is really the problem, as it is not installable even separately using `apt install php-common` (`has no installation candidate` error shows). – user14967413 Mar 28 '21 at 22:10
  • @user14967413 This is strange. – GAD3R Mar 28 '21 at 22:14