0

I have installed coc.nvim and am now installing the dependencies. To do this I need to install npm. The command I'm using to install npm is sudo apt-get install npm. However, I get this error when installing it:

Ign:1 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 linux-libc-dev amd64 5.4.0-90.101
Err:1 http://security.ubuntu.com/ubuntu focal-updates/main amd64 linux-libc-dev amd64 5.4.0-90.101
  404  Not Found [IP: 91.189.88.142 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/l/linux/linux-libc-dev_5.4.0-90.101_amd64.deb  404  Not Found [IP: 91.189.88.142 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

I have tried running apt-get update but I keep getting this error:

E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)
W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)

How do I install npm?

1 Answer 1

0

as you can see the version 5.4.0-90.101 isn't available on the server (404 status code). Had the same problem while installing build-essentials.

Workaround is to set the package version to a fixed number. In my case I set it to 5.4.0-26.30 (current Ubuntu Main repository). With that it's working. If you need a newer version of this package you can add the proposed main or updates main repository to your list and go for the 5.4.0-92.103 version.

It's important to choose the right version because there are two archs there.

Command for specified package version install: apt install -y linux-libc-dev=5.4.0-26.30

You can find more information here: https://ubuntu.pkgs.org/20.04/ubuntu-updates-main-arm64/linux-libc-dev_5.4.0-91.102_arm64.deb.html

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .