本文主要是介绍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
这篇关于docker使用php较老版本出现pecl无法安装扩展问题的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!