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

相关推荐
还鮟21 分钟前
CTF Web PHP弱类型与进制绕过(过滤)
php·ctf
zorro_z25 分钟前
PHP语法基础篇(八):超全局变量
php
恋猫de小郭2 小时前
Meta 宣布加入 Kotlin 基金会,将为 Kotlin 和 Android 生态提供全新支持
android·开发语言·ios·kotlin
aqi003 小时前
FFmpeg开发笔记(七十七)Android的开源音视频剪辑框架RxFFmpeg
android·ffmpeg·音视频·流媒体
androidwork4 小时前
深入解析内存抖动:定位与修复实战(Kotlin版)
android·kotlin
梦天20155 小时前
android核心技术摘要
android
高山莫衣6 小时前
Docker Desktop导致存储空间不足时的解决方案
docker·容器·eureka
鹏大师运维6 小时前
在银河麒麟V10 SP1上手动安装与配置高版本Docker的完整指南
linux·运维·docker·容器·麒麟·统信uos·中科方德
lovely_nn6 小时前
docker 介绍
docker·k8s
Ahlson6 小时前
【fnNAS】docker的nginx配置html
nginx·docker·容器·fnnas