Search code examples
phplinuxmongodbdockerpecl

PECL install no releases available


RUN pecl install mongodb-1.4.2

Resulted in this output:

RUN pecl install mongodb-1.4.2 &&   docker-php-ext-enable mongodb:
No releases available for package "pecl.php.net/mongodb"
install failed

Could this be a cert issue? because if I try to wget i get following:

Connecting to pecl.php.net (104.236.228.160:443)
ssl_client: pecl.php.net: certificate verification failed: certificate has expired

PHP Version php:7.0

Is there a way to fix this or do I need to just wait for them to update the cert?


Solution

  • Your base image is too old and doesn't have the appropriate certificate information, and apk update && apk upgrade don't get you there. I don't see any way to tell pecl to ignore certs but you could do:

    wget --no-check-certificate https://pecl.php.net/get/mongodb-1.4.2.tgz
    pecl install --offline ./mongodb-1.4.2.tgz
    

    Of course, I'd have recommend not using such old versions and then it won't be a problem.