Score:0

Issues with apt-mirror server and dependencies during apt installs

sk flag

I have setup an offline apt-mirror of ubuntu 18.04 (this will eventually be upgraded to 20.04 or 22.04 but I still have need of 18.04 for a while). On some ubuntu boxes on the network I get dependency issues when trying to install packages using apt, apt-get or aptitude. I am able to get the dependencies manually from the apt-mirror but for some reason apt, apt-get or aptitude does not see them. I'm unsure if this is an issue on the mirror or on the ubuntu boxes I am trying to pull to.

below I removed the IP address, but they are all the same server IP.

The mirror.list on the apt mirror server:

############# config ##################
#
 set base_path    /var/spool/apt-mirror
#
 set mirror_path  $base_path/mirror
 set skel_path    $base_path/skel
 set var_path     $base_path/var
 set cleanscript $var_path/clean.sh
 set nthreads     20
 set _tilde 0
#
############# end config ##############

deb http://us.archive.ubuntu.com/ubuntu bionic main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu bionic-security main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu bionic-updates main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu bionic-proposed main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu bionic-backports main restricted universe multiverse
deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-11 main
deb https://ppa.launchpadcontent.net/ubuntu-toolchain-r/test/ubuntu bionic main

clean http://us.archive.ubuntu.com/ubuntu-toolchain-r
clean http://apt.llvm.org/bionic/
clean https://ppa.launchpadcontent.net/ubuntu-toolchain-r/test/ubuntu

The mirrors.conf for nginx on the mirror:

server {
 listen 8000;
 server_name <IP removed>;
# root /var/spool/apt-mirror/mirror;
 autoindex on;
 location /ubuntu {
   root /var/spool/apt-mirror/mirror/us.archive.ubuntu.com;
   autoindex on;
 }
 location /llvm {
   alias /var/spool/apt-mirror/mirror/apt.llvm.org/bionic;
   autoindex on;
 }
 location /ppa.launchpadcontent.net {
   alias /var/spool/apt-mirror/mirror/ppa.launchpadcontent.net;
   autoindex on;
 }
}

The sources.list on the boxes with the apt dependency issues

deb http://<IP removed>:8000/ubuntu/ bionic main restricted
deb http://<IP removed>:8000/ubuntu/ bionic-updates main restricted
deb http://<IP removed>:8000/ubuntu/ bionic universe
deb http://<IP removed>:8000/ubuntu/ bionic-updates universe
deb http://<IP removed>:8000/ubuntu/ bionic multiverse
deb http://<IP removed>:8000/ubuntu/ bionic-updates multiverse
deb http://<IP removed>:8000/ubuntu/ bionic-backports main restricted universe multiverse
deb http://<IP removed>:8000/ubuntu/ bionic-security main restricted
deb http://<IP removed>:8000/ubuntu/ bionic-security universe
deb http://<IP removed>:8000/ubuntu/ bionic-security multiverse
deb http://<IP removed>:8000/llvm/ llvm-toolchain-bionic-11 main
deb http://<IP removed>:8000/ppa.launchpadcontent.net/ubuntu-toolchain-r/test/ubuntu/ bionic main

apt install command (this is actually a subset of things I'm trying to install, but same issue happens for every package.), an apt update command was run before this:

sudo apt install -y libllvm11 llvm-11 llvm-11-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 llvm-11 : Depends: libpfm4 but it is not installable
 llvm-11-dev : Depends: llvm-11-tools (= 1:11.1.0~++20211011094159+1fdec59bffc1-1~exp1~20211011214614.8) but it is not going to be installed
               Depends: libz3-dev but it is not installable
               Depends: libxml2-dev but it is not installable
E: Unable to correct problems, you have held broken packages.

I have tried apt clean and apt update cycle and still get the above. I have tried aptitude install -f libllvm11 llvm-11 llvm-11-dev with similar effect. I have been able to manually get the dependency files from the server and install them. I did dig a bit into the dependancies and if I check the policy on libpfm4 I get:

:~$ sudo apt policy libpfm4
libpfm4:
  Installed: (none)
  Candidate: (none)
  Version table:

If I check the mirror I see deb files for the libpfm4 present in :8000/ubuntu/pool/main/libp/libpfm4/

Trying to figure out why the boxes are not seeing the dependencies from the mirror. Do I have the mirror setup wrong or is there something I'm forgetting on the boxes pulling the packages?

I sit in a Tesla and translated this thread with Ai:

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.