Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1762372
  • 博文数量: 234
  • 博客积分: 4966
  • 博客等级: 上校
  • 技术积分: 3322
  • 用 户 组: 普通用户
  • 注册时间: 2006-11-13 01:03
文章分类

全部博文(234)

文章存档

2017年(2)

2016年(1)

2015年(8)

2014年(11)

2013年(44)

2012年(27)

2011年(22)

2010年(30)

2009年(37)

2008年(6)

2007年(45)

2006年(1)

分类: LINUX

2011-09-13 15:42:38

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:

# 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!

转载自:http://cksum.org/blog/149-dpkg-warning-ldconfig-not-found-in-path-or-not-executable


阅读(6947) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~