
我想將我的 VPS 升級到 PHP 7
但我每次都會遇到這個問題
[root@cloudbox75067 /]# yum install php70w php70w-opcache
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: ftp.nluug.nl
* epel: fedora.cu.be
* extras: nl.mirror.babylon.network
* updates: ftp.nluug.nl
* webtatic: uk.repo.webtatic.com
Error: xz compression not available
答案1
如果您在電腦上安裝了錯誤的 epel 版本,則會出現此問題。如果是這樣,那麼您需要透過移除 epel 版本
yum remove epel-release
有時這還不夠,您還需要透過以下方式刪除快取:
rm -rf /var/cache/yum/x86_64/6/epel
然後你可以再安裝epel-release
yum -y install epel-release
來源:https://stackoverflow.com/questions/27026003/xz-compression-install-on-centos/31945905#31945905