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

相关推荐
一叶知秋yyds6 分钟前
Centos 安装 Docker教程
linux·docker·centos
Android疑难杂症12 分钟前
鸿蒙Notification Kit通知服务开发快速指南
android·前端·harmonyos
lcanfly14 分钟前
Mysql作业5
android·数据库·mysql
return(b,a%b);19 分钟前
docker拉取失败,更换docker的源
docker·容器·eureka
BingoGo21 分钟前
从零开始打造 Laravel 扩展包:开发、测试到发布完整指南
后端·php
IT小哥哥呀36 分钟前
Jenkins + Docker 打造自动化持续部署流水线
docker·微服务·自动化·jenkins·springboot·高并发·限流
时鲟、时倾1 小时前
docker部署kafka
docker·容器·kafka
byte轻骑兵1 小时前
WSL+openEuler云原生实践:Docker全流程部署与多容器编排深度评测
docker·云原生·容器·openeuler
进阶的小叮当1 小时前
Vue代码打包成apk?Cordova帮你解决!
android·前端·javascript
JaguarJack2 小时前
从零开始打造 Laravel 扩展包:开发、测试到发布完整指南
后端·php·laravel