What is xz compression not available?
xz compression not available is a typical error which means that you have a broken YUM. There can be many reasons for this. However, the most common is to due to installation of wrong epel-release package.
If you are on CentOS 6.x and mistakenly installed epel-release-7 package which is supposed to be for CentOS 7.1 then you will see this error with every YUM command including YUM Update.
How to fix xz compression not available issue?
You will need to remove the wrongly installed epel-release-7 and then reinstall the correct one for CentOS 6. See below commands for step by step guidance.
Steps to fix xz compression not available
1. Login to your server using root or sudo.
2. Remove wrong epel-release by using following command,
yum remove epel-release
3. There is a good chance that you will need to be specific many times. So, you can navigate to repo directory by.
and then delete the exact repo with filename using ‘rm’
4. You might also need to clear and refresh the cache,
rm -rf /var/cache/yum/x86_64/6/epel
5. Clean the YUM
6. Refresh and rebuild the repo information
There it is. It’s gone and resolved. Now, you can install correct repo if you want using command,
yum install epel-release