2

I'm trying to install Visual Studio Code on Ubuntu-Desktop 16.04 LTS with command

sudo dpkg -i code_1.27.2-1536736588_amd64.deb

but it has some dependencies:

 code depends on libnss3 (>= 2:3.26); however:
  Version of libnss3:amd64 on system is 2:3.21-1ubuntu4.

Then I run

sudo apt-get update

and have the problem in header of this question after that.I'm trying then:

sudo apt-get install libnss3

with result:

The following packages have unmet dependencies:
libnss3 : Depends:
        libnspr4 (>= 2:4.12) but 2:4.11-1ubuntu1 is to be installed 
libnss3-1d : Depends:
        libnss3 (= 2:3.21-1ubuntu4) but 2:3.28.4-0ubuntu0.16.04.3 is to be installed
libnss3-nssdb : Depends:
        libnss3 (= 2:3.21-1ubuntu4) but 2:3.28.4-0ubuntu0.16.04.3 is to be installed

How to rend this hell cycle?

UPDATE 21 Sep 2018

I'm trying with this command and get the same message about dependency libnss3:

sudo apt install snapd-xdg-open
Zanna
  • 70,465
FAQ
  • 121

2 Answers2

3

You should fix broken dependencies, see corresponding part of man apt-get below:

-f, --fix-broken
Fix; attempt to correct a system with broken dependencies in place. This option, when used with install/remove, can omit any packages to permit APT to deduce a likely solution. If packages are specified, these have to completely correct the problem. The option is sometimes necessary when running APT for the first time; APT itself does not allow broken package dependencies to exist on a system.
It is possible that a system's dependency structure can be so corrupt as to require manual intervention (which usually means using dpkg --remove to eliminate some of the offending packages). Use of this option together with -m may produce an error in some situations. Configuration Item: APT::Get::Fix-Broken.

The complete command is as follows:

sudo apt-get install -f
N0rbert
  • 99,918
0

I get this error when I download the wrong Visual Studio Code distro.

At a glance, amd64 almost looks like arm64.

Anyhow, you can check your chip first: dpkg --print-architecture

nsolent
  • 101