您的位置:首页 > 编程语言 > PHP开发

php升级完缺少ssh2,svn扩展

2017-12-19 21:05 162 查看
在给php进行升级完毕之后,使用 php-v 出现如下错误警告:

PHP Warning:  PHP Startup: imagick: Unable to initialize module

Module compiled with module API=20100525

PHP    compiled with module API=20131226

These options need to match

 in Unknown on line 0

PHP Warning:  PHP Startup: ssh2: Unable to initialize module

Module compiled with module API=20100525

PHP    compiled with module API=20131226

These options need to match

 in Unknown on line 0

PHP Warning:  PHP Startup: svn: Unable to initialize module

Module compiled with module API=20100525

PHP    compiled with module API=20131226

These options need to match

 in Unknown on line 0

 

 

 解决方法:这是因为升级完php后,出现缺少php的扩展库
 

imagick: yum -y install php56w-pecl-imagick-devel.x86_64 php56w-pecl-imagick.x86_64

 ssh2:使用pecl库进行安装   pecl install ssh2     

 可参考:http://www.lnmp.cn/install-ssh2-extension-under-php-7.1.html

 

 svn:安装svn的扩展      参考:http://www.linuxdiyf.com/linux/13948.html

 wget http://pecl.php.net/get/svn-1.0.2.tgz
 tar zxf svn-1.0.2.tgz 

 cd svn-1.0.2/

 若是yum安装的php直接输入phpize,若是源码安装运行php安装的目录/usr/local/php56/bin/phpize

 ./configure --with-php-config=/usr/bin/php-config

 nake && make install

 

 完后再次运行php -v 进行查看发现警告已经不存在!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: