Score:4

Why are some older versions of packages not found

gr flag

I am trying to configure a build engine (Bazel) to use gcc-7. For that I needed links to all of the .deb packages needed.

One of the dependencies of gcc-7 is libatomic1 (>= 7.5.0-6ubuntu2). I realise this is "greater than or equal" but if I wanted to use the original libraries distributed with gcc-7, where could I get them?

For instance, if I do apt download --print-uris libatomic1=7.5.0-6ubuntu2 why is apt telling me :

E: Version '7.5.0-6ubuntu2' for 'libatomic1' was not found

but when I do apt show libgcc-7-dev I see that libatomic1>=7.5.0-6ubuntu2 is listed as a dependency. Where would I be able to find this libatomic1=7.5.0-6ubuntu2?

I was thinking that I might find the library package in http://old-releases.ubuntu.com/ubuntu/pool/main/g/gcc-7/ but it's not there.

N0rbert avatar
zw flag
Installing exact package versions is bad idea. You should not consider APT being Ruby/Rake/rvm or Npm or pip.
Score:5
bo flag

If you check here, you will see that security updates replaced older versions. The older versions are no longer available due to security reasons.

I performed the search at packages.ubuntu.com using "focal" as the distribution.

enter image description here

Another reason the old version is not available is because the standard version of libatomic1 is no longer built from gcc-7. As you can see here, the current version available for Ubuntu Focal is built from gcc-10 (on the right hand side under "Ubuntu Resources").

If you want, you could download the source for gcc-7 and build libatomic1 from there. This is probably not something you would want to do but it is possible.

You can enable sources in your /etc/apt/sources.list file and then run:

sudo apt source gcc-7

or you can download the source from packages.ubuntu.com and on the right hand side, you will see three options to download the source.

enter image description here

Also, it should be noted that if you're going to build something, you will need to download the required build dependencies:

sudo apt build-dep gcc-7
mchid avatar
bo flag
Of course, building from source won't satisfy the dpkg dependency but you would be able to work with the lib you compiled from source by explicitly referencing it when you run gcc-7.
Score:1
cm flag

Apt repositories normally only contain one version of a package for a given release. If you want older Ubuntu packages then afaict you have to look through the "publishing history" for the source package on launchpad. You can then follow a link to the particular version, then a link to the builds and then finally links to the individual packages.

However I don't believe that a libatomic1 package at version 7.5.0-6ubuntu2 ever actually existed. When a source package for a new new major version of gcc is added to a Debian or Ubuntu release, it takes over the library packages for the gcc runtime support libraries (libgcc, libatomic, libasan etc).

The source package for the previous major version is then modified on it's next upload such that it no longer builds the packages that have been taken over by the new major version, if it was not modified in this way then I'm pretty sure the upload would be rejected by the archive software (I know it would be in Debian, I'm not so familiar with Ubuntu's archive setup)

You could download the latest gcc-7 source package and modify it to re-enable the building of libraries, but doing so is likely to cause more problems than it solves.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.