Error: xz compression not available

If you get the following message while trying to install any package with yum, it means you picked the wrong repo package during install:

Error: xz compression not available

Chances are you installed Epel version 7 on CentOS 6.5

To fix the problem:
Remove the repo cache:

rm -rf /var/cache/yum/x86_64/6/epel

Remove the rpm package itself:

rpm -e epel-release-7-5.noarch

Remove the config files:

rm -rf /etc/yum.repos.d/epel*

Enable the correct repo.