Sunday, May 12, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 1193  / 1 Year ago, wed, april 26, 2023, 9:29:52

I have been trying to install npm on a server running Ubuntu 20.04 and I keep getting 403 Forbidden for the npm package


E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/universe/n/npm/npm_6.14.4+ds-   1ubuntu2_all.deb  403  Forbidden [IP: 91.189.88.152 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Installing other software, like for example nodejs, worked fine, so I suspected it might've been just a server issue. I've tried again today, several days after my first attempt, but no luck.

I've changed the mirrors from my local repositories (AU) to the main one, and then tried also with third country (US), but I still get 403.


Running sudo apt upgrade --fix-missing also results in a 403 error:


E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/l/linux/linux-headers-5.4.0-65-generic_5.4.0-65.73_amd64.deb  403  Forbidden [IP: 91.189.88.142 80]

I've also cleaned up the lists by running sudo rm /var/list/apt/lists/* -rf but that didn't help either.


Any suggestion would be appreciated, I'm not sure where to go fro here.


More From » apt

 Answers
2

It turned out the firewall in the offic was blocking some packages because they had .cmd files in them, and npm was one of these. Once the system admin found that rule I was able to install npm.


[#2007] Friday, April 28, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
terneive

Total Points: 329
Total Questions: 117
Total Answers: 105

Location: Denmark
Member since Tue, Oct 18, 2022
2 Years ago
;