Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Repository does not have a release file" error [closed]

Tags:

ubuntu

ros

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.
like image 545
Suleman Khan Avatar asked Dec 16 '18 06:12

Suleman Khan


People also ask

How do I fix repository in Linux?

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.

What is a release file?

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.


5 Answers

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
like image 131
Bhupesh Parakh Avatar answered Oct 16 '22 08:10

Bhupesh Parakh


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.

like image 65
Robin Green Avatar answered Oct 16 '22 07:10

Robin Green


#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
like image 48
Sagar Jethi Avatar answered Oct 16 '22 06:10

Sagar Jethi


I opened up my Software & Updates program and switched from my country to the main servers like so:
Software & Updates screen

After I done this and run the sudo apt update commando again, my problems where gone.

like image 11
SteZZz Avatar answered Oct 16 '22 06:10

SteZZz


Make sure your /etc/apt/sources.list has http://old-releases.ubuntu.com instead of in.archive

like image 11
srujan kumar Avatar answered Oct 16 '22 08:10

srujan kumar