The solution of error: XZ compression not available

Check the PHP version after entering the terminal
PHP – V
the output may be as follows:
PHP 5.4.35 (CLI) (build: Nov 14 2014 07:04:10) Copyright (c) 1997-2014 the PHP group Zend engine v2.6.0, copyright (c) 1998-2015 Zend technologies with Zend opcache v7.0.4-dev, Copyright (c) 1999-2015, by Zend technologies

Execute the following command to upgrade the software warehouse

rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

Execute the following command to delete PHP (pay attention to the packages unloaded when unloading)
Yum remove PHP common

Then ask you if you want to continue like the installation, enter yes to
install PHP 5.6 (php56w devel is not required) (you can use Yum search php56w to check the missing dependent packages)
Yum install – y php56w php56w opcache php56w XML php56w mcrypt php56w GD php56w devel php56w MySQL php56w Intl php56w mbstring php56w FPM

Restart httpd
Service httpd restart
view the latest version
PHP – V
now it should be 5.6!


solution:
so, through the following three steps, delete the 7 version of EPEL, and then install the appropriate version of epel6:
1. Yum remove EPEL release
2. RM – RF/var/cache/Yum/x86_ 64/6/epel/*
3.rpm – Uvhhttp://mirrors.ustc.edu.cn/epel/epel-release-latest-6.noarch.rpm
4.rpm – Uvhhttp://mirror.webtatic.com/yum/el6/latest.rpm


Execute the installation command to install php7 again, and this error is still prompted. Most of the solutions to search on the Internet are the same as above, and the problems have not been effectively solved after repeated operations.


After carefully reading the error prompt, the content is “XZ compression is not available”, XZ is a compression tool, and my system is minimal installation, it should be that this tool is not installed.
Next, perform the following steps to install XZ:
Yum clean all
Yum – y install XZ
rpm- Uvhhttp://mirror.webtatic.com/yum/el6/latest.rpm
Then execute Yum install – y php7 success!

Similar Posts: