1

I am running into 404 errors when trying to install clang and libclang-dev packages using ‘apt install’ on PureOS.

I am seeing the following error messages when running the command sudo apt install clang

Err:1 https://repo.pureos.net/pureos amber/main amd64 libclang-common-7-dev amd64 1:7.0.1-8
404 Not Found [IP: 138.201.228.45 443]
Err:2 https://repo.pureos.net/pureos amber/main amd64 libclang1-7 amd64 1:7.0.1-8
404 Not Found [IP: 138.201.228.45 443]
Err:3 https://repo.pureos.net/pureos amber/main amd64 clang-7 amd64 1:7.0.1-8
404 Not Found [IP: 138.201.228.45 443]
Err:4 https://repo.pureos.net/pureos amber/main amd64 libomp5-7 amd64 1:7.0.1-8
404 Not Found [IP: 138.201.228.45 443]
Err:5 https://repo.pureos.net/pureos amber/main amd64 libomp-7-dev amd64 1:7.0.1-8
404 Not Found [IP: 138.201.228.45 443]
Err:6 https://repo.pureos.net/pureos amber/main amd64 llvm-7-runtime amd64 1:7.0.1-8
404 Not Found [IP: 138.201.228.45 443]
Err:7 https://repo.pureos.net/pureos amber/main amd64 llvm-7 amd64 1:7.0.1-8
404 Not Found [IP: 138.201.228.45 443]
Err:8 https://repo.pureos.net/pureos amber/main amd64 llvm-7-dev amd64 1:7.0.1-8
404 Not Found [IP: 138.201.228.45 443]
E: Failed to fetch https://repo.pureos.net/pureos/pool/main/l/llvm-toolchain-7/libclang-common-7-dev_7.0.1-8_amd64.deb 404 Not Found [IP: 138.201.228.45 443]
E: Failed to fetch https://repo.pureos.net/pureos/pool/main/l/llvm-toolchain-7/libclang1-7_7.0.1-8_amd64.deb 404 Not Found [IP: 138.201.228.45 443]
E: Failed to fetch https://repo.pureos.net/pureos/pool/main/l/llvm-toolchain-7/clang-7_7.0.1-8_amd64.deb 404 Not Found [IP: 138.201.228.45 443]
E: Failed to fetch https://repo.pureos.net/pureos/pool/main/l/llvm-toolchain-7/libomp5-7_7.0.1-8_amd64.deb 404 Not Found [IP: 138.201.228.45 443]
E: Failed to fetch https://repo.pureos.net/pureos/pool/main/l/llvm-toolchain-7/libomp-7-dev_7.0.1-8_amd64.deb 404 Not Found [IP: 138.201.228.45 443]
E: Failed to fetch https://repo.pureos.net/pureos/pool/main/l/llvm-toolchain-7/llvm-7-runtime_7.0.1-8_amd64.deb 404 Not Found [IP: 138.201.228.45 443]
E: Failed to fetch https://repo.pureos.net/pureos/pool/main/l/llvm-toolchain-7/llvm-7_7.0.1-8_amd64.deb 404 Not Found [IP: 138.201.228.45 443]
E: Failed to fetch https://repo.pureos.net/pureos/pool/main/l/llvm-toolchain-7/llvm-7-dev_7.0.1-8_amd64.deb 404 Not Found [IP: 138.201.228.45 443]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

similar happens with libclang-dev:

Err:1 https://repo.pureos.net/pureos amber/main amd64 libclang1-7 amd64 1:7.0.1-8
404 Not Found [IP: 138.201.228.45 443]
Err:2 https://repo.pureos.net/pureos amber/main amd64 libclang-common-7-dev amd64 1:7.0.1-8
404 Not Found [IP: 138.201.228.45 443]
Err:3 https://repo.pureos.net/pureos amber/main amd64 libclang-7-dev amd64 1:7.0.1-8
404 Not Found [IP: 138.201.228.45 443]
E: Failed to fetch https://repo.pureos.net/pureos/pool/main/l/llvm-toolchain-7/libclang1-7_7.0.1-8_amd64.deb 404 Not Found [IP: 138.201.228.45 443]
E: Failed to fetch https://repo.pureos.net/pureos/pool/main/l/llvm-toolchain-7/libclang-common-7-dev_7.0.1-8_amd64.deb 404 Not Found [IP: 138.201.228.45 443]
E: Failed to fetch https://repo.pureos.net/pureos/pool/main/l/llvm-toolchain-7/libclang-7-dev_7.0.1-8_amd64.deb 404 Not Found [IP: 138.201.228.45 443]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Browsing the https://repo.pureos.net/pureos/pool/main/l/llvm-toolchain-7, I can see the packages are there, but all of them have a “+deb10u2” included in the name. For example, if you look at the first 404 you'll see apt is trying to find a package with the name libclang-common-7-dev_7.0.1-8_amd64.deb, but the package on the repository is named libclang-common-7-dev_7.0.1-8+deb10u2_amd64.deb.

I only face this problem with these two specific packages, I've used apt to install several other packages and everything worked fine.

I already tried the solutions suggested by apt (“maybe run apt-get update or try with --fix-missing?”). In fact, when I try running apt install with --fix-missing, I get an additional error line which says: “Unable to correct missing packages.”

I also tried using apt-get instead, and I also tried running a clean, update and upgrade before installing the package with both apt and apt-get, but also without success.

1 Answer 1

0

What you need to do is temporarily move the sources.list file out of APT's directory, run apt update (this, I guess, will refresh the cached data), move the file back and run apt update again. Essentially:

$ sudo mv /etc/apt/sources.list /tmp/
$ sudo apt update
$ sudo mv /tmp/sources.list /etc/apt/
$ sudo apt update

Now you should be able to fetch packages normally.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.