docker使用php较老版本出现pecl无法安装扩展问题

问题:

  • Channel "pear.php.net" is not responding over http://, failed with message: Connection to ssl://pear.php.net:443' failed:Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?
  • No releases available for package "pecl.php.net/imagick"

解决方法:

  • 删除证书

    FROM php:5.6-fpm

    删除证书

    RUN rm /usr/share/ca-certificates/mozilla/DST_Root_CA_X3.crt

  • 通过安装包手动安装,需要手动处理php.ini问题

    ...
    && pecl channel-update pecl.php.net
    && {
    pecl install imagick || (
    wget --no-check-certificate https://pecl.php.net/get/imagick -O ./imagick_latest.tgz
    && pecl install --offline ./imagick_latest.tgz
    && rm ./imagick_latest.tgz
    );
    }
    ...

附上GitHub issue:

https://github.com/php/php-src/issues/11486

相关推荐
投笔丶从戎44 分钟前
Kotlin Multiplatform--01:项目结构基础
android·开发语言·kotlin
诡异森林。1 小时前
Docker--Docker网络原理
网络·docker·容器
ALex_zry1 小时前
Docker Macvlan网络配置实战:解决“network already exists“错误
网络·docker·php
IT小辉同学1 小时前
Docker如何更换镜像源提高拉取速度
spring cloud·docker·eureka
Lary_Rock2 小时前
Android 编译问题 prebuilts/clang/host/linux-x86
android·linux·运维
王江奎2 小时前
Android FFmpeg 交叉编译全指南:NDK编译 + CMake 集成
android·ffmpeg
limingade3 小时前
手机打电话通话时如何向对方播放录制的IVR引导词声音
android·智能手机·蓝牙电话·手机提取通话声音
布尼卡3 小时前
mac brew 无法找到php7.2 如何安装php7.2
php·mac
ALe要立志成为web糕手3 小时前
[BJDCTF2020]EzPHP
web安全·网络安全·php·ctf