安装zib扩展报错

pecl install zip

 

安装成功后

执行php -v报错

 

PHP Warning: PHP Startup: Unable to load dynamic library 'zip.so' (tried: /usr/local/services/php-7.4.10/lib/php/extensions/no-debug-non-zts-20190902/zip.so (libzip.so.5: cannot open shared object file: No such file or directory), /usr/local/services/php-7.4.10/lib/php/extensions/no-debug-non-zts-20190902/zip.so.so (/usr/local/services/php-7.4.10/lib/php/extensions/no-debug-non-zts-20190902/zip.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP 7.4.10 (cli) (built: Sep 7 2020 17:45:31) ( NTS )

 

[root@VM-111-206-centos /etc]# find / . -name libzip.so.5
/usr/local/lib64/libzip.so.5

[root@VM-111-206-centos /etc]# vim ld.so.conf

添加四个lib安装目录

include ld.so.conf.d/*.conf
/usr/lib64
/usr/lib
/usr/local/lib
/usr/local/lib64

[root@VM-111-206-centos /etc]# ldconfig -v

再重启fpm即可

posted @ 2020-10-14 13:13  流火行者  阅读(337)  评论(0编辑  收藏  举报