2

I'm trying to install puppet on a fresh ubuntu 14.04 machine but I get the following error

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:
puppet : Depends: puppet-common (= 3.7.0-1puppetlabs1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

I've followed the instructions here and did the following

$ wget https://apt.puppetlabs.com/puppetlabs-release-trusty.deb   
$ sudo dpkg -i puppetlabs-release-trusty.deb   
$ sudo apt-get update

I've also tried

apt-get install ruby  
apt-get -f install  
uncommenting the 'devel' sources in puppetlabs.list

Any help would really be appreciated.

Edit 1
If I try to install the missing 'puppet-common' package, I get a similar message that I'm missing 'facter'.

puppet-common : Depends: facter (>= 1.7.0) but it is not going to be installed

If I try installing that, I get

facter : Depends: virt-what but it is not installable

Edit 2 This is what my sources look like

/etc/apt/sources.list

deb http://ports.ubuntu.com/ubuntu-ports/ trusty main restricted
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty main restricted
deb http://ports.ubuntu.com/ubuntu-ports/ trusty-updates main restricted
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-updates main restricted
deb http://ports.ubuntu.com/ubuntu-ports/ trusty-security main restricted
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-security main restricted

/etc/apt/sources.list.d/puppetlabs.list

deb http://apt.puppetlabs.com trusty main
deb-src http://apt.puppetlabs.com trusty main
deb http://apt.puppetlabs.com trusty dependencies
deb-src http://apt.puppetlabs.com trusty dependencies
deb http://apt.puppetlabs.com trusty devel
deb-src http://apt.puppetlabs.com trusty devel

Edit 3 Please find the output of apt-get update below

Ign http://apt.puppetlabs.com trusty InRelease
Hit http://apt.puppetlabs.com trusty Release.gpg    
Hit http://apt.puppetlabs.com trusty Release        
Ign http://ports.ubuntu.com trusty InRelease    
Hit http://apt.puppetlabs.com trusty/main Sources
Ign http://ports.ubuntu.com trusty-updates InRelease
Hit http://apt.puppetlabs.com trusty/dependencies Sources
Ign http://ports.ubuntu.com trusty-security InRelease
Hit http://apt.puppetlabs.com trusty/devel Sources
Hit http://apt.puppetlabs.com trusty/main armhf Packages
Hit http://ports.ubuntu.com trusty Release.gpg 
Hit http://apt.puppetlabs.com trusty/dependencies armhf Packages
Hit http://apt.puppetlabs.com trusty/devel armhf Packages
Hit http://ports.ubuntu.com trusty-updates Release.gpg
Hit http://ports.ubuntu.com trusty-security Release.gpg
Hit http://ports.ubuntu.com trusty Release     
Hit http://ports.ubuntu.com trusty-updates Release                    
Hit http://ports.ubuntu.com trusty-security Release                   
Hit http://ports.ubuntu.com trusty/main Sources                       
Hit http://ports.ubuntu.com trusty/restricted Sources
Hit http://ports.ubuntu.com trusty/main armhf Packages
Hit http://ports.ubuntu.com trusty/restricted armhf Packages
Hit http://ports.ubuntu.com trusty/main Translation-en
Hit http://ports.ubuntu.com trusty/restricted Translation-en
Hit http://ports.ubuntu.com trusty-updates/main Sources
Hit http://ports.ubuntu.com trusty-updates/restricted Sources
Hit http://ports.ubuntu.com trusty-updates/main armhf Packages
Ign http://apt.puppetlabs.com trusty/dependencies Translation-en_US
Ign http://apt.puppetlabs.com trusty/dependencies Translation-en
Hit http://ports.ubuntu.com trusty-updates/restricted armhf Packages
Ign http://apt.puppetlabs.com trusty/devel Translation-en_US
Hit http://ports.ubuntu.com trusty-updates/main Translation-en
Ign http://apt.puppetlabs.com trusty/devel Translation-en
Ign http://apt.puppetlabs.com trusty/main Translation-en_US
Hit http://ports.ubuntu.com trusty-updates/restricted Translation-en
Ign http://apt.puppetlabs.com trusty/main Translation-en
Hit http://ports.ubuntu.com trusty-security/main Sources
Hit http://ports.ubuntu.com trusty-security/restricted Sources
Hit http://ports.ubuntu.com trusty-security/main armhf Packages
Hit http://ports.ubuntu.com trusty-security/restricted armhf Packages
Hit http://ports.ubuntu.com trusty-security/main Translation-en
Hit http://ports.ubuntu.com trusty-security/restricted Translation-en
Ign http://ports.ubuntu.com trusty/main Translation-en_US
Ign http://ports.ubuntu.com trusty/restricted Translation-en_US
0

The short answer is: do an

apt-get -f install

command and it will download & install what is needed.

Package installation in a dpkg-based OS has 3 steps:

  1. Some scripts before the copy of the files are called
  2. The files are from the installation package extracted, and into your root filesystem copied
  3. Some scripts after that will be called again.

A debian package is practically a standardized collection of: 1. The install scripts 2. Information about its dependencies 3. An actual tar.xz archive containing all of the files.

The files of the package are already copied to your filesystem, but their configuration don't. So your program probably won't work, but (1) and (2) is already happened!

This can you see if you give a dpkg -l command (you will get probably a very long list, maybe a dpkg -l|more were a better idea). Your package is already installed, but is in "corrupt" state. This can be fixed with the apt-get -f install command. This command collects the available dependency informations - both in your packages, and in your installed .dpkg repositories - and finds a way to fix everything.

Its primary goal is to find, download and install the missing packages in their needed order. But if it is not possible, it will even uninstall things. It will show you, what he want to do. If it can run (and in most cases: it can), finally you will got a working system, where everything is okay.

Extension #1: You error message shows, that this puppet package depends on another package, named puppet-common. This package is probably not in your default repository, but probably next to your puppet package url. This is the cause, why apt is unable to find and install that into your system. But the fix is also very simple for that: download the needed puppet-common package as well, and install that, too.

Extension #2: I've read the instructions found there, and I am nearly sure, that you somehow missed the first step. In your /etc/apt/sources.list file should you find the puppetlabs repository url, is it there? If not, do the step1 (importing the puppetlabs repo into your apt) again. If something isn't ok, copy your sources.list into your question, and I will go further.

  • Thanks, but I should have mentioned that I have already tried this: no luck. – yakka Sep 15 '14 at 11:19
  • @aykyu Copy here the output of the apt-get -f install command and I will improve my answer. – peterh Sep 15 '14 at 11:24
  • Nothing interesting from what I can see Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. – yakka Sep 15 '14 at 11:28
  • I've updated my question with the source.list content copied in. – yakka Sep 15 '14 at 11:59
  • @aykyu It looks okay. Running yet another apt-get update (it refreshes the package cache) command, what does it give back? – peterh Sep 15 '14 at 12:05
0

The answer turned out to be much simpler than I had expected:

In a terminal I typed in

software-properties-gtk

and under 'Ubuntu Software' I ticked all the sources. After that I did an update and tried installing again and it worked!

Thanks for the useful suggestions Peter Horvath.

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.