centos-rhel服务器相关 / php / 未分类 · 2015年6月23日

坑 关于 imagick-3.0 不支持php5.6 而升级为imagick-3.1.2

因为fab有台机器空出来 就升级一下自己的lnmp 中的php为5.6.6 but
[root@ 36nmp]# /etc/init.d/php-fpm start
Starting php-fpm [23-Jun-2015 14:20:41] NOTICE: PHP message: PHP Deprecated: Comments starting with ‘#’ are deprecated in /etc/php.ini on line 1866 in Unknown on line 0
[23-Jun-2015 14:20:41] NOTICE: PHP message: PHP Deprecated: Comments starting with ‘#’ are deprecated in /etc/php.ini on line 1867 in Unknown on line 0
******
[23-Jun-2015 14:20:41] NOTICE: PHP message: PHP Deprecated: Comments starting with ‘#’ are deprecated in /etc/php.ini on line 1880 in Unknown on line 0
[23-Jun-2015 14:20:41] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/imagick.so’ – /usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/imagick.so: cannot open shared object file: No such file or directory in Unknown on line 0
done
[root@ 36nmp]# ls /usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/imagick.so
ls: 无法访问/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/imagick.so: 没有那个文件或目录
果真好事多麿呀 再细细查看一下 原来是 imagick-3.0.1 安装不上
/tmp/36nmp/imagick-3.0.1/imagick_class.c:9534: 错误:‘CHECKUID_CHECK_FILE_AND_DIR’未声明(在此函数内第一次使用)
/tmp/36nmp/imagick-3.0.1/imagick_class.c:9534: 错误:‘CHECKUID_NO_ERRORS’未声明(在此函数内第一次使用)
make: *** [imagick_class.lo] 错误
make的时候报错提示
[imagick_class.lo] Error 1
重复几次,结果都卡这了。经过谷歌搜索后加了一句
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
依然没搞定 正在哥差点要崩时候 真是柳暗花明又一村,
看到有人说 PHP54 won’t work with version 3.0.1 you can use the latest version to fix this:
那是不是同样不支持php5.6.6 呢 抱着试一试的心态 升级一下 imagick o为 imagick-3.1.2. 就好了 哈哈
https://pecl.php.net/get/imagick-3.1.2.tgz