linux中lnmp安装相关php拓展-PHP fileinfo

2018-03-19  本文已影响0人  APHOME_明
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/fileinfo.so' - /usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/fileinfo.so: cannot open shared object file: No such file or directory in Unknown on line 0

解决方式

1、找到lnmp1.4安装源路径

/home/panjm/lnmp1.4/src/php-5.6.31/ext/fileinfo

第二步:

/usr/local/php/bin/phpize

返回信息

panjm@panjm-virtual-machine:~/lnmp1.4/src/php-5.6.31/ext/fileinfo$ /usr/local/php/bin/phpize
Configuring for:
PHP Api Version:         20131106
Zend Module Api No:      20131226
Zend Extension Api No:   220131226

第三步:(注意:在linux环境中这一步需要确保/usr/local/php的php文件夹有读写权限)

./configure --with-php-config=/usr/local/php/bin/php-config
make && make install

第四步:

在/usr/local/php/etc/php.ini 添加扩展:

extension=fileinfo.so
/etc/init.d/php-fpm restart
上一篇下一篇

猜你喜欢

热点阅读