sudo apt-get update fail on Ubuntu 17.04 - linux

While running the sudo apt-get update on ubuntu 17.04 Zesty Zapus, I am getting the following error. I have posted on the error lines. I wanted to install python libraries like matplotlib and tkinter which failed to installed because above command wasn't running succesfully. Please suggest me what to do.
Err:9 http://security.ubuntu.com/ubuntu zesty-security/main amd64 Packages
404 Not Found [IP: 2001:67c:1560:8001::14 80]
Err:25 http://in.archive.ubuntu.com/ubuntu zesty/main i386 Packages
404 Not Found [IP: 2001:67c:1360:8001::21 80]
Err:81 http://in.archive.ubuntu.com/ubuntu zesty-updates/main amd64 Packages
404 Not Found [IP: 2001:67c:1360:8001::21 80]
Err:113 http://in.archive.ubuntu.com/ubuntu zesty-backports/main amd64 Packages
404 Not Found [IP: 2001:67c:1360:8001::21 80]
Reading package lists... Done
W: The repository 'http://security.ubuntu.com/ubuntu zesty-security Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: The repository 'http://in.archive.ubuntu.com/ubuntu zesty Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: The repository 'http://in.archive.ubuntu.com/ubuntu zesty-updates Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: The repository 'http://in.archive.ubuntu.com/ubuntu zesty-backports Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/zesty-security/main/binary-amd64/Packages 404 Not Found [IP: 2001:67c:1560:8001::14 80]
E: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/zesty/main/binary-i386/Packages 404 Not Found [IP: 2001:67c:1360:8001::21 80]
E: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/zesty-updates/main/binary-amd64/Packages 404 Not Found [IP: 2001:67c:1360:8001::21 80]
E: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/zesty-backports/main/binary-amd64/Packages 404 Not Found [IP: 2001:67c:1360:8001::21 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.

you can solve it by: just replace us.archive.ubuntu.com and security.ubuntu.com in /etc/apt/sources.list with old-releases.ubuntu.com and then you'll be able to finish updating.
refer to source 1 and ubuntu forum
it work for me

In my case:
sed -e 's/archive.ubuntu.com/old-releases.ubuntu.com/g' -i /etc/apt/sources.list
sed -e 's/security.ubuntu.com/old-releases.ubuntu.com/g' -i /etc/apt/sources.list

In my case, I was able to download some of the packages by doing the following:
I had to replace "us.archive.ubuntu.com" and "security.ubuntu.com" in /etc/apt/sources.list WITH "old-releases.ubuntu.com" and then I was able to finish downloading some of the packages, like Ayush Kumar said.
For the other updates that were listed by my Hosting company, Linode, I used the following:
I had to use the --allow-unauthenticated flag with sudo apt-get update.
sudo apt-get update --allow-unauthenticated
Then I was able to finish updating.

17.04 isn't getting further support from Ubuntu. So, the solution that worked for me was to upgrade it to 17.10 as none other solutions helped.

Related

I get an error when i try apt-get update?

I'm trying to update my server with apt-get update and this error shows up...
My Server runs on Ubuntu 18.04
Ign:1 https://packages.sury.org/php bionic InRelease
Err:2 https://packages.sury.org/php bionic Release
404 Not Found [IP: 138.199.37.227 443]
Ign:3 http://old-releases.ubuntu.com/ubuntu bionic InRelease
Hit:4 http://ppa.launchpad.net/ondrej/php/ubuntu bionic InRelease
Ign:5 http://old-releases.ubuntu.com/ubuntu bionic-updates InRelease
Ign:6 http://old-releases.ubuntu.com/ubuntu bionic-security InRelease
Err:7 http://old-releases.ubuntu.com/ubuntu bionic Release
404 Not Found [IP: 185.125.190.40 80]
Err:8 http://old-releases.ubuntu.com/ubuntu bionic-updates Release
404 Not Found [IP: 185.125.190.40 80]
Err:9 http://old-releases.ubuntu.com/ubuntu bionic-security Release
404 Not Found [IP: 185.125.190.40 80]
Hit:10 https://packagecloud.io/pufferpanel/pufferpanel/ubuntu bionic InRelease
Reading package lists... Done
E: The repository 'https://packages.sury.org/php bionic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://old-releases.ubuntu.com/ubuntu bionic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://old-releases.ubuntu.com/ubuntu bionic-updates Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://old-releases.ubuntu.com/ubuntu bionic-security Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Does anybody know how i can fix that?
It looks like you are using repositories that do not contain this version of ubuntu (http://old-releases.ubuntu.com/ubuntu) and others designed for Debian (https://packages.sury.org/php).
I recommend you edit your /etc/apt/sources.list file, replace the content with the one you can find in this repository and then try with:
apt update

Updating from such a repository can't be done securely and repository is not signed errors

I run sudo apt-get update then I get this error
Hit:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 https://deb.nodesource.com/node_16.x focal InRelease
Err:3 http://ph.archive.ubuntu.com/ubuntu focal InRelease
403 Forbidden [IP: 202.79.184.254 80]
Err:4 http://ph.archive.ubuntu.com/ubuntu focal-updates InRelease
403 Forbidden [IP: 202.79.184.254 80]
Hit:5 http://security.ubuntu.com/ubuntu focal-security InRelease
Err:6 http://ph.archive.ubuntu.com/ubuntu focal-backports InRelease
403 Forbidden [IP: 202.79.184.254 80]
Hit:7 http://ppa.launchpad.net/openjdk-r/ppa/ubuntu focal InRelease
Hit:8 http://ppa.launchpad.net/otto-kesselgulasch/gimp/ubuntu focal InRelease
Hit:9 http://ppa.launchpad.net/sylvain-pineau/kazam/ubuntu focal InRelease
Reading package lists... Done
N: See apt-secure(8) manpage for repository creation and user configuration details.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
E: The repository 'http://ph.archive.ubuntu.com/ubuntu focal InRelease' is not signed.
E: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/focal/InRelease 403 Forbidden [IP: 202.79.184.254 80]
E: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease 403 Forbidden [IP: 202.79.184.254 80]
E: The repository 'http://ph.archive.ubuntu.com/ubuntu focal-updates InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease 403 Forbidden [IP: 202.79.184.254 80]
E: The repository 'http://ph.archive.ubuntu.com/ubuntu focal-backports InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
I tried searching everywhere and checked related topics but none seems working.
How do I resolve this?
I have passed through the same problem. The solution was to change my internet connection. The problem seem to have been the firewalls in my corporation network that gave me the same exact messages, including the IP address that you've pasted.
I changed my network connection to a different one and that worked for me. I think firewall of the first network disabled updates to save bandwidths or something like that.
Had the same error but with a different repository.
Try this out if it works for you.
ls /etc/apt/sources.list.d
listing the repositories.
rm -i /etc/apt/sources.list.d/output of 1
Then of course run.
apt upgrade
More details in the screenshots in these links.

unable to install the latest nodejs

I have tried many ways, via nvm etc.. nodejs stays stubbornly at v10 which is outdated, what could i do?
Err:12 http://ppa.launchpad.net/ubuntu-vn/ppa/ubuntu focal Release
404 Not Found [IP: 2001:67c:1560:8008::19 80]
Err:13 https://deb.nodesource.com/node_8.x focal Release
404 Not Found [IP: 2001:ee0:3244::71ab:c39 443]
Reading package lists... Done
E: The repository 'http://ppa.launchpad.net/ubuntu-vn/ppa/ubuntu focal Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'https://deb.nodesource.com/node_8.x focal Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
i used nvm install --lts and it worked

Cannot upgrade node and hence not able to install npm AND #angular/cli on ubuntu16.04LTS

Nodejs is installed already, and it can be concluded by nodejs --version output.
Also, please note when I tried to upgrade node, I was getting the below error while doing apt-get update:
sudo apt-get update
.
..
Err:13 http://extras.ubuntu.com/ubuntu xenial/main Sources
404 Not Found [IP: 91.189.92.152 80]
Ign:17 http://extras.ubuntu.com/ubuntu xenial/main amd64 Packages
Ign:20 http://extras.ubuntu.com/ubuntu xenial/main i386 Packages
Ign:22 http://extras.ubuntu.com/ubuntu xenial/main all Packages
Ign:23 http://extras.ubuntu.com/ubuntu xenial/main Translation-en_US
Ign:24 http://extras.ubuntu.com/ubuntu xenial/main Translation-en
Ign:25 http://extras.ubuntu.com/ubuntu xenial/main amd64 DEP-11 Metadata
Ign:26 http://extras.ubuntu.com/ubuntu xenial/main DEP-11 64x64 Icons
Fetched 204 kB in 12s (16.5 kB/s)
Reading package lists... Done
W: The repository 'http://extras.ubuntu.com/ubuntu xenial Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/xenial/main/source/Sources 404 Not Found [IP: 91.189.92.152 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
Not sure what the issue is, however guessing some name conflict as I read somewhere ubuntu also has some package named 'node', however need to get through this.
Thanks in advance.
Surprisingly, Ubuntu 16.04 was the only culprit here.
If you visit the ubuntu package here, it looks like xenial package is not present.
I fixed this by commenting this in sources.list.
So the fix here is:
Open file /etc/apt/sources.list.
Comment all the lines which have
this url: http://extras.ubuntu.com/ubuntu .
As these packages are not
actual ubuntu source, we shouldn't have any impact by commenting it out.
PS: Also created one gist here for tracking this issue with ubuntu 16.04LTS.

Failed to download kernel source

Failed to download linux kernel source. What is wrong?
root#vagrant-ubuntu-trusty-64:/vagrant/pkgs# apt-get source linux-image-$(uname -r)
Reading package lists... Done
Building dependency tree
Reading state information... Done
Picking 'linux' as source package instead of 'linux-image-3.13.0-37-generic'
NOTICE: 'linux' packaging is maintained in the 'Git' version control system at:
http://kernel.ubuntu.com/git-repos/ubuntu/ubuntu-trusty.git
Need to get 125 MB of source archives.
Err http://archive.ubuntu.com/ubuntu/ trusty-updates/main linux 3.13.0-40.69 (dsc)
404 Not Found [IP: 91.189.88.149 80]
Get:1 http://archive.ubuntu.com/ubuntu/ trusty-updates/main linux 3.13.0-40.69 (tar) [116 MB]
Err http://archive.ubuntu.com/ubuntu/ trusty-updates/main linux 3.13.0-40.69 (diff)
404 Not Found [IP: 91.189.88.149 80]
Fetched 116 MB in 46s (2,494 kB/s)
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/l/linux/linux_3.13.0-40.69.dsc 404 Not Found [IP: 91.189.88.149 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/l/linux/linux_3.13.0-40.69.diff.gz 404 Not Found [IP: 91.189.88.149 80]
E: Failed to fetch some archives.
I am using standard Ubuntu 14.04
root#vagrant-ubuntu-trusty-64:/vagrant/pkgs# more /etc/issue
Ubuntu 14.04.1 LTS \n \l
I believe that NOTICE: 'linux' packaging is maintained in the 'Git' version control system at:
http://kernel.ubuntu.com/git-repos/ubuntu/ubuntu-trusty.git is fairly straightforward. If you already have git installed use
git clone http://kernel.ubuntu.com/git-repos/ubuntu/ubuntu-trusty.git
Otherwise, install git first
sudo apt-get install git

Resources