Can't install clang and libclang-dev packages using 'apt install'

Hi, 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 URL, I can see the packages are there, but all of them have a ā€œ+deb10u2ā€ included in the name (libclang-common-7-dev_7.0.1-8+deb10u2_amd64.deb, which is different from the file name on the first URL libclang-common-7-dev_7.0.1-8_amd64.deb for example).

Is this something configured incorrectly on my system? If so, could anyone provide me some help on how to solve it?

PS: 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.ā€

PSS: This problem only happens with these 2 packages. I was able to successfully install several other packages without any issues

And you already did? :

sudo apt-get clean
sudo apt-get update

Just tried running sudo apt-get clean and then sudo apt-get update, but when running sudo apt install clang afterwards I still get the same error messages

:frowning: yea ok. I am on Byzantium and it works, I am no help to you.

Is the - between apt and get necessary? I donā€™t use the dash on Mint . The - causes me problems.

In my case it is, otherwise I get the error:

sudo: aptget: command not found

sudo apt get

itā€™s apt-get install clang

apt and apt-get are not the same tool

I understand. But it works on Mint without the - between the apt and the get. Different OS(distros?) use different syntax huh?

Im lazy so i sudo to root
And i stopped using apt-get because of something that Parrot told me.
( the distro not the bird )
I donā€™t remember what it was but I stopped using apt-get

Anyway - it works for me.
Wish i could be more helpful.

root@_____:~# apt install libclang-dev
Reading package listsā€¦ Done
Building dependency tree
Reading state informationā€¦ Done
The following packages were automatically installed and are no longer required:
libappindicator3-1 libindicator3-7 lightning purebrowser
Use ā€˜apt autoremoveā€™ to remove them.
The following additional packages will be installed:
libclang-7-dev
The following NEW packages will be installed:
libclang-7-dev libclang-dev
0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded.
Need to get 13.7 MB of archives.
After this operation, 126 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 https://repo.pureos.net/pureos amber/main amd64 libclang-7-dev amd64 1:7.0.1-8+deb10u2 [13.7 MB]
Get:2 https://repo.pureos.net/pureos amber/main amd64 libclang-dev amd64 1:7.0-47 [7,088 B]
Fetched 13.7 MB in 4s (3,443 kB/s)
Selecting previously unselected package libclang-7-dev.
(Reading database ā€¦ 381069 files and directories currently installed.)
Preparing to unpack ā€¦/libclang-7-dev_1%3a7.0.1-8+deb10u2_amd64.deb ā€¦
Unpacking libclang-7-dev (1:7.0.1-8+deb10u2) ā€¦
Selecting previously unselected package libclang-dev.
Preparing to unpack ā€¦/libclang-dev_1%3a7.0-47_amd64.deb ā€¦
Unpacking libclang-dev (1:7.0-47) ā€¦
Setting up libclang-7-dev (1:7.0.1-8+deb10u2) ā€¦
Setting up libclang-dev (1:7.0-47) ā€¦
root@%&%&%&:~#

Thanks. Iā€™ll have to check with TDL my linux buddy , heā€™s been linuxing for years. Anything interesting iā€™ll report back later. Again thanks.

1 Like

Iā€™m sorry for the late reply, but using sudo apt-get install clang after running sudo apt-get clean and sudo apt-get update also didnā€™t work

I see that in this case apt actually ā€œresolvedā€ to the correct URL (the one with the +deb10u2). Iā€™m wondering why itā€™s not doing the same in my case.

Youā€™re getting a bunch of 404 errors, that means it canā€™t locate the repo that has the packages youā€™re looking for (itā€™s probably down for some reason). You can wait it out or switch to a different mirror. I canā€™t off top of my head remember how to do the latter on a Debian OS, but it should be easy to find out.

The repo is actually not down. As I mentioned in my question, I can browse to the repo and even find the packages there, but for some reason my system is looking for the packages without the +deb10u2 into the name. If you look at @nonattributionā€™s post, youā€™ll see that in his case, his system is looking for the correct package name

Oh I see, I missed a few crucial details. Though I did notice you typed clang and (s)he typed libclang-dev.

Donā€™t think it pertains but the only way Mint 20.1 accepts my terminal commands is ; sudo apt get . Anything else doesnā€™t work. Sorry if Iā€™m off topic.

I donā€™t know if this is a good solution, but using the Debian mirror worked for me:

deb http://cdn-fastly.deb.debian.org/debian stable main

I found it on this url: https://deb.debian.org/

Could someone advise me on if it is a good practice to keep this mirror on my /etc/apt/sources.list?

A bad practice

Some more verbose explanation https://wiki.debian.org/DontBreakDebian

i missed the notifications for your reply, sorry!
I knew i was too burnt out last week to be of much help - but -
Looking now i see that you are getting a different version
I have installed Version: 1:7.0-47
It looks like you are trying to install version Version: 1:7.0.1-8+deb10u2

try sudo apt install clang-7
instead of sudo apt install clang
( or apt-get if you prefer )

Also - you can usually download the package and install it with dpkg -i filename.deb
Edit ( but using d[kg like can screw things up at times - i.e. break packages temporarily etc )
-me