I need to enable bzip2 compression on a centOS server. Let me walk you through what I did so far:
When running composer install
I get the following errors:
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
I uncommented the extension line of bz2 in php.ini file:
extension=bz2
and restarted apache. After running php --ini
I get the following message:
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)...
Which is true because there is no bz2.so
file inside extensions/no-debug-non-zts-20170718/
directory.
I searched a lot about how to install bzip2 extension for php but could not find any solutions. Also bzip2
is already installed on the machine.
I was thinking maybe finding a bz2.so
file and putting in extensions
directory could fix the problem but again could not find the file either!
Any idea how to enable this extension (and others like php soap) on server?