3

I'm running CENTOS 6.6 on a VPS and am trying to install the ZMQ PHP extension and tried installing using the command shown in the instructions:

sudo pecl install zmq-beta

However, it fails, showing this as the output:

root@host [/zmq]#  sudo pecl install zmq-beta
downloading zmq-1.1.2.tgz ...
Starting to download zmq-1.1.2.tgz (39,573 bytes)
..........done: 39,573 bytes
could not extract the package.xml file from "/root/tmp/pear/cache/zmq-1.1.2.tgz"
Download of "pecl/zmq" succeeded, but it is not a valid package archive
Error: cannot download "pecl/zmq"
Download failed
install failed

I also tried:

sudo pecl install -Z zmq-beta

And:

sudo pecl install --nocompress zmq-beta

But I get the same error.

Why is this error occuring?

  • Did you run pecl channel-update like it said? – Mikel Jan 31 '15 at 21:54
  • @Mikel Yes, I did run that command, but the same error still occurs, just without that line. I'll update my question to the output after the update. – Nate Jan 31 '15 at 21:57
0

SOA #1. It think, that problem is in downloaded archive. Check md5sum of archive:

[root@centos6 ~]# md5sum /root/tmp/pear/cache/zmq-1.1.2.tgz 
74da2fc1aa83e6fa27acffb9a37596b9  /root/tmp/pear/cache/zmq-1.1.2.tgz

If it isn't the same - remove it and try download it again.

Alternativly - you can invoke pecl with -vv parameter - then you should see more about error, and path from where file was downloaded. Mime was from http://pecl.php.net/get/zmq-1.1.2.tgz

0

Had the same problem, to solve it:

  • First download zmq-1.1.2.tgz (https://pecl.php.net/get/zmq-1.1.2.tgz)
  • Extract tgz to get the tar archive
  • cd to the tar file directory, and install this pecl package with sudo pear install -O zmq-1.1.2.tar

And it works for me.

Why ? I think it is because pecl command try to find a package.xml file in the tgz, but the file is still archived in a tar archive inside this tgz file.

So downloading and extract it manually do the job.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.