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

Asked by Pachuca

I posted this on askubuntu https://askubuntu.com/questions/1258870/ubuntu-20-04-should-i-downgrade-libssl1-1-to-libssl1-0-to-install-npm

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

Language:
English Edit question
Status:
Solved
For:
Ubuntu openssl Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

As already shown on https://askubuntu.com/questions/1258870/ubuntu-20-04-should-i-downgrade-libssl1-1-to-libssl1-0-to-install-npm 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

Revision history for this message
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
libssl-dev:
  Installed: (none)
  Candidate: 1.1.1f-1ubuntu2
  Version table:
     1.1.1f-1ubuntu2 500
        500 http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages
libssl1.1:
  Installed: 1.1.1g-1+ubuntu18.04.1+deb.sury.org+1
  Candidate: 1.1.1g-1+ubuntu18.04.1+deb.sury.org+1
  Version table:
 *** 1.1.1g-1+ubuntu18.04.1+deb.sury.org+1 100
        100 /var/lib/dpkg/status
     1.1.1f-1ubuntu2 500
        500 http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages

Revision history for this message
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 1.1.1g-1+ubuntu20.04.1+deb.sury.org+1 and this should allow installing the required dependencies for npm

Revision history for this message
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 http://dl.google.com/linux/chrome/deb stable InRelease [1,811 B]
Get:2 http://security.ubuntu.com/ubuntu focal-security InRelease [107 kB]
Hit:3 http://archive.canonical.com/ubuntu focal InRelease
Hit:4 https://deb.tableplus.com/debian tableplus InRelease
Get:5 http://dl.google.com/linux/chrome/deb stable/main amd64 Packages [1,117 B]
Hit:6 http://us.archive.ubuntu.com/ubuntu focal InRelease
Get:7 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease [111 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease [98.3 kB]
Get:9 http://security.ubuntu.com/ubuntu focal-security/main amd64 DEP-11 Metadata [21.2 kB]
Get:10 http://security.ubuntu.com/ubuntu focal-security/main amd64 c-n-f Metadata [3,268 B]
Get:11 http://security.ubuntu.com/ubuntu focal-security/universe amd64 DEP-11 Metadata [35.7 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [241 kB]
Get:13 http://us.archive.ubuntu.com/ubuntu focal-updates/main i386 Packages [125 kB]
Get:14 http://us.archive.ubuntu.com/ubuntu focal-updates/main Translation-en [95.6 kB]
Get:15 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [165 kB]
Get:16 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata [7,312 B]
Get:17 http://us.archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata [172 kB]
Get:18 http://us.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata [2,468 B]
Get:19 http://us.archive.ubuntu.com/ubuntu 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 http://ppa.launchpad.net/clipgrab-team/ppa/ubuntu focal main # disabled on upgrade to focal
/etc/apt/sources.list.d/clipgrab-team-ubuntu-ppa-bionic.list:# deb-src http://ppa.launchpad.net/clipgrab-team/ppa/ubuntu bionic main
/etc/apt/sources.list.d/obsproject-ubuntu-obs-studio-bionic.list:# deb http://ppa.launchpad.net/obsproject/obs-studio/ubuntu focal main # disabled on upgrade to focal
/etc/apt/sources.list.d/obsproject-ubuntu-obs-studio-bionic.list:# deb-src http://ppa.launchpad.net/obsproject/obs-studio/ubuntu bionic main
/etc/apt/sources.list.d/ondrej-ubuntu-apache2-bionic.list:# deb http://ppa.launchpad.net/ondrej/apache2/ubuntu focal main # disabled on upgrade to focal
/etc/apt/sources.list.d/ondrej-ubuntu-apache2-bionic.list:# deb-src http://ppa.launchpad.net/ondrej/apache2/ubuntu bionic main
/etc/apt/sources.list.d/ondrej-ubuntu-php-bionic.list:# deb http://ppa.launchpad.net/ondrej/php/ubuntu focal main # disabled on upgrade to focal
/etc/apt/sources.list.d/ondrej-ubuntu-php-bionic.list:# deb-src http://ppa.launchpad.net/ondrej/php/ubuntu bionic main

Revision history for this message
Best Manfred Hampl (m-hampl) said :
#5

I suggest that you re-enable http://ppa.launchpad.net/ondrej/php/ubuntu 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.

Revision history for this message
Pachuca (pachuca) said :
#6

Yes, it shows the upgrade like this:

libssl1.1/focal 1.1.1g-1+ubuntu20.04.1+deb.sury.org+1 amd64 [upgradable from: 1.1.1g-1+ubuntu18.04.1+deb.sury.org+1]

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 7.4.8-1+ubuntu20.04.1+deb.sury.org+3 amd64 [upgradable from: 7.4.7-1+ubuntu18.04.1+deb.sury.org+1]
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 2.3.0-2+ubuntu20.04.1+deb.sury.org+1 amd64 [upgradable from: 2.3.0-2+ubuntu18.04.1+deb.sury.org+1]
libibus-1.0-5/focal-updates 1.5.22-2ubuntu2.1 amd64 [upgradable from: 1.5.22-2ubuntu2]
libicu65/focal 65.1-1+ubuntu20.04.1+deb.sury.org+1 amd64 [upgradable from: 65.1-1+ubuntu18.04.1+deb.sury.org+1]
libidn2-0/focal 2.3.0-1+ubuntu20.04.1+deb.sury.org+2 amd64 [upgradable from: 2.3.0-1+ubuntu18.04.1+deb.sury.org+2]
libidn2-0/focal 2.3.0-1+ubuntu20.04.1+deb.sury.org+2 i386 [upgradable from: 2.3.0-1+ubuntu18.04.1+deb.sury.org+2]
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 10.35-4+ubuntu20.04.1+deb.sury.org+1 amd64 [upgradable from: 10.34-7]
libpcre2-32-0/focal 10.35-4+ubuntu20.04.1+deb.sury.org+1 amd64 [upgradable from: 10.34-7]
libpcre2-8-0/focal 10.35-4+ubuntu20.04.1+deb.sury.org+1 amd64 [upgradable from: 10.34-7+ubuntu18.04.1+deb.sury.org+1]
libpcre3/focal 2:8.44-1+ubuntu20.04.1+deb.sury.org+1 amd64 [upgradable from: 2:8.43-1+ubuntu18.04.1+deb.sury.org+1]
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 1.1.1g-1+ubuntu20.04.1+deb.sury.org+1 amd64 [upgradable from: 1.1.1g-1+ubuntu18.04.1+deb.sury.org+1]
libxml2/focal 2.9.10+dfsg-5+ubuntu20.04.1+deb.sury.org+3 amd64 [upgradable from: 2.9.10+dfsg-5+ubuntu18.04.1+deb.sury.org+3]
openssl/focal 1.1.1g-1+ubuntu20.04.1+deb.sury.org+1 amd64 [upgradable from: 1.1.1g-1+ubuntu18.04.1+deb.sury.org+1]
php-common/focal,focal 2:76+ubuntu20.04.1+deb.sury.org+9 all [upgradable from: 2:76+ubuntu18.04.1+deb.sury.org+9]
php-xml/focal,focal 2:7.4+76+ubuntu20.04.1+deb.sury.org+9 all [upgradable from: 2:7.4+76+ubuntu18.04.1+deb.sury.org+9]
php7.4-cli/focal 7.4.8-1+ubuntu20.04.1+deb.sury.org+3 amd64 [upgradable from: 7.4.7-1+ubuntu18.04.1+deb.sury.org+1]
php7.4-common/focal 7.4.8-1+ubuntu20.04.1+deb.sury.org+3 amd64 [upgradable from: 7.4.7-1+ubuntu18.04.1+deb.sury.org+1]
php7.4-json/focal 7.4.8-1+ubuntu20.04.1+deb.sury.org+3 amd64 [upgradable from: 7.4.7-1+ubuntu18.04.1+deb.sury.org+1]
php7.4-mbstring/focal 7.4.8-1+ubuntu20.04.1+deb.sury.org+3 amd64 [upgradable from: 7.4.7-1+ubuntu18.04.1+deb.sury.org+1]
php7.4-mysql/focal 7.4.8-1+ubuntu20.04.1+deb.sury.org+3 amd64 [upgradable from: 7.4.7-1+ubuntu18.04.1+deb.sury.org+1]
php7.4-opcache/focal 7.4.8-1+ubuntu20.04.1+deb.sury.org+3 amd64 [upgradable from: 7.4.7-1+ubuntu18.04.1+deb.sury.org+1]
php7.4-readline/focal 7.4.8-1+ubuntu20.04.1+deb.sury.org+3 amd64 [upgradable from: 7.4.7-1+ubuntu18.04.1+deb.sury.org+1]
php7.4-xml/focal 7.4.8-1+ubuntu20.04.1+deb.sury.org+3 amd64 [upgradable from: 7.4.7-1+ubuntu18.04.1+deb.sury.org+1]
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.

Revision history for this message
Pachuca (pachuca) said :
#7

Thanks Manfred Hampl, that solved my question.