how to fix this error: xz compression not available in centOS

When i upgrade php version 5.3.3 to latest in centOS i got this error: Error: xz compression not available its appear when i give command yum update -y

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

This question was answered by @SphericalCow:

according to this forum thread, you may have installed an incompatible epel repository.

(from the above forum post)

Checked again and the problem occurs if you install the BETA EPEL 7 package. Even if you remove it and install the correct epel-release-6-8.noarch.rpm package, it leaves /var/cache/yum/$arch/6/epel there with an xz file cached there and then yum cannot read it. You need to first, yum remove epel-release then rm -rf /var/cache/yum/x86_64/6/epel (or the 32 bit version if your system is not 64 bit) then install the correct epel-release package.

The epel-release-7 package is for the, as yet, unreleased RHEL7/CentOS 7. If you install it on your el5 or el6 system then it will break yum.

I usually like to follow the instructions here to install the Epel repo.

View the original comment