[SOLVED] Problems with updating

Archived topics about LMDE 1 and LMDE 2
Locked
fetterchefkoch

[SOLVED] Problems with updating

Post by fetterchefkoch »

Hello Everyone :D,

I just tried to update my linux mint through the console with

Code: Select all

sudo apt-get update
sudo apt-get upgrade
and the errormessage I get is

Code: Select all

Extracting templates from packages: 100%
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)
I don't know what the problem is.

Thanks in advance for any help :D.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
rich_roast

Re: Problems with updating

Post by rich_roast »

Check that root's path is set correctly with

Code: Select all

sudo -s
echo $PATH
fetterchefkoch

Re: Problems with updating

Post by fetterchefkoch »

Code: Select all

lenovo-laptop # echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
So I suppose the the folder /usr/local/sbin and /usr/sbin and /sbin are missing.
The next question would be how to add them :D.
User avatar
Midnighter
Level 6
Level 6
Posts: 1327
Joined: Tue May 22, 2007 1:52 pm
Location: Western Australia

Re: Problems with updating

Post by Midnighter »

What version of mint are you using? What is the contents of your /etc/apt/sources.list file? Is this a fresh install? have you added any repos?
If you accept - and I do - that freedom of speech is important, then you are going to have to defend the indefensible. That means you are going to be defending the right of people to read, or to write, or to say, what you don't say or like or want said.
fetterchefkoch

Re: Problems with updating

Post by fetterchefkoch »

Did you mean with "version of mint":

Code: Select all

uname -a
Linux lenovo-laptop 2.6.32-5-amd64 #1 SMP Thu Nov 25 18:02:11 UTC 2010 x86_64 GNU/Linux

?

content of /etc/apt/sources.list:
deb http://packages.linuxmint.com/ debian main upstream import
deb http://ftp.debian.org/debian testing main contrib non-free
deb http://security.debian.org/ testing/updates main contrib non-free
deb http://www.debian-multimedia.org testing main non-free

no it is not a fresh install. I've been using it for about 3 month and have done various updates and installs. I haven't had any problems until yesterday and I didn't install anything else.

I tried to update my mint via sudo su. It updated everything except the packages which do need the path to sbin.
Gerd50

Re: Problems with updating

Post by Gerd50 »

Hello fetterchefkoch,

to fix it run

Code: Select all

gksu gedit etc/sudoers
in sudoers you'll find the line:

Code: Select all

Defaults   env_reset
under this line add:

Code: Select all

Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
This fix worked for me, hope for you too :wink:
proxima_centauri

Re: Problems with updating

Post by proxima_centauri »

* Moved to LMDE (Linux Mint Debian) < Update/Upgrade Issues
fetterchefkoch

Re: Problems with updating

Post by fetterchefkoch »

Well it worked now. Thanks for the useful tips :D
Locked

Return to “LMDE Archive”