I’m running Debian Unstable, and during the last update, I refused to let aptitude overwrite my /etc/sudoers file, as I wanted to merge it by hand instead. But I forgot to do it later, and the next time I ran aptitude I got this:
Preconfiguring packages ...
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)
A package failed to install. Trying to recover:
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.
Looking at the changelog of sudo:
$ aptitude changelog sudo
we can see:
sudo (1.8.2-1) unstable; urgency=low
* new upstream version, closes: #637449, #621830
* include common-session in pam config, closes: #519700, #607199
* move secure_path from configure to default sudoers, closes: #85123, 85917
* improve sudoers self-documentation, closes: #613639
* drop --disable-setresuid since modern systems should not run 2.2 kernels
* lose the --with-devel configure option since it's breaking builds in
subdirectories for some reason
-- Bdale Garbee Wed, 24 Aug 2011 13:33:11 -0600
So now, the secure_path option needs to be set in /etc/sudoers. To do this, run visudo as root:
and after this line:
add this:
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
Now aptitude should be working again!
转载自:http://cksum.org/blog/149-dpkg-warning-ldconfig-not-found-in-path-or-not-executable
阅读(6956) | 评论(0) | 转发(0) |