Overview
I was creating my Docker image to setup Rockmongo. In the Dockerfile, I have a command
pecl install mongo
This command was working before but when ran t today I am getting this error,
downloading mongo-1.5.5.tgz ... Starting to download mongo-1.5.5.tgz (Unknown size) ....done: 3,582 bytes Could not get contents of package "/build/buildd/php5-5.3.10/pear-build-download/mongo-1.5.5.tgz". Invalid tgz file. Download of "pecl/mongo" succeeded, but it is not a valid package archive Error: cannot download "pecl/mongo"
Reference
To view the whole docker file https://github.com/gilacode/docker-rockmongo/blob/master/Dockerfile
Question
Is there any way to specificy a different version of the Mongo package during the "pecl install command"?
I see this is an old question but anyway ... I had the same issue and it was not due to the pecl website. It seems to be a bug with the "lfs" option when you compile php5. To verify if this is your case type: php-config --phpapi
I got it working by adding the --nocompress option [sudo pecl install --nocompress mongo]
You can see other details here https://bugs.php.net/bug.php?id=67075