dpkg: warning: 'ldconfig' not found in PATH or not executable - Ubuntu 12 - Vagrant
6
votes
2
answers
17771
views
I am working on setting up a Vagrant / Puppet install so that new developers can have a clean development environment for our Rails project.
The basic Vagrant configure commands are:
config.vm.box = 'precise32'
config.vm.box_url = 'http://files.vagrantup.com/precise32.box '
Overall, the install seems to be going well. I've got RVM, Postgres, and Ruby installed and running.
However, whenever I try to install the "Heroku Toolbelt" using this command:
su -l vagrant -c 'wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh'
I run into this problem:
... Lots of Hits and downloads...
The following extra packages will be installed:
foreman heroku libruby1.9.1 ruby1.9.1
Suggested packages:
ruby1.9.1-examples ri1.9.1 graphviz ruby1.9.1-dev
The following NEW packages will be installed:
foreman heroku heroku-toolbelt libruby1.9.1 ruby1.9.1
0 upgraded, 5 newly installed, 0 to remove and 132 not upgraded.
Need to get 0 B/4,997 kB of archives.
After this operation, 13.1 MB of additional disk space will be used.
dpkg: warning: 'ldconfig' not found in PATH or not executable.
dpkg: warning: 'start-stop-daemon' not found in PATH or not executable.
dpkg: error: 2 expected programs not found in PATH or not executable.
Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin.
E: Sub-process /usr/bin/dpkg returned an error code (2)
(*Note*) This happens if I run the command manually after vagrant ssh. Also, the actual shell configuration gets the error when it initially runs.
Since this is a vagrant box, it is easy to 'vagrant destroy' and then try again but I get the same issue consistently.
The strange thing is, my PATH does definitely include those folders:
echo $PATH
/home/vagrant/.rvm/gems/ruby-1.9.3-p194/bin:/home/vagrant/.rvm/gems/ruby-1.9.3-p194@global/bin:/home/vagrant/.rvm/rubies/ruby-1.9.3-p194/bin:/home/vagrant/.rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/vagrant_ruby/bin
the file 'ldconfig' is in /sbin and is an executable:
cd /sbin
ls -l l*
-rwxr-xr-x 1 root root 465 Apr 20 2012 ldconfig
Same with start-stop-daemon:
-rwxr-xr-x 1 root root 26752 Apr 12 2012 start-stop-daemon
So, not sure what it is really complaining about... Any suggestions? Some permissions issue with Vagrant?
Asked by Dave Collins
(163 rep)
Aug 19, 2013, 08:25 PM
Last activity: Mar 23, 2025, 07:46 PM
Last activity: Mar 23, 2025, 07:46 PM