Adding the repositories and trying to update apt in WSL with Ubuntu 18.04 LTS reports 404 Not found on some URLs even though the URLs work in a browser.
Summary
Adding the repositories and trying to update apt in WSL with Ubuntu 18.04 LTS reports 404 Not found on some URLs even though the URLs work in a browser.
Steps to reproduce
I am using WSL with Ubuntu 18.04 LTS and the guide at:
https://develop.openfoam.com/Development/openfoam/-/wikis/precompiled/windows
and in particular:
https://develop.openfoam.com/Development/openfoam/-/wikis/precompiled/debian
I am doing:
curl https://dl.openfoam.com/add-debian-repo.sh | sudo bash
and adding trusted=yes to:
deb [trusted=yes arch=amd64] https://dl.openfoam.com/repos/deb bionic main
in
/etc/apt/sources.list.d/openfoam.list
(This fixes another problem with the repositories. You can see the problem by removing trusted=yes.)
After this, shell reports 404 on some urls when doing the sudo apt-get update
even though the URL (https://downloads.sourceforge.net/project/openfoam/repos/deb/dists/bionic/main/binary-amd64/Packages?ts=gAAAAABlU0ddE33NYF2BYJCrUgKdzm3tdc4pT5s50s0bO4jq_uOT3e-imqmuDbyW9FG41PrmLX9L7rvax9Dfyt7RR5uaZ2ydbg==&use_mirror=master&r=) itself works in a browser. Full output:
sudo apt-get update
Hit:1 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Ign:5 https://sourceforge.net/projects/openfoam/files/repos/deb bionic InRelease
Ign:6 https://sourceforge.net/projects/openfoam/files/repos/deb bionic Release
Ign:7 https://dl.openfoam.com/repos/deb bionic/main amd64 Packages
Ign:8 https://dl.openfoam.com/repos/deb bionic/main all Packages
Ign:9 https://dl.openfoam.com/repos/deb bionic/main Translation-en
Ign:10 https://dl.openfoam.com/repos/deb bionic/main all c-n-f Metadata
Ign:11 https://dl.openfoam.com/repos/deb bionic/main amd64 c-n-f Metadata
Ign:7 https://dl.openfoam.com/repos/deb bionic/main amd64 Packages
Ign:8 https://dl.openfoam.com/repos/deb bionic/main all Packages
Ign:9 https://dl.openfoam.com/repos/deb bionic/main Translation-en
Ign:10 https://dl.openfoam.com/repos/deb bionic/main all c-n-f Metadata
Ign:11 https://dl.openfoam.com/repos/deb bionic/main amd64 c-n-f Metadata
Ign:7 https://dl.openfoam.com/repos/deb bionic/main amd64 Packages
Ign:8 https://dl.openfoam.com/repos/deb bionic/main all Packages
Ign:9 https://dl.openfoam.com/repos/deb bionic/main Translation-en
Ign:10 https://dl.openfoam.com/repos/deb bionic/main all c-n-f Metadata
Ign:11 https://dl.openfoam.com/repos/deb bionic/main amd64 c-n-f Metadata
Ign:9 https://dl.openfoam.com/repos/deb bionic/main Translation-en
Ign:10 https://dl.openfoam.com/repos/deb bionic/main all c-n-f Metadata
Ign:11 https://dl.openfoam.com/repos/deb bionic/main amd64 c-n-f Metadata
Ign:9 https://dl.openfoam.com/repos/deb bionic/main Translation-en
Ign:10 https://dl.openfoam.com/repos/deb bionic/main all c-n-f Metadata
Ign:11 https://dl.openfoam.com/repos/deb bionic/main amd64 c-n-f Metadata
Ign:9 https://dl.openfoam.com/repos/deb bionic/main Translation-en
Ign:10 https://dl.openfoam.com/repos/deb bionic/main all c-n-f Metadata
Ign:11 https://dl.openfoam.com/repos/deb bionic/main amd64 c-n-f Metadata
Ign:9 https://dl.openfoam.com/repos/deb bionic/main Translation-en
Ign:10 https://dl.openfoam.com/repos/deb bionic/main all c-n-f Metadata
Ign:11 https://dl.openfoam.com/repos/deb bionic/main amd64 c-n-f Metadata
Ign:7 https://sourceforge.net/projects/openfoam/files/repos/deb bionic/main amd64 Packages
Ign:7 https://sourceforge.net/projects/openfoam/files/repos/deb bionic/main amd64 Packages
Ign:7 https://dl.openfoam.com/repos/deb bionic/main amd64 Packages
Ign:7 https://dl.openfoam.com/repos/deb bionic/main amd64 Packages
Ign:8 https://sourceforge.net/projects/openfoam/files/repos/deb bionic/main all Packages
Ign:8 https://sourceforge.net/projects/openfoam/files/repos/deb bionic/main all Packages
Ign:8 https://dl.openfoam.com/repos/deb bionic/main all Packages
Ign:8 https://dl.openfoam.com/repos/deb bionic/main all Packages
Err:7 https://sourceforge.net/projects/openfoam/files/repos/deb bionic/main amd64 Packages
404 Not Found [IP: 82.71.205.33 443]
Reading package lists... Done
E: Failed to fetch https://downloads.sourceforge.net/project/openfoam/repos/deb/dists/bionic/main/binary-amd64/Packages?ts=gAAAAABlU0ddE33NYF2BYJCrUgKdzm3tdc4pT5s50s0bO4jq_uOT3e-imqmuDbyW9FG41PrmLX9L7rvax9Dfyt7RR5uaZ2ydbg==&use_mirror=master&r= 404 Not Found [IP: 82.71.205.33 443]
E: Failed to fetch https://downloads.sourceforge.net/project/openfoam/repos/deb/dists/bionic/main/binary-all/Packages?ts=gAAAAABlU0ddOvkkOuXCeg05riwpnOabnmAYq42Yl6AoBItkbuf95la7On9UFcH_JnZb9QeAH4IobNvAs2ekXvWON2UqNm0oVQ==&use_mirror=master&r= 404 Not Found [IP: 82.71.205.33 443]
E: Some index files failed to download. They have been ignored, or old ones used instead.
Example case
What is the current bug behaviour?
What is the expected correct behavior?
No errors.
Relevant logs and/or images
Environment information
- OpenFOAM version : v2306
- Operating system : WSL Ubuntu 18.04 LTS
- Hardware info :
- Compiler :
Possible fixes
Based on some threads like:
https://unix.stackexchange.com/questions/148303/apt-get-install-gives-404-not-found-but-url-works
it could be a bug with apt.
Or it could be a problem with the installer script.