kasperisager / php-dockerized

Dockerized PHP development stack: Nginx, MySQL, MongoDB, PHP-FPM, HHVM, Memcached, Redis, Elasticsearch and RabbitMQ

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Could not find command 'librarian-puppet'

BenBish opened this issue · comments

Hi I am a bit stumped about this and how to resolve it. This issue occurs on Vagrant Up.

FYI its a fresh install of Vagrant on OSX Mavericks. Any ideas? Thank you.

Notice: /Stage[main]/Bootstrap::Modules/Package[librarian-puppet]/ensure: created
Error: Could not find command 'librarian-puppet'
Error: /Stage[main]/Bootstrap::Modules/Exec[librarian-puppet install]/returns: change from notrun to 0 failed: Could not find command 'librarian-puppet'
Notice: Finished catalog run in 74.13 seconds
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

puppet apply --hiera_config /vagrant/puppet/hiera.yaml --manifestdir /tmp/vagrant-puppet/manifests --detailed-exitcodes /tmp/vagrant-puppet/manifests/bootstrap.pp || [ $? -eq 2 ]

Stdout from the command:

Notice: Compiled catalog for lnpp.vagrantup.com in environment production in 0.14 seconds
Notice: /Stage[main]/Bootstrap::Update/Exec[apt-get update]/returns: executed successfully
Notice: /Stage[main]/Bootstrap::Packages/Package[git-core]/ensure: ensure changed 'purged' to 'present'
Notice: /Stage[main]/Bootstrap::Modules/Package[facter]/ensure: ensure changed '1.6.12' to '1.6.13'
Notice: /Stage[main]/Bootstrap::Modules/Package[librarian-puppet]/ensure: created
Notice: Finished catalog run in 74.13 seconds


Stderr from the command:

stdin: is not a tty
Error: Could not find command 'librarian-puppet'
Error: /Stage[main]/Bootstrap::Modules/Exec[librarian-puppet install]/returns: change from notrun to 0 failed: Could not find command 'librarian-puppet'

That's odd... The librarian-puppet Gem isn't being installed for some reason. Could you maybe try changing these lines https://github.com/kasperisager/vagrant-lnpp/blob/master/puppet/manifests/bootstrap.pp#L36-L38 to:

exec { "librarian-puppet install":
  cwd => "/vagrant/puppet",
  require => Package["librarian-puppet"]
}

Thanks very much for the quick response. Alas, this has made no difference. I have attached the complete output in case there is any benefit from that?

Not that I think it will make a difference but I was getting the following error when doing Vagrant Up. I don't have the vagrant-vbguest plugin installed - should I?

Vagrant:
* Unknown configuration section 'vbguest'.

To get your Vagrantfile to execute was to changed this https://github.com/kasperisager/vagrant-lnpp/blob/master/Vagrantfile#L92 line to:

  if Object.const_defined? 'VagrantVbguest' 
    config.vbguest.auto_update = false
  end 

Could the librarian-puppet issue to be with the fact I don't have a required plugin installed? I am afraid I am rather new to Vagrant so I am clutching at straws.

I have noticed another error too!

dpkg-preconfigure: unable to re-open stdin: No such file or directory

Here is the complete output.

Bens-iMac:vagrant-lnpp Ben$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Importing base box 'precise32'...
[default] Matching MAC address for NAT networking...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
Pruning invalid NFS exports. Administrator privileges will be required...
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] Booting VM...
[default] Waiting for machine to boot. This may take a few minutes...
[default] Machine booted and ready!
[default] Setting hostname...
[default] Configuring and enabling network interfaces...
[default] Mounting shared folders...
[default] -- /vagrant
[default] -- /tmp/vagrant-puppet/manifests
[default] -- /tmp/vagrant-puppet/modules-0
[default] Exporting NFS shared folders...
Preparing to edit /etc/exports. Administrator privileges will be required...
[default] Mounting NFS shared folders...
[default] Running provisioner: shell...
[default] Running: /var/folders/hy/ywjxdkyj3bbf4hlh3nkxh18r0000gn/T/vagrant-shell20131201-8735-1abig6f
stdin: is not a tty
Reading package lists...
Building dependency tree...
Reading state information...
lsb-release is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 66 not upgraded.
Selecting previously unselected package puppetlabs-release.
(Reading database ... 29361 files and directories currently installed.)
Unpacking puppetlabs-release (from puppetlabs-release-precise.deb) ...
Setting up puppetlabs-release (1.0-7) ...
Ign http://security.ubuntu.com precise-security InRelease
Ign http://apt.puppetlabs.com precise InRelease
Get:1 http://security.ubuntu.com precise-security Release.gpg [198 B]
Get:2 http://security.ubuntu.com precise-security Release [49.6 kB]
Get:3 http://apt.puppetlabs.com precise Release.gpg [876 B]
Get:4 http://apt.puppetlabs.com precise Release [8,877 B]
Get:5 http://apt.puppetlabs.com precise/main Sources [58.2 kB]
Get:6 http://security.ubuntu.com precise-security/main Sources [93.6 kB]
Ign http://us.archive.ubuntu.com precise InRelease
Ign http://us.archive.ubuntu.com precise-updates InRelease
Ign http://us.archive.ubuntu.com precise-backports InRelease
Hit http://us.archive.ubuntu.com precise Release.gpg
Get:7 http://us.archive.ubuntu.com precise-updates Release.gpg [198 B]
Get:8 http://us.archive.ubuntu.com precise-backports Release.gpg [198 B]
Hit http://us.archive.ubuntu.com precise Release
Get:9 http://us.archive.ubuntu.com precise-updates Release [49.6 kB]
Get:10 http://apt.puppetlabs.com precise/dependencies Sources [8,552 B]
Get:11 http://apt.puppetlabs.com precise/main i386 Packages [54.8 kB]
Get:12 http://security.ubuntu.com precise-security/restricted Sources [2,494 B]
Get:13 http://security.ubuntu.com precise-security/universe Sources [29.9 kB]
Get:14 http://security.ubuntu.com precise-security/multiverse Sources [1,797 B]
Get:15 http://security.ubuntu.com precise-security/main i386 Packages [360 kB]
Get:16 http://apt.puppetlabs.com precise/dependencies i386 Packages [6,183 B]
Ign http://apt.puppetlabs.com precise/dependencies TranslationIndex
Ign http://apt.puppetlabs.com precise/main TranslationIndex
Get:17 http://us.archive.ubuntu.com precise-backports Release [49.6 kB]
Ign http://apt.puppetlabs.com precise/dependencies Translation-en_US
Ign http://apt.puppetlabs.com precise/dependencies Translation-en
Ign http://apt.puppetlabs.com precise/main Translation-en_US
Ign http://apt.puppetlabs.com precise/main Translation-en
Hit http://us.archive.ubuntu.com precise/main Sources
Hit http://us.archive.ubuntu.com precise/restricted Sources
Hit http://us.archive.ubuntu.com precise/universe Sources
Hit http://us.archive.ubuntu.com precise/multiverse Sources
Hit http://us.archive.ubuntu.com precise/main i386 Packages
Hit http://us.archive.ubuntu.com precise/restricted i386 Packages
Hit http://us.archive.ubuntu.com precise/universe i386 Packages
Hit http://us.archive.ubuntu.com precise/multiverse i386 Packages
Hit http://us.archive.ubuntu.com precise/main TranslationIndex
Hit http://us.archive.ubuntu.com precise/multiverse TranslationIndex
Hit http://us.archive.ubuntu.com precise/restricted TranslationIndex
Hit http://us.archive.ubuntu.com precise/universe TranslationIndex
Get:18 http://us.archive.ubuntu.com precise-updates/main Sources [426 kB]
Get:19 http://security.ubuntu.com precise-security/restricted i386 Packages [4,620 B]
Get:20 http://security.ubuntu.com precise-security/universe i386 Packages [88.9 kB]
Get:21 http://security.ubuntu.com precise-security/multiverse i386 Packages [2,635 B]
Get:22 http://security.ubuntu.com precise-security/main TranslationIndex [74 B]
Get:23 http://security.ubuntu.com precise-security/multiverse TranslationIndex [72 B]
Get:24 http://security.ubuntu.com precise-security/restricted TranslationIndex [72 B]
Get:25 http://security.ubuntu.com precise-security/universe TranslationIndex [73 B]
Get:26 http://security.ubuntu.com precise-security/main Translation-en [161 kB]
Get:27 http://security.ubuntu.com precise-security/multiverse Translation-en [1,299 B]
Get:28 http://security.ubuntu.com precise-security/restricted Translation-en [1,253 B]
Get:29 http://security.ubuntu.com precise-security/universe Translation-en [54.4 kB]
Get:30 http://us.archive.ubuntu.com precise-updates/restricted Sources [7,006 B]
Get:31 http://us.archive.ubuntu.com precise-updates/universe Sources [100 kB]
Get:32 http://us.archive.ubuntu.com precise-updates/multiverse Sources [8,356 B]
Get:33 http://us.archive.ubuntu.com precise-updates/main i386 Packages [730 kB]
Get:34 http://us.archive.ubuntu.com precise-updates/restricted i386 Packages [11.4 kB]
Get:35 http://us.archive.ubuntu.com precise-updates/universe i386 Packages [227 kB]
Get:36 http://us.archive.ubuntu.com precise-updates/multiverse i386 Packages [14.2 kB]
Get:37 http://us.archive.ubuntu.com precise-updates/multiverse i386 Packages [14.2 kB]
Get:38 http://us.archive.ubuntu.com precise-updates/main TranslationIndex [3,564 B]
Get:39 http://us.archive.ubuntu.com precise-updates/multiverse TranslationIndex [2,605 B]
Get:40 http://us.archive.ubuntu.com precise-updates/restricted TranslationIndex [2,461 B]
Get:41 http://us.archive.ubuntu.com precise-updates/universe TranslationIndex [2,850 B]
Hit http://us.archive.ubuntu.com precise/main Translation-en
Get:42 http://us.archive.ubuntu.com precise-backports/main Sources [4,225 B]
Get:43 http://us.archive.ubuntu.com precise-backports/restricted Sources [14 B]
Get:44 http://us.archive.ubuntu.com precise-backports/universe Sources [36.4 kB]
Get:45 http://us.archive.ubuntu.com precise-backports/multiverse Sources [5,311 B]
Get:46 http://us.archive.ubuntu.com precise-backports/main i386 Packages [4,809 B]
Get:47 http://us.archive.ubuntu.com precise-backports/restricted i386 Packages [14 B]
Get:48 http://us.archive.ubuntu.com precise-backports/universe i386 Packages [37.7 kB]
Get:49 http://us.archive.ubuntu.com precise-backports/multiverse i386 Packages [5,178 B]
Get:50 http://us.archive.ubuntu.com precise-backports/main TranslationIndex [72 B]
Get:51 http://us.archive.ubuntu.com precise-backports/multiverse TranslationIndex [72 B]
Get:52 http://us.archive.ubuntu.com precise-backports/restricted TranslationIndex [70 B]
Get:53 http://us.archive.ubuntu.com precise-backports/universe TranslationIndex [73 B]
Hit http://us.archive.ubuntu.com precise/multiverse Translation-en
Hit http://us.archive.ubuntu.com precise/restricted Translation-en
Hit http://us.archive.ubuntu.com precise/universe Translation-en
Get:54 http://us.archive.ubuntu.com precise-updates/main Translation-en [319 kB]
Get:55 http://us.archive.ubuntu.com precise-updates/multiverse Translation-en [8,136 B]
Get:56 http://us.archive.ubuntu.com precise-updates/restricted Translation-en [2,637 B]
Get:57 http://us.archive.ubuntu.com precise-updates/universe Translation-en [130 kB]
Get:58 http://us.archive.ubuntu.com precise-backports/main Translation-en [4,235 B]
Get:59 http://us.archive.ubuntu.com precise-backports/multiverse Translation-en [4,610 B]
Hit http://us.archive.ubuntu.com precise-backports/restricted Translation-en
Get:60 http://us.archive.ubuntu.com precise-backports/universe Translation-en [27.6 kB]
Fetched 3,209 kB in 55s (57.4 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
  augeas-lenses debconf-utils facter hiera libaugeas-ruby libaugeas-ruby1.8
  libaugeas0 libjson-ruby libreadline5 libruby libruby1.8 libshadow-ruby1.8
  puppet-common ruby ruby-json ruby-rgen ruby1.8 virt-what
Suggested packages:
  augeas-doc augeas-tools puppet-el vim-puppet ruby-selinux libselinux-ruby1.8
  librrd-ruby1.9.1 librrd-ruby1.8 ri ruby-dev ruby1.8-examples ri1.8
Recommended packages:
  rdoc
The following NEW packages will be installed:
  augeas-lenses debconf-utils facter hiera libaugeas-ruby libaugeas-ruby1.8
  libaugeas0 libjson-ruby libreadline5 libruby libruby1.8 libshadow-ruby1.8
  puppet puppet-common ruby ruby-json ruby-rgen ruby1.8 virt-what
0 upgraded, 19 newly installed, 0 to remove and 155 not upgraded.
Need to get 3,777 kB of archives.
After this operation, 14.4 MB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ precise/main libreadline5 i386 5.2-11 [123 kB]
Get:2 http://apt.puppetlabs.com/ precise/main facter i386 1.7.3-1puppetlabs1 [75.2 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ precise/main augeas-lenses all 0.10.0-0ubuntu4 [175 kB]
Get:4 http://apt.puppetlabs.com/ precise/main hiera all 1.3.0-1puppetlabs1 [12.5 kB]
Get:5 http://apt.puppetlabs.com/ precise/dependencies ruby-rgen all 0.6.5-1puppetlabs1 [82.2 kB]
Get:6 http://apt.puppetlabs.com/ precise/main puppet-common all 3.3.2-1puppetlabs1 [1,136 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu/ precise/main debconf-utils all 1.5.42ubuntu1 [54.9 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main libruby1.8 i386 1.8.7.352-2ubuntu1.4 [1,787 kB]
Get:9 http://apt.puppetlabs.com/ precise/main puppet all 3.3.2-1puppetlabs1 [9,634 B]
Get:10 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main ruby1.8 i386 1.8.7.352-2ubuntu1.4 [34.2 kB]
Get:11 http://us.archive.ubuntu.com/ubuntu/ precise/main ruby all 4.8 [5,054 B]
Get:12 http://us.archive.ubuntu.com/ubuntu/ precise/universe virt-what i386 1.11-1 [12.8 kB]
Get:13 http://us.archive.ubuntu.com/ubuntu/ precise/main libaugeas0 i386 0.10.0-0ubuntu4 [169 kB]
Get:14 http://us.archive.ubuntu.com/ubuntu/ precise/main libaugeas-ruby1.8 i386 0.3.0-1.1ubuntu4 [9,490 B]
Get:15 http://us.archive.ubuntu.com/ubuntu/ precise/universe libaugeas-ruby all 0.3.0-1.1ubuntu4 [3,354 B]
Get:16 http://us.archive.ubuntu.com/ubuntu/ precise/universe ruby-json i386 1.6.3-1 [72.4 kB]
Get:17 http://us.archive.ubuntu.com/ubuntu/ precise/universe libjson-ruby all 1.6.3-1 [1,588 B]
Get:18 http://us.archive.ubuntu.com/ubuntu/ precise/main libruby all 4.8 [4,766 B]
Get:19 http://us.archive.ubuntu.com/ubuntu/ precise/main libshadow-ruby1.8 i386 1.4.1-8build1 [8,828 B]
dpkg-preconfigure: unable to re-open stdin: No such file or directory
Fetched 3,777 kB in 1min 28s (42.7 kB/s)
Selecting previously unselected package libreadline5.
(Reading database ... 29367 files and directories currently installed.)
Unpacking libreadline5 (from .../libreadline5_5.2-11_i386.deb) ...
Selecting previously unselected package augeas-lenses.
Unpacking augeas-lenses (from .../augeas-lenses_0.10.0-0ubuntu4_all.deb) ...
Selecting previously unselected package debconf-utils.
Unpacking debconf-utils (from .../debconf-utils_1.5.42ubuntu1_all.deb) ...
Selecting previously unselected package libruby1.8.
Unpacking libruby1.8 (from .../libruby1.8_1.8.7.352-2ubuntu1.4_i386.deb) ...
Selecting previously unselected package ruby1.8.
Unpacking ruby1.8 (from .../ruby1.8_1.8.7.352-2ubuntu1.4_i386.deb) ...
Selecting previously unselected package ruby.
Unpacking ruby (from .../apt/archives/ruby_4.8_all.deb) ...
Selecting previously unselected package virt-what.
Unpacking virt-what (from .../virt-what_1.11-1_i386.deb) ...
Selecting previously unselected package facter.
Unpacking facter (from .../facter_1.7.3-1puppetlabs1_i386.deb) ...
Selecting previously unselected package libaugeas0.
Unpacking libaugeas0 (from .../libaugeas0_0.10.0-0ubuntu4_i386.deb) ...
Selecting previously unselected package libaugeas-ruby1.8.
Unpacking libaugeas-ruby1.8 (from .../libaugeas-ruby1.8_0.3.0-1.1ubuntu4_i386.deb) ...
Selecting previously unselected package libaugeas-ruby.
Unpacking libaugeas-ruby (from .../libaugeas-ruby_0.3.0-1.1ubuntu4_all.deb) ...
Selecting previously unselected package ruby-json.
Unpacking ruby-json (from .../ruby-json_1.6.3-1_i386.deb) ...
Selecting previously unselected package libjson-ruby.
Unpacking libjson-ruby (from .../libjson-ruby_1.6.3-1_all.deb) ...
Selecting previously unselected package libruby.
Unpacking libruby (from .../archives/libruby_4.8_all.deb) ...
Selecting previously unselected package libshadow-ruby1.8.
Unpacking libshadow-ruby1.8 (from .../libshadow-ruby1.8_1.4.1-8build1_i386.deb) ...
Selecting previously unselected package hiera.
Unpacking hiera (from .../hiera_1.3.0-1puppetlabs1_all.deb) ...
Selecting previously unselected package ruby-rgen.
Unpacking ruby-rgen (from .../ruby-rgen_0.6.5-1puppetlabs1_all.deb) ...
Selecting previously unselected package puppet-common.
Unpacking puppet-common (from .../puppet-common_3.3.2-1puppetlabs1_all.deb) ...
Selecting previously unselected package puppet.
Unpacking puppet (from .../puppet_3.3.2-1puppetlabs1_all.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
ureadahead will be reprofiled on next reboot
Setting up libreadline5 (5.2-11) ...
Setting up augeas-lenses (0.10.0-0ubuntu4) ...
Setting up debconf-utils (1.5.42ubuntu1) ...
Setting up libruby1.8 (1.8.7.352-2ubuntu1.4) ...
Setting up ruby1.8 (1.8.7.352-2ubuntu1.4) ...
update-alternatives: using /usr/bin/ruby1.8 to provide /usr/bin/ruby (ruby) in auto mode.
Setting up ruby (4.8) ...
Setting up virt-what (1.11-1) ...
Setting up facter (1.7.3-1puppetlabs1) ...
Setting up libaugeas0 (0.10.0-0ubuntu4) ...
Setting up libaugeas-ruby1.8 (0.3.0-1.1ubuntu4) ...
Setting up libaugeas-ruby (0.3.0-1.1ubuntu4) ...
Setting up ruby-json (1.6.3-1) ...
Setting up libjson-ruby (1.6.3-1) ...
Setting up libruby (4.8) ...
Setting up libshadow-ruby1.8 (1.4.1-8build1) ...
Setting up hiera (1.3.0-1puppetlabs1) ...
Setting up ruby-rgen (0.6.5-1puppetlabs1) ...
Setting up puppet-common (3.3.2-1puppetlabs1) ...
Setting up puppet (3.3.2-1puppetlabs1) ...
 * Starting puppet agent

puppet not configured to start, please edit /etc/default/puppet to enable
   ...done.
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
[default] Running provisioner: puppet...
Running Puppet with bootstrap.pp...
stdin: is not a tty
Notice: Compiled catalog for lnpp.vagrantup.com in environment production in 0.12 seconds
Notice: /Stage[main]/Bootstrap::Update/Exec[apt-get update]/returns: executed successfully
Notice: /Stage[main]/Bootstrap::Packages/Package[git-core]/ensure: ensure changed 'purged' to 'present'
Notice: /Stage[main]/Bootstrap::Modules/Package[facter]/ensure: ensure changed '1.6.12' to '1.6.13'
Notice: /Stage[main]/Bootstrap::Modules/Package[librarian-puppet]/ensure: created
Error: Could not find command 'librarian-puppet'
Error: /Stage[main]/Bootstrap::Modules/Exec[librarian-puppet install]/returns: change from notrun to 0 failed: Could not find command 'librarian-puppet'
Notice: Finished catalog run in 316.94 seconds
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

puppet apply --hiera_config /vagrant/puppet/hiera.yaml --manifestdir /tmp/vagrant-puppet/manifests --detailed-exitcodes /tmp/vagrant-puppet/manifests/bootstrap.pp || [ $? -eq 2 ]

Stdout from the command:

Notice: Compiled catalog for lnpp.vagrantup.com in environment production in 0.12 seconds
Notice: /Stage[main]/Bootstrap::Update/Exec[apt-get update]/returns: executed successfully
Notice: /Stage[main]/Bootstrap::Packages/Package[git-core]/ensure: ensure changed 'purged' to 'present'
Notice: /Stage[main]/Bootstrap::Modules/Package[facter]/ensure: ensure changed '1.6.12' to '1.6.13'
Notice: /Stage[main]/Bootstrap::Modules/Package[librarian-puppet]/ensure: created
Notice: Finished catalog run in 316.94 seconds


Stderr from the command:

stdin: is not a tty
Error: Could not find command 'librarian-puppet'
Error: /Stage[main]/Bootstrap::Modules/Exec[librarian-puppet install]/returns: change from notrun to 0 failed: Could not find command 'librarian-puppet'

I removed the vbguest-section to avoid the initial error and ran vagrant up on a freshly cloned repo with success. The only thing I can think of is your precise32 not being the one from http://files.vagrantup.com/precise32.box. Is that the case?

No joy, I completely removed vagrant and the VMs from my system. Rebooted, reinstalled and ran vagrant up. It downloaded precise32 again but still the same librarian-puppet issues.

Confused.... I will do some googling and see if I can work it out. Thanks anyway.

Alright, sounds good! I'll close this for now then.

FYI, I have tried this today on my work iMac (Mavericks). Its never had Vagrant installed before and i upgraded the VirtualBox to 4.3.4.

Still the same issue with librarian-puppet. Out of curiosity, are you running this on OSX?

I'm running this on Mavericks as well yes. I'm however using VirtualBox 4.3.2 so I'll try upgrading and see if the same thing happens.

Hmmm OK thanks.

I don't think VB is causing the issue though. I have tried it with 4.2.x too with the same result.

That is odd indeed... Have you tried running sudo gem install librarian-puppet inside the VM manually to see what happens?

Runs fine when I manually do it.

vagrant@lnpp:~$ sudo gem install librarian-puppet
Successfully installed librarian-puppet-0.9.10
1 gem installed
Installing ri documentation for librarian-puppet-0.9.10...
Installing RDoc documentation for librarian-puppet-0.9.10...

That's a bummer... The gem should already be installed but isn't for some reason. You should be able to run librarian-puppet now though.

The fix for this is to add your ruby bin to exec /opt/vagrant_ruby/bin/

path        => "/bin/:/sbin/:/usr/bin/:/usr/sbin/:/usr/local/bin:/opt/vagrant_ruby/bin/",

I can verify that @tomccaul's fix worked - will implement it right away