Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.
dpkg: warning: 'ldconfig' not found in PATH or not executable.
dpkg: error: 1 expected program not found in PATH or not executable.
Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin.
share|improve this question
1  
Please update your answer and give more information, like when that error occurs (using apt-get?) and your Ubuntu version. Also post the results of the following commands: which ldconfig and echo $PATH. –  Salem Dec 2 '12 at 14:52
add comment

1 Answer

Add /sbin to your $PATH as root

Check whether /etc/sudoers file has the correct PATH or not. By default /etc/sudoers should have the path mentioned below. If in case its not present go ahead and add /sbin.

Sample /etc/sudoers file:

Defaults    env_reset
Defaults    secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
share|improve this answer
    
_How do this? In terminal? –  Radica Dec 2 '12 at 18:17
    
Open terminal and type gksu gedit /etc/sudoers –  devav2 Dec 2 '12 at 18:27
    
root@radica-K54C:~# /etc/sudoers -bash: /etc/sudoers: Permission denied –  Radica Dec 2 '12 at 18:31
    
If you already logged in as root use vi /etc/sudoers to edit the file –  devav2 Dec 2 '12 at 18:32
1  
How to resolve? –  Radica Dec 5 '12 at 21:00
show 4 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.