Bobcares

How to fix “Error: xz compression not available” in CentOS and cPanel & WHM upgrade

PDF Header PDF Footer

Bobcares.com provides Server support to web hosting companies. As part of our work, we help web hosting companies keep their servers upgraded and patched to the latest version.

In some cPanel/WHM and CentOS servers, we’ve faced the error Error: xz compression not available when performing a distribution upgrade.

What causes Error: xz compression not available?

All RedHat compatible servers such as CentOS, RHEL and Fedora use a compression algorithm called LZMA/LZMA2 to build their RPM packages. So, the package manager YUM uses a compression utility called xz to unpack the files.

XZ compression utility is provided by Extra Packages for Enterprise Linux (EPEL) repository of CentOS.

In some servers, we’ve seen the wrong version of EPEL is configured in YUM config files. This causes an incompatible version of xz utility to be used, and it results in this error.

You don’t have to lose your sleep to keep your customers happy. Our friendly Server Support Specialists are online 24/7/365 to help your customers. ]

How to fix the broken upgrade process

When faced with this issue, we generally follow this process. However, it could be different from one server to another.

1. Remove EPEL packages

First the incompatible package needs to be removed by:

# yum remove epel-release

2. Clear the Yum cache

Remove all cached epel files from Yum

# rm -rf /var/cache/yum/XXX/XXX/epel

Replace the XXX with your architecture and CentOS version.

See how we help web hosting companies

3. Re-install EPEL package

Then enable CentOS Extras (in case it’s disabled), and freshly install EPEL repo.

# yum --enablerepo=extras install epel-release

You can check if it worked by listing the repositories using:

# yum repolist

4. Re-run the server upgrade or upcp (in cPanel)

Then re-start the upgrade process, and all should go well.

In case something is still going wrong, we’ll be happy to sort it out for you. Click here to talk to our server experts.

 

ENSURE ZERO DOWNTIME SERVICES

Guaranteed 100% uptime for your servers & 24/7 support for your customers!

GET IN TOUCH WITH THE 'BEST IN INDUSTRY' SUPPORT

2 Comments
  1. Prakash Arunachalam

    I tried this and still get the error.

    Reply
    • Visakh S

      Hi Prakash,

      What’s your current version of CentOS? Are you trying to upgrade it to CentOS 7?

      It’d be great if we can take a look at the server.

      You can submit a ticket by going to our server administration page.

      Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

Get featured on the Bobcares blog and share your expertise with a global tech audience.

WRITE FOR US
server management

Spend time on your business, not on your servers.

TALK TO US

Or click here to learn more.

GET UP TO 25% OFF

cPanel Support

Spend time on your business, not on your servers.

Managing a server is time consuming. Whether you are an expert or a newbie, that is time you could use to focus on your product or service. Leave your server management & end-user tech support to us, and use that time to focus on the growth and success of your business.

TALK TO US Or click here to learn more.

Speed issues driving customers away?
We’ve got your back!