Software & AppsOperating SystemLinux

Should You Downgrade libssl1.1 to libssl1.0 to Install npm on Ubuntu 20.04 LTS?

Ubuntu 21

In the world of system administration, dependency issues are a common occurrence. One such issue that has been reported by users is the need to downgrade libssl1.1 to libssl1.0 to install npm on Ubuntu 20.04 LTS. This article aims to provide a comprehensive guide on how to handle this situation.

Understanding the Issue

The problem arises when you attempt to install npm, a JavaScript runtime environment, on Ubuntu 20.04 LTS. You may encounter an error message indicating that libssl1.1 is not compatible with the npm installation. The suggested solution in this scenario is to downgrade libssl1.1 to libssl1.0.

However, it’s important to note that downgrading from a newer version to an older one can have implications on your system, as it involves replacing updated software with a potentially less secure or less feature-rich version.

The Solution

The good news is that in this particular case, the downgrade is not as drastic as it may seem. The suggested downgrade is from libssl1.1 version to version 1.1.1f-1ubuntu2. The differences between these versions are relatively minor, mostly involving bug fixes and the addition of optional features.

To install npm, you can follow the solution provided by Dan Scally. This involves downgrading libssl1.1 to the specific version required by libssl-dev and then installing npm. Let’s break down the steps:

  1. Downgrade libssl1.1 Use the following command to downgrade libssl1.1:
    sudo apt install libssl1.1=1.1.1f-1ubuntu2
    In this command, sudo gives you administrative privileges, apt is the package handling utility, install is the command to install or upgrade packages, and libssl1.1=1.1.1f-1ubuntu2 specifies the package to be installed along with its version number.
  2. Install npm After downgrading, you can install npm using the following command:
    sudo apt install npm
    This command follows the same structure as the previous one, with npm being the package to install.

This solution has been reported to work without any issues.


In conclusion, downgrading libssl1.1 to libssl1.0 is not necessary to install npm on Ubuntu 20.04 LTS. Instead, downgrading to the specific version required by libssl-dev should resolve the dependency issue and allow you to install npm successfully. Always remember to understand the implications of downgrading software versions and consider all possible solutions before proceeding.

What is `libssl1.1` and `libssl1.0`?

libssl1.1 and libssl1.0 are libraries that provide cryptographic functions in the OpenSSL toolkit. They are used by various software applications to ensure secure communication and data encryption.

Why do I need to downgrade `libssl1.1` to `libssl1.0` to install npm on Ubuntu 20.04 LTS?

The need to downgrade libssl1.1 to libssl1.0 arises when there is a compatibility issue between the version of libssl1.1 installed on your system and the version required by npm. Downgrading to the specific version required by npm resolves this dependency issue.

Are there any risks or drawbacks in downgrading `libssl1.1` to `libssl1.0`?

Downgrading software versions can have implications on your system. By downgrading libssl1.1 to libssl1.0, you may be replacing a more updated and potentially more secure version with an older one. It’s important to consider the security and feature differences between the two versions before proceeding with the downgrade.

Will downgrading `libssl1.1` affect other software or system functionality?

Downgrading libssl1.1 may affect other software that relies on the newer version. It’s possible that some applications may not function properly or may encounter compatibility issues. It’s important to carefully consider the implications and potential impact on your system before proceeding with the downgrade.

Is there an alternative solution to downgrading `libssl1.1`?

Yes, an alternative solution is to try installing npm using a different package manager, such as nvm (Node Version Manager). nvm allows you to manage multiple versions of Node.js and npm without requiring system-level package installations. This can help avoid dependency conflicts and the need for downgrading libssl1.1.

Leave a Comment

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