xz compression install on centos

18,933

Solution 1

This problem comes if you installed a wrong epel release on your machine. If so, then you need to remove the epel release by

yum remove epel-release

Sometimes that is not enough, you need to remove the cache as well by:

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

Then you can install the epel-release again

yum -y install epel-release

Solution 2

You need install the EPEL repository by downloading the appropriate RPM package for your system and installing it. For example, for CentOS and Red Hat Enterprise Linux 6.x:

wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

sudo rpm -Uvh epel-release-6*.rpm

If you get a File Not Found error message when trying to download the package, the version number might have changed. You can access the latest version of the RPM installer from the Fedora EPEL wiki page. The wiki page also includes additional instructions for Red Hat Network subscribers who are installing the EPEL repository.

Finally, install the Python library:

yum install pyliblzma

This works perfecly in my CentOS 6.x.

Solution 3

I've found a solution on this page of stackexchange, working in CentOS 6.X: https://unix.stackexchange.com/a/314756

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

wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

sudo rpm -ivh epel-release-6-8.noarch.rpm

sudo yum clean all

sudo rpmdb -v --rebuilddb

sudo yum -y install libselinux-python
Share:
18,933
infomf
Author by

infomf

Updated on June 16, 2022

Comments

  • infomf
    infomf almost 2 years

    Any installation or update using yum command I ended up error: Error: xz compression not available. On website I read that Python library is missing. When you try to install a library (sudo yum update pyliblzma) again failed with error. Do not know how? Thanks.