should I downgrade libssl1.1 to libssl1.0 to install npm

Asked by Pachuca on 2020-07-14

I posted this on askubuntu

Just trying to install npm and the solution I get from aptitude is to downgrade the versions. What impact does that have on my ubuntu 20 LTS if I downgrade?

Question information

English Edit question
Ubuntu openssl Edit question
No assignee Edit question
Solved by:
Manfred Hampl
Last query:
Last reply:
Manfred Hampl (m-hampl) said : #1

As already shown on the root cause of your problem is the usage of software from a PPA

You wrote that you are running Ubuntu 20.04, but the foreign version of libssl1.1 that causes the problem is for Ubuntu 18.04.

For diagnostic purposes please provide the output that you receive for the commands (to be executed in a terminal window):

uname -a
lsb_release -crid
sudo apt update
apt-cache policy libssl-dev libssl1.1

Remark: it seems to me that the required downgrade is not from ibssl1.1 to libssl1.0 but only from libssl1.1 version 1.1.1g to libssl1.1 version 1.1.1f

Pachuca (pachuca) said : #2

Thanks for your reply, that clears up a lot for me. I didn't see the reply on askubuntu until now. Is there anyway to avoid downgrading or is that the only way I can install npm?

uname -a
Linux Sky-X4C-P7xxTM1-G 5.4.0-40-generic #44-Ubuntu SMP Tue Jun 23 00:01:04 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu 20.04 LTS
Release: 20.04
Codename: focal

apt-cache policy libssl-dev libssl1.1
  Installed: (none)
  Candidate: 1.1.1f-1ubuntu2
  Version table:
     1.1.1f-1ubuntu2 500
        500 focal/main amd64 Packages
  Version table:
 *** 100
        100 /var/lib/dpkg/status
     1.1.1f-1ubuntu2 500
        500 focal/main amd64 Packages

Manfred Hampl (m-hampl) said : #3

There is something strange in your settings with respect to the PPA from ondrej sury.
You have libssl1.1 installed from that PPA, but that PPA is no more listed in the output of apt-cache.

What have you done? Have you enabled and later disabled a PPA? Which PPA did you have activated? Or have you manually installed a package from there?

What is the output of
sudo apt update
(already asked before, why didn't you show that output?) and the output of
grep -i ppa /etc/apt/sources.list /etc/apt/sources.list.d/*.list

If you want to avoid downgrading, you probably can re-enable the PPA that you had, and it might instaƶl libssl1.1 version and this should allow installing the required dependencies for npm

Pachuca (pachuca) said : #4

I usually just do a fresh install for new LTS releases to avoid all of this, but this time I decided to upgrade from bionic to focal. Afterwards all my PPA's were disabled by default. I just assumed this was part of the process. Would enabling the ppa fix things?

apt update
Get:1 stable InRelease [1,811 B]
Get:2 focal-security InRelease [107 kB]
Hit:3 focal InRelease
Hit:4 tableplus InRelease
Get:5 stable/main amd64 Packages [1,117 B]
Hit:6 focal InRelease
Get:7 focal-updates InRelease [111 kB]
Get:8 focal-backports InRelease [98.3 kB]
Get:9 focal-security/main amd64 DEP-11 Metadata [21.2 kB]
Get:10 focal-security/main amd64 c-n-f Metadata [3,268 B]
Get:11 focal-security/universe amd64 DEP-11 Metadata [35.7 kB]
Get:12 focal-updates/main amd64 Packages [241 kB]
Get:13 focal-updates/main i386 Packages [125 kB]
Get:14 focal-updates/main Translation-en [95.6 kB]
Get:15 focal-updates/main amd64 DEP-11 Metadata [165 kB]
Get:16 focal-updates/main amd64 c-n-f Metadata [7,312 B]
Get:17 focal-updates/universe amd64 DEP-11 Metadata [172 kB]
Get:18 focal-updates/multiverse amd64 DEP-11 Metadata [2,468 B]
Get:19 focal-backports/universe amd64 DEP-11 Metadata [1,972 B]
Fetched 1,190 kB in 1s (1,693 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.

grep -i ppa /etc/apt/sources.list /etc/apt/sources.list.d/*.list
/etc/apt/sources.list.d/clipgrab-team-ubuntu-ppa-bionic.list:# deb focal main # disabled on upgrade to focal
/etc/apt/sources.list.d/clipgrab-team-ubuntu-ppa-bionic.list:# deb-src bionic main
/etc/apt/sources.list.d/obsproject-ubuntu-obs-studio-bionic.list:# deb focal main # disabled on upgrade to focal
/etc/apt/sources.list.d/obsproject-ubuntu-obs-studio-bionic.list:# deb-src bionic main
/etc/apt/sources.list.d/ondrej-ubuntu-apache2-bionic.list:# deb focal main # disabled on upgrade to focal
/etc/apt/sources.list.d/ondrej-ubuntu-apache2-bionic.list:# deb-src bionic main
/etc/apt/sources.list.d/ondrej-ubuntu-php-bionic.list:# deb focal main # disabled on upgrade to focal
/etc/apt/sources.list.d/ondrej-ubuntu-php-bionic.list:# deb-src bionic main

Best Manfred Hampl (m-hampl) said : #5

I suggest that you re-enable with focal as release name.

sudo gedit /etc/apt/sources.list.d/ondrej-ubuntu-php-bionic.list
remove the comment indicator ('# ') in front of "deb" and replace "bionic" by "focal" in the "deb-src" line.

Then execute
sudo apt update
apt list --upgradeable

What output do you receive? I assume that it will show a possible uprade of libssl packages.

Pachuca (pachuca) said : #6

Yes, it shows the upgrade like this:

libssl1.1/focal amd64 [upgradable from:]

Here is the output:

apt list --upgradable
Listing... Done
apport-gtk/focal-updates,focal-updates 2.20.11-0ubuntu27.4 all [upgradable from: 2.20.11-0ubuntu27.3]
apport/focal-updates,focal-updates 2.20.11-0ubuntu27.4 all [upgradable from: 2.20.11-0ubuntu27.3]
bash/focal-updates 5.0-6ubuntu1.1 amd64 [upgradable from: 5.0-6ubuntu1]
fwupd-signed/focal-updates 1.27.1ubuntu2+1.3.11-1~focal1 amd64 [upgradable from: 1.27.1ubuntu1+1.3.9-4ubuntu0.1]
fwupd/focal-updates 1.3.11-1~focal1 amd64 [upgradable from: 1.3.9-4ubuntu0.1]
gir1.2-ibus-1.0/focal-updates 1.5.22-2ubuntu2.1 amd64 [upgradable from: 1.5.22-2ubuntu2]
gir1.2-rsvg-2.0/focal-updates 2.48.7-1ubuntu0.20.04.1 amd64 [upgradable from: 2.48.2-1]
gnome-getting-started-docs/focal-updates,focal-updates 3.36.2-0ubuntu0.1 all [upgradable from: 3.36.1-0ubuntu1]
gnome-user-docs/focal-updates,focal-updates 3.36.2+git20200704-0ubuntu0.1 all [upgradable from: 3.36.1-0ubuntu1]
ibus-data/focal-updates,focal-updates 1.5.22-2ubuntu2.1 all [upgradable from: 1.5.22-2ubuntu2]
ibus-gtk3/focal-updates 1.5.22-2ubuntu2.1 amd64 [upgradable from: 1.5.22-2ubuntu2]
ibus-gtk/focal-updates 1.5.22-2ubuntu2.1 amd64 [upgradable from: 1.5.22-2ubuntu2]
ibus/focal-updates 1.5.22-2ubuntu2.1 amd64 [upgradable from: 1.5.22-2ubuntu2]
less/focal-updates 551-1ubuntu0.1 amd64 [upgradable from: 551-1]
libapache2-mod-php7.4/focal amd64 [upgradable from:]
libcephfs2/focal-updates 15.2.3-0ubuntu0.20.04.1 amd64 [upgradable from: 15.2.1-0ubuntu2]
libfwupd2/focal-updates 1.3.11-1~focal1 amd64 [upgradable from: 1.3.9-4ubuntu0.1]
libfwupdplugin1/focal-updates 1.3.11-1~focal1 amd64 [upgradable from: 1.3.9-4ubuntu0.1]
libgd3/focal amd64 [upgradable from:]
libibus-1.0-5/focal-updates 1.5.22-2ubuntu2.1 amd64 [upgradable from: 1.5.22-2ubuntu2]
libicu65/focal amd64 [upgradable from:]
libidn2-0/focal amd64 [upgradable from:]
libidn2-0/focal i386 [upgradable from:]
libldap-2.4-2/focal-updates 2.4.49+dfsg-2ubuntu1.3 amd64 [upgradable from: 2.4.49+dfsg-2ubuntu1.2]
libldap-common/focal-updates,focal-updates 2.4.49+dfsg-2ubuntu1.3 all [upgradable from: 2.4.49+dfsg-2ubuntu1.2]
libpcre2-16-0/focal amd64 [upgradable from: 10.34-7]
libpcre2-32-0/focal amd64 [upgradable from: 10.34-7]
libpcre2-8-0/focal amd64 [upgradable from:]
libpcre3/focal amd64 [upgradable from:]
libqt5webengine-data/focal-updates,focal-updates 5.12.8+dfsg-0ubuntu1.1 all [upgradable from: 5.12.8+dfsg-0ubuntu1]
libqt5webenginecore5/focal-updates 5.12.8+dfsg-0ubuntu1.1 amd64 [upgradable from: 5.12.8+dfsg-0ubuntu1]
libqt5webenginewidgets5/focal-updates 5.12.8+dfsg-0ubuntu1.1 amd64 [upgradable from: 5.12.8+dfsg-0ubuntu1]
librados2/focal-updates 15.2.3-0ubuntu0.20.04.1 amd64 [upgradable from: 15.2.1-0ubuntu2]
librsvg2-2/focal-updates 2.48.7-1ubuntu0.20.04.1 amd64 [upgradable from: 2.48.2-1]
librsvg2-common/focal-updates 2.48.7-1ubuntu0.20.04.1 amd64 [upgradable from: 2.48.2-1]
libssl1.1/focal amd64 [upgradable from:]
libxml2/focal amd64 [upgradable from:]
openssl/focal amd64 [upgradable from:]
php-common/focal,focal all [upgradable from:]
php-xml/focal,focal all [upgradable from:]
php7.4-cli/focal amd64 [upgradable from:]
php7.4-common/focal amd64 [upgradable from:]
php7.4-json/focal amd64 [upgradable from:]
php7.4-mbstring/focal amd64 [upgradable from:]
php7.4-mysql/focal amd64 [upgradable from:]
php7.4-opcache/focal amd64 [upgradable from:]
php7.4-readline/focal amd64 [upgradable from:]
php7.4-xml/focal amd64 [upgradable from:]
python3-apport/focal-updates,focal-updates 2.20.11-0ubuntu27.4 all [upgradable from: 2.20.11-0ubuntu27.3]
python3-distupgrade/focal-updates,focal-updates 1:20.04.21 all [upgradable from: 1:20.04.19]
python3-ibus-1.0/focal-updates,focal-updates 1.5.22-2ubuntu2.1 all [upgradable from: 1.5.22-2ubuntu2]
python3-problem-report/focal-updates,focal-updates 2.20.11-0ubuntu27.4 all [upgradable from: 2.20.11-0ubuntu27.3]
ubuntu-docs/focal-updates,focal-updates 20.04.3 all [upgradable from: 20.04.2]
ubuntu-release-upgrader-core/focal-updates,focal-updates 1:20.04.21 all [upgradable from: 1:20.04.19]
ubuntu-release-upgrader-gtk/focal-updates,focal-updates 1:20.04.21 all [upgradable from: 1:20.04.19]
xserver-common/focal-updates,focal-updates 2:1.20.8-2ubuntu2.2 all [upgradable from: 2:1.20.8-2ubuntu2.1]
xserver-xephyr/focal-updates 2:1.20.8-2ubuntu2.2 amd64 [upgradable from: 2:1.20.8-2ubuntu2.1]
xserver-xorg-core/focal-updates 2:1.20.8-2ubuntu2.2 amd64 [upgradable from: 2:1.20.8-2ubuntu2.1]
xserver-xorg-legacy/focal-updates 2:1.20.8-2ubuntu2.2 amd64 [upgradable from: 2:1.20.8-2ubuntu2.1]
xwayland/focal-updates 2:1.20.8-2ubuntu2.2 amd64 [upgradable from: 2:1.20.8-2ubuntu2.1]

so I did sudo apt upgrade && sudo apt dist-upgrade. That fixed the problem for me. I'm able to install npm now. Thank you so much for your help!! I wish you all the best and keep up the good work you're doing here. I'm pretty new to Linux if you couldn't tell. I'm coming from windows so I really appreciate you being patient with me and helping me fix this, probably trivial problem for you, kind of complex for me lol.

Pachuca (pachuca) said : #7

Thanks Manfred Hampl, that solved my question.