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:
# visudoand 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!
Thanks for this I had the same issue after keeping my sudoers and this fixed it for me.
You’re my hero!
Now everything is working again
Wow! Thanks! I refused to let aptitude overwrite my /etc/sudoers file too and got that problem with path.
Thank you. I found several other older threads before this one. Yours was on the mark.
Just happened in wheezy (testing) a couple of days ago.
Thanks for posting the solution!
Thanks dude, Debian testing here and this happened to me some days ago.
Thank you very much!!!
Greetings from Argentina
Thank you so much! Same problem on Mint LMDB base on Debian testing
Je vous salut du Québec! (Canada)
Thanks for this! Worked like a charm on my Linux Mint Debian unstable install.
Thanks! You were the first hit on google and it worked!
Thanks for this post. I was wondering if I had broken something. This solved the problem!
Cheers,
Jonathan
Thanks, this helped me aswell
thanks! I had the same problem, this fixed the problem
Thanks!!!
Thanks!
Thanks !! sudo apttiude with a simple user works again right now.
Wow, it worked. Thanks for that!
Thanks, quick and easy!
Thanks man, Debian testing here and this happened to me some days ago. This just save me precious time.
Many thanks!
thanks this helps
Hello, thanks for your tutorial. I’m so happy for solutionate de problem
Thanks a ton !
Like everyone have already sad, thank you very much, man! I was struggling with this problem with the update for Debian Wheezy (testing) and your tip worked! Thanks!
It worked
hats off to you
you are linux master !!!!!!!!!!!!!!!!!!
Thanks, this fixed me up as well!
Awesome, thanks, saved me some headaches
Thank you for this.
Thanks for the quick fix!
Thanks very much! You’re my hero!