Debian

dpkg: warning: ‘ldconfig’ not found in PATH or not executable

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 <email@removed>  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:

# visudo

and after this line:

Defaults	env_reset

add this:

Defaults	secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

Now aptitude should be working again!

30 Comments

speak up

Add your comment below, or trackback from your own site.

Subscribe to these comments.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

*Required Fields