0

Setup

I have 3 VMs, each running 12.04:

VM0: hosts a debmirror-built, partial ubuntu repository. VM1 & VM2 want to use that to install packages.

I've renamed /etc/apt/sources.list -> /etc/apt/sources.list.dis so that it's not picked up (and I don't see the VMs hitting the standard ubuntu archives during apt-get update), and both VMs have identical identical sources.list configs (1 file in sources.list.d/foo.list)

The problem

On one VM, I can install apache2 from my ubuntu mirror just fine, but not on the other. Is there any stale apt-get state that I need get rid of?

foo.list:

deb http://my-mirror.com/repository/ubuntu/ precise main universe multiverse restricted
deb http://my-mirror.com/repository/ubuntu/ precise-security main universe multiverse restricted
deb http://my-mirror.com/repository/ubuntu/ precise-updates main universe multiverse restricted

Before trying to install apache2 on both VMs, I ran: sudo rm -rf /var/cache/apt and sudo apt-get update

VM1 works fine:

me@vm1-172-16-2-18:~$ sudo apt-get install apache2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  apache2-mpm-worker apache2-utils apache2.2-bin apache2.2-common libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap
  ssl-cert
Suggested packages:
  apache2-doc apache2-suexec apache2-suexec-custom openssl-blacklist
The following NEW packages will be installed:
  apache2 apache2-mpm-worker apache2-utils apache2.2-bin apache2.2-common libapr1 libaprutil1 libaprutil1-dbd-sqlite3
  libaprutil1-ldap ssl-cert
0 upgraded, 10 newly installed, 0 to remove and 48 not upgraded.
Need to get 102 kB/1,857 kB of archives.
After this operation, 5,686 kB of additional disk space will be used.
Do you want to continue [Y/n]? 
...

VM2 doesn't:

me@vm2-172-16-2-17:~$ sudo apt-get install apache2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package apache2 is a virtual package provided by:
  apache2-mpm-itk 2.2.22-1ubuntu1.7 [Not candidate version]
  apache2-mpm-worker 2.2.22-1ubuntu1.7 [Not candidate version]
  apache2-mpm-prefork 2.2.22-1ubuntu1.7 [Not candidate version]
  apache2-mpm-event 2.2.22-1ubuntu1.7 [Not candidate version]
  apache2-mpm-itk 2.2.22-1ubuntu1 [Not candidate version]
  apache2-mpm-worker 2.2.22-1ubuntu1 [Not candidate version]
  apache2-mpm-prefork 2.2.22-1ubuntu1 [Not candidate version]
  apache2-mpm-event 2.2.22-1ubuntu1 [Not candidate version]

E: Package 'apache2' has no installation candidate
me@vm2-172-16-2-17:~$

apt-get update didn't report any errors.

How can I troubleshoot this issue?

Things I've established so far:

  • Clearly the repository is working, since 1 VM can install from it, so I think it must be something to do with apt-get on the 2nd VM but I really couldn't tell what.
  • The networking is also the same for both VMs.
  • I can curl the repository URL just fine, so I don't think it's a firewall issue.

Here's also the output of apt-get update from the broken VM:

me@vm2-172-16-2-17:~$ sudo apt-get update
Hit http://my-mirror.com stable Release.gpg
Hit http://my-mirror.com stable Release.gpg
Hit http://my-mirror.com precise Release.gpg
Hit http://my-mirror.com precise-security Release.gpg
Hit http://my-mirror.com precise-updates Release.gpg
Hit http://my-mirror.com stable Release
Hit http://my-mirror.com stable Release
Hit http://my-mirror.com precise Release
Hit http://my-mirror.com precise-security Release
Hit http://my-mirror.com precise-updates Release
Hit http://my-mirror.com stable/main amd64 Packages                    
Hit http://my-mirror.com stable/main i386 Packages                     
Ign http://my-mirror.com stable/main TranslationIndex                  
Hit http://my-mirror.com stable/main amd64 Packages                    
Hit http://my-mirror.com stable/main i386 Packages                     
Ign http://my-mirror.com stable/main TranslationIndex                  
Hit http://my-mirror.com precise/main amd64 Packages                   
Hit http://my-mirror.com precise/universe amd64 Packages               
Hit http://my-mirror.com precise/multiverse amd64 Packages             
Hit http://my-mirror.com precise/restricted amd64 Packages             
Hit http://my-mirror.com precise/main i386 Packages                    
Hit http://my-mirror.com precise/universe i386 Packages                
Hit http://my-mirror.com precise/multiverse i386 Packages              
Hit http://my-mirror.com precise/restricted i386 Packages              
Ign http://my-mirror.com precise/main TranslationIndex                 
Ign http://my-mirror.com precise/multiverse TranslationIndex           
Ign http://my-mirror.com precise/restricted TranslationIndex           
Ign http://my-mirror.com precise/universe TranslationIndex             
Ign http://my-mirror.com stable/main Translation-en_US                 
Ign http://my-mirror.com stable/main Translation-en
Hit http://my-mirror.com precise-security/main amd64 Packages          
Hit http://my-mirror.com precise-security/universe amd64 Packages
Hit http://my-mirror.com precise-security/multiverse amd64 Packages
Hit http://my-mirror.com precise-security/restricted amd64 Packages
Hit http://my-mirror.com precise-security/main i386 Packages
Hit http://my-mirror.com precise-security/universe i386 Packages
Hit http://my-mirror.com precise-security/multiverse i386 Packages
Hit http://my-mirror.com precise-security/restricted i386 Packages
Ign http://my-mirror.com precise-security/main TranslationIndex
Ign http://my-mirror.com precise-security/multiverse TranslationIndex
Ign http://my-mirror.com precise-security/restricted TranslationIndex
Ign http://my-mirror.com precise-security/universe TranslationIndex
Hit http://my-mirror.com precise-updates/main amd64 Packages
Hit http://my-mirror.com precise-updates/universe amd64 Packages
Hit http://my-mirror.com precise-updates/multiverse amd64 Packages
Hit http://my-mirror.com precise-updates/restricted amd64 Packages
Hit http://my-mirror.com precise-updates/main i386 Packages
Hit http://my-mirror.com precise-updates/universe i386 Packages
Hit http://my-mirror.com precise-updates/multiverse i386 Packages
Hit http://my-mirror.com precise-updates/restricted i386 Packages
Ign http://my-mirror.com precise-updates/main TranslationIndex
Ign http://my-mirror.com precise-updates/multiverse TranslationIndex
Ign http://my-mirror.com precise-updates/restricted TranslationIndex
Ign http://my-mirror.com precise-updates/universe TranslationIndex
Ign http://my-mirror.com stable/main Translation-en_US
Ign http://my-mirror.com stable/main Translation-en
Ign http://my-mirror.com precise/main Translation-en_US
Ign http://my-mirror.com precise/main Translation-en
Ign http://my-mirror.com precise/multiverse Translation-en_US
Ign http://my-mirror.com precise/multiverse Translation-en
Ign http://my-mirror.com precise/restricted Translation-en_US
Ign http://my-mirror.com precise/restricted Translation-en
Ign http://my-mirror.com precise/universe Translation-en_US
Ign http://my-mirror.com precise/universe Translation-en
Ign http://my-mirror.com precise-security/main Translation-en_US
Ign http://my-mirror.com precise-security/main Translation-en
Ign http://my-mirror.com precise-security/multiverse Translation-en_US
Ign http://my-mirror.com precise-security/multiverse Translation-en
Ign http://my-mirror.com precise-security/restricted Translation-en_US
Ign http://my-mirror.com precise-security/restricted Translation-en
Ign http://my-mirror.com precise-security/universe Translation-en_US
Ign http://my-mirror.com precise-security/universe Translation-en
Ign http://my-mirror.com precise-updates/main Translation-en_US
Ign http://my-mirror.com precise-updates/main Translation-en
Ign http://my-mirror.com precise-updates/multiverse Translation-en_US
Ign http://my-mirror.com precise-updates/multiverse Translation-en
Ign http://my-mirror.com precise-updates/restricted Translation-en_US
Ign http://my-mirror.com precise-updates/restricted Translation-en
Ign http://my-mirror.com precise-updates/universe Translation-en_US
Ign http://my-mirror.com precise-updates/universe Translation-en
Reading package lists... Done

1 Answer 1

1

It turns out I setup the repository manually on VM1 by copying the sources.list.d/foo.list config from VM2, but I set it up using some puppet classes on VM2. I had forgotten that I setup apt-pinning using puppet, with Pin-Priority: -10 .

After deleting everything in /etc/apt/preferences.d/ and re-running apt-get update && apt-get install apache2 things worked fine on VM2.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .