jph98
By:
jph98

Package Install - Mirror - Failed to fetch - 403 Forbidden

July 6, 2016 2.5k views
Linux Basics Configuration Management Ubuntu

I'm getting the following when trying to install the htop package on Ubuntu 14.04...

The following NEW packages will be installed:
  htop
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 68.0 kB of archives.
After this operation, 188 kB of additional disk space will be used.
Err http://mirrors.digitalocean.com/ubuntu/ trusty/universe htop amd64 1.0.2-3
  403  Forbidden [IP: 95.x.x.x 80]
E: Failed to fetch http://mirrors.digitalocean.com/ubuntu/pool/universe/h/htop/htop_1.0.2-3_amd64.deb  403  Forbidden [IP: 95.x.x.x 80]

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
3 Answers

Our team is working to resolve an issue with the mirrors that occurred this morning due to an issue with the latest upstream sync. The mirror maintainers are working to update it and resolve this issue now.

  • No worries. We have a product go-live, but I can stick with my currently "hand-built" server until this is resolved and I get my cloud init scripts in order. Can you please please reply when this is complete. Thanks in advance.

@jph98

If the DigitalOcean repositories aren't working, you can edit /etc/apt/sources.list, comment out the DigitalOcean repos and then paste in (for Ubuntu 14.04 - trusty):

#+ Ubuntu Main Repos
deb http://01.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse 
deb-src http://01.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse 

#+ Ubuntu Update Repos
deb http://01.archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse 
deb http://01.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse 
deb http://01.archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse 
deb http://01.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse 
deb-src http://01.archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse 
deb-src http://01.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse 
deb-src http://01.archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse 
deb-src http://01.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse 

Then run:

apt-get update

Followed by:

apt-get install -y htop

This will pull from the main Ubuntu repositories.

You could also simply:

cp /etc/apt/sources.list /usr/local/src/sources.list \
&& rm /etc/apt/sources.list \
&& nano /etc/apt/sources.list

... and then paste in the above, run the update and then install htop. This copies sources.list so you have a backup.

I am having the same issue trying to install nodejs.

sudo apt-get install -y nodejs
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  rlwrap
The following NEW packages will be installed:
  nodejs rlwrap
0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded.
Need to get 73.4 kB/9,475 kB of archives.
After this operation, 47.2 MB of additional disk space will be used.
Err http://mirrors.digitalocean.com/ubuntu/ trusty/universe rlwrap amd64 0.37-5
  403  Forbidden [IP: x.x.x.x 80]
E: Failed to fetch http://mirrors.digitalocean.com/ubuntu/pool/universe/r/rlwrap/rlwrap_0.37-5_amd64.deb  403  Forbidden [IP: x.x.x.x 80]

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Can anyone help?

  • @nattinank - Please see my comment above with the alternative repositories.

    Alternatively, and what I recommend (specifically for NodeJS), I would use NodeSources' repo. They work well and when I install NodeJS, it's my go-to.

    For Ubuntu

    curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - \
    && sudo apt-get install -y nodejs
    

    For Debian

    curl -sL https://deb.nodesource.com/setup_6.x | bash - \
    && apt-get install -y nodejs
    

    Just copy and paste one of those in to the CLI (according the OS your Droplet was setup with), hit enter and let it run its course. It will handle the installation entirely and you can then run:

    which node
    

    To verify the installation.

Have another answer? Share your knowledge.