我需要在bzip2服务器上启用centOS压缩。让我向你介绍我迄今所做的事:
在运行composer install时,我会得到以下错误:
Problem 1
- Installation request for jakoch/phantomjs-installer 2.1.1-p08 -> satisfiable by jakoch/phantomjs-installer[2.1.1-p08].
- jakoch/phantomjs-installer 2.1.1-p08 requires ext-bz2 * -> the requested PHP extension bz2 is missing from your system.
Problem 2
- jakoch/phantomjs-installer 2.1.1-p08 requires ext-bz2 * -> the requested PHP extension bz2 is missing from your system.
- josh/php-phantomjs v4.6.2 requires jakoch/phantomjs-installer 2.1.1-p08 -> satisfiable by jakoch/phantomjs-installer[2.1.1-p08].
- Installation request for josh/php-phantomjs v4.6.2 -> satisfiable by josh/php-phantomjs[v4.6.2].
To enable extensions, verify that they are enabled in your .ini files:
- /usr/local/lib/php.ini
- /usr/local/lib/php.conf.d/50-webapps.ini我取消了bz2在php.ini文件中的扩展名行:
extension=bz2重新启动阿帕奇。运行php --ini后,我得到以下消息:
Unable to load dynamic library 'bz2' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20170718/bz2 (/usr/local/lib/php/extensions/no-debug-non-zts-20170718/bz2: cannot open shared object file: No such file or directory)...这是正确的,因为在bz2.so目录中没有extensions/no-debug-non-zts-20170718/文件。
我搜索了很多关于如何为php安装bzip2扩展的内容,但是没有找到任何解决方案。此外,bzip2已经安装在机器上。
我在想,也许找到一个bz2.so文件并放入extensions目录可以解决这个问题,但同样也找不到这个文件!
知道如何在服务器上启用这个扩展(以及其他类似于php soap)吗?
发布于 2019-12-21 22:29:15
这应该适用于PHPV7.3。在extension=php_bz2.dll中,请查找"ExtensionList“,这里定义了许多扩展,只需在列表末尾添加ExtensionList即可。由于您需要检查php_bz2.dll文件是否可用,如果没有,请让我知道,这样我就可以上传它了。然后重新启动apache
https://stackoverflow.com/questions/58591408
复制相似问题