I'm trying to install ROS on Ubuntu. I'm getting this error:
sudo apt-get update
Hit:1 http://pk.archive.ubuntu.com/ubuntu cosmic InRelease
Hit:2 http://pk.archive.ubuntu.com/ubuntu cosmic-updates InRelease
Hit:3 http://pk.archive.ubuntu.com/ubuntu cosmic-backports InRelease
Get:4 http://security.ubuntu.com/ubuntu cosmic-security InRelease [83.2 kB]
Ign:5 http://packages.ros.org/ros/ubuntu cosmic InRelease Err:6 http://packages.ros.org/ros/ubuntu cosmic Release 404 Not Found [IP: 64.50.236.52 80] Reading package lists... Done
E: The repository 'http://packages.ros.org/ros/ubuntu cosmic 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.
You'll need to adjust your sources. list file then run sudo apt-get update then sudo apt-get upgrade . Just make sure in /etc/apt/sources. list you have http://old.releases.ubuntu.com for all the repositories.
The Release file lists the index files for the distribution and their hashes (the index file listed are relative to Release file location). To download the index of the main component, apt would scan the Release file for hashes of files in the main directory. eg.
You need to update your repository targets to the Focal Fossa (20.04) release of Ubuntu. This can be done like so:
sudo sed -i -e 's|disco|focal|g' /etc/apt/sources.list
sudo apt update
As described here, you need to edit (as root) the file /etc/apt/sources.list
(the easiest way to do this is to type sudo gedit /etc/apt/sources.list
). On the line that mentions http://packages.ros.org/ros/ubuntu you need to add [trusted=yes]
after the word deb
(you might need to add it as a separate word). Then save the file and try again.
#For Unable to 'apt update' my Ubuntu 19.04
The repositories for older releases that are not supported (like 11.04, 11.10 and 13.04) get moved to an archive server. There are repositories available at http://old-releases.ubuntu.com.
first break up this file
cp /etc/apt/sources.list /etc/apt/sources.list.bak
sudo sed -i -re 's/([a-z]{2}\.)?archive.ubuntu.com|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
then
sudo apt-get update && sudo apt-get dist-upgrade
I opened up my Software & Updates program
and switched from my country to the main servers like so:
After I done this and run the sudo apt update
commando again, my problems where gone.
Make sure your /etc/apt/sources.list has http://old-releases.ubuntu.com instead of in.archive
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With