Fix: No LSB modules are available

In Linux, “Isb_release” is a utility to display the information of your Linux Distributions. It includes the version number, release codename, security patch, etc., of the Linux distribution. Users can face the error “No LSB modules are available” while using the “lsb_release” command. This write-up figures out the reasons and solutions for the given error.

Reason: Isb_core Package in Not Installed

The problem of the error is that the “lsb_core” package is not installed in your operating system. To use the lsb_release, you must install the “lsb_core”. This error can be seen in the below image:

Let’s move toward the solution to this error.

Solution: Install lsb_core

To install the “lsb_core” package in Linux, use the following command:

For Debian/Ubuntu:

$ sudo apt install lsb-core

If you are using other Linux distributions such as Fedora, CentOs, or RHEL, execute the following command:

For Fedora:

$ sudo dnf install redhat-lsb-core

For RedHat/CentOS:

$ sudo yum install redhat-lsb-core

Once  “lsb_core” is installed run the “lsb_release” command to check it:

lsb_release

If it prints, the output like shown in the above image, then lsb_release has been successfully installed.

Now, you can use your lsb_release command in Linux.

Reason 2: Isb_core is Installed, But lsb_release is Not Working

The second possible reason is that you have already installed “lsb-core”, but it is still not working. Then try to remove the “lsb-core” package and reinstall it. Check out the solution below for this reason.

Solution: Re-install the lsb_release Package

First, remove the “lsb-core” package using the given command:

$ sudo apt remove lsb-core

For RedHat/CentOS:

$ sudo yum remove redhat-lsb-core

Once the package is removed, run the system update command:

$ sudo apt update

All packages are up to date.

For RedHat/CentOS:

$ sudo yum update

Now re-install the “lsb-core” package by following the method provided in the “Solution” of “Reason 1”.

After installing, run the “lsb_release” command to check:

$ lsb_release

Now, you can use the “lsb_release” command in Linux.

Conclusion

The reason for this error is that the “lsb-core” module is not installed or the “lsb-core” package is not working properly. To fix this error, install the “lsb-core” package or, if already installed, try to remove it and reinstall it using the given commands. This post has demonstrated all possible reasons and solutions for the given error.