LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   root's PATH incomplete when upgrading from Woody (https://www.linuxquestions.org/questions/debian-26/roots-path-incomplete-when-upgrading-from-woody-140170/)

avram 01-29-2004 07:46 PM

root's PATH incomplete when upgrading from Woody
 
I just finished downloading 180MB of packages to upgrade to Sid from Woody, and apt-get gives me this:

Preconfiguring packages . . .
dpkg: 'ldconfig' not found on PATH.
dpkg: 'start-stop-daemon' not found on PATH.
dpkg: 'install-info' not found on PATH.
dpkg: 'update-rc.d' not found on PATH.
dpkg: 4 expected program(s) not found on PATH.
NB: root's PATH should usually contain /usr/local/sbin, /usr/sbin and
E: Sub-process /usr/bin/dpkg returned an error code (2)

So does this mean that I need to add these directories to root's PATH? And if so, how do I go about doing that?
(On a side note, is there an easy way to copy text from an Xconsole to some other location? I had to manually retype the above output)

Any help is much appreciated,
Thank You

-Avi

leonscape 01-29-2004 08:00 PM

While as root type
echo $PATH

This will give you the current path, so you can check if their set correctly.
To set new directories for path type
export /the/new/directory:another/new/directory:$PATH

These will set them up temporarily, To make them permanant you need to edit the /root/.profile file.

If you su'd to root make sure you followed su with a -, otherwise it will use your normal users path.

To copy something from xconsole, simply hi-light with your mouse and middle-click where you want to paste the text.

Also did you do an upgrade or a dist-upgrade?

avram 01-29-2004 08:19 PM

Thanks for the reply.

This is what happened after I tried what you suggested:

debian:/home/avram# echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
debian:/home/avram# export /usr/local/sbin:/usr/sbin:$PATH
bash: export: `/usr/local/sbin:/usr/sbin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X
11:/usr/games': not a valid identifier

(Thanks for the hi-light and middle-click trick, that's really cool!)
I did a dist-upgrade

-Avi

leonscape 01-29-2004 08:47 PM

Sorry my mistake try

export PATH=/usr/local/sbin:/usr/sbin:$PATH

Also try using "su -" instead of "su" to get root access, as this should automatically give you the correct path.

avram 01-29-2004 08:55 PM

Ok- I used "su -" this time, and when I typed "echo $PATH", it had the directories that were missing...
So maybe I should try "apt-get dist-upgrade" after "su -"?

Thanks again for the prompt reply
-Avi

leonscape 01-29-2004 09:01 PM

Yes go for it, It should work now.

avram 01-29-2004 11:21 PM

Thanks- that worked great!


All times are GMT -5. The time now is 09:04 AM.