LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Path problem, when updating. (https://www.linuxquestions.org/questions/linux-newbie-8/path-problem-when-updating-940803/)

Robelish 04-20-2012 04:47 AM

Path problem, when updating.
 
Hello so when im trying to update my packages i get this error.


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.
E: Sub-process /usr/bin/dpkg returned an error code (2)

I also get the same when i do it with sudo.

Im using LinuxMint 12 kde.
Ive sneaked around trying to solve it But i havnt got a decent result yet.

pan64 04-20-2012 06:22 AM

are you sure ldconfig is available?

Satyaveer Arya 04-20-2012 06:37 AM

In this case, secure_path option needs to be set in /etc/sudoers file.
and after this line in /etc/sudoers file:
Quote:

Defaults env_reset
add this-
Quote:

Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
and then updation process should work fine.

VDP76 04-20-2012 07:38 AM

Quote:

Originally Posted by Robelish (Post 4658160)
Ive sneaked around trying to solve it But i havnt got a decent result yet.

as a suggestion, when you have issues try to searching LQ first, often the solution for you is already out there... ;)

Robelish 04-20-2012 10:15 AM

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

Thats how my sudoers looks like, and i still get problems updating.

Robelish 04-20-2012 02:30 PM

Am i missing somthing here or :S, anyone got some more i can work with?

VDP76 04-20-2012 05:52 PM

it seems like those two lines are the "usual" solution to this problem.
I'll try just a shot in the dark: have you checked the permissions of your sudoers file??
Code:

ls -l /etc/sudoers


All times are GMT -5. The time now is 06:22 AM.