Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apt update error: The repository does not have a Release file #6174

Open
cnc-bdibene opened this issue Jan 9, 2022 · 5 comments
Open

apt update error: The repository does not have a Release file #6174

cnc-bdibene opened this issue Jan 9, 2022 · 5 comments
Labels

Comments

@cnc-bdibene
Copy link

cnc-bdibene commented Jan 9, 2022

Almost identical to #5405
Similar: dotnet/core#6381

WSL2 (Ubuntu 20.04 "focal") on Windows10

Running 'sudo apt update' or 'sudo apt-get update' result in

Ign:8 https://packages.microsoft.com/ubuntu/20.04/prod/dists focal InRelease Get:9 http://archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB] **Err:10** https://packages.microsoft.com/ubuntu/20.04/prod/dists focal Release **404 Not Found [IP: 13.93.224.173** 443] Reading package lists... Done **E: The repository 'https://packages.microsoft.com/ubuntu/20.04/prod/dists 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.

Per https://docs.microsoft.com/en-us/windows-server/administration/linux-package-repository-for-microsoft-software,
I ran
curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc

and the PGP key successfully loads.

The next command
sudo apt-add-repository https://packages.microsoft.com/ubuntu/20.04/prod
results in the same error as above.

I can curl the 'Release' file successfully:
curl -sSL https://packages.microsoft.com/ubuntu/20.04/prod/dists/focal/Release
which gives me
Origin: microsoft-ubuntu-focal-prod focal Label: microsoft-ubuntu-focal-prod focal Suite: focal Codename: focal Date: Fri, 7 Jan 2022 06:09:36 UTC Architectures: amd64 arm64 armhf Components: main Description: Generated by aptly

...followed by a series of files, including 'main/binary-amd64/Release'

$ telnet packages.microsoft.com 443 Trying 13.93.224.173... Connected to csd-apt-wus-d-2.westus.cloudapp.azure.com. Escape character is '^]'. Connection closed by foreign host.

This has been happening for months, so is not a temporary "try again later" type issue.

@PRMerger4 PRMerger4 added the Pri3 label Jan 9, 2022
@lizfrank
Copy link

Is there a fix for this issue yet?

@oscartorres9
Copy link

image

still suck in ubuntu20.04,totally not working

@lizfrank
Copy link

The problem is that apt reads the files in /etc/apt/sources.list.d to get the list of URLs for software downloads. It reads these files whether or not it needs anything from those sites and attempts to contact them. The site in the file names mssql-release.list no longer exists and apt fails. I added a command in Dockerfile to remove that file and everything worked:

RUN rm /etc/apt/sources.list.d/mssql-release.list

@lnaie
Copy link

lnaie commented Sep 22, 2023

It does the same on raspi model 4 with the raspi os. It's sad. :)

@dcooper94
Copy link

If you run do-realease-upgrade this may fix it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants