0

I am trying to install node js with npm. Node js is installed but when I try to install npm using the command "sudo apt install npm", it shows an error saying:

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies: libssl-dev : Depends: libssl3 (= 3.0.2-0ubuntu1.2) but 3.0.2-0ubuntu1.5 is to be installed E: Unable to correct problems, you have held broken packages.

  • Your output suggests that you did not run sudo apt update recently. – user535733 Jun 22 '22 at 03:58
  • @user535733 I did. – Pankaj Chauhan Jun 22 '22 at 04:01
  • You've not provided any OS/release details; but I'd agree with prior advice.. Did you check for any missing lines, warnings etc running sudo apt update as if you're using jammy your paste shows outdated details - libssl3 | 3.0.2-0ubuntu1.5 | jammy-updates | amd64, arm64, armhf, i386, ppc64el, riscv64, s390x – guiverc Jun 22 '22 at 04:12
  • @guiverc fixed it using command "sudo apt install libssl3=3.0.2-0ubuntu1.2". Should I also use "sudo apt install libssl3=3.0.2-0ubuntu1.5" ? – Pankaj Chauhan Jun 22 '22 at 04:16

0 Answers0