[solved] sudo slapt-get, slapt-src

You have a problem with Salix? Post here and we'll do what we can to help.
User avatar
barchi
Posts: 26
Joined: 12. Oct 2012, 06:47

[solved] sudo slapt-get, slapt-src

Post by barchi »

i came from ArchLinux and i normally use sudo instead of changing to superuser.
Sudo package installation went fine, visudo with nano, uncommenting the "wheel" group and adding the current user to the group "wheel".
So far so good...

But when i enter:

Code: Select all

sudo slapt-get -u
this message comes:

Code: Select all

sudo: slapt-get: command not found
The same happens when using slapt-src as sudo, any ideas Why?
Last edited by barchi on 17. Oct 2012, 06:21, edited 1 time in total.
64bit Salix OS 14.0 beta1 xfce4 basic installation
User avatar
gapan
Salix Wizard
Posts: 6368
Joined: 6. Jun 2009, 17:40

Re: sudo slapt-get, slapt-src

Post by gapan »

It's not in your PATH variable.
Image
Image
User avatar
barchi
Posts: 26
Joined: 12. Oct 2012, 06:47

Re: sudo slapt-get, slapt-src

Post by barchi »

Hello gapan,

i searched the slack-book for the PATH thing, im not sure if i understood it right. When i enter "set" in Terminal, i get this:
ALSA_CARD=SB
ALSA_CTL_CARD=SB
ALSA_PCM_CARD=SB
BASH=/usr/bin/bash
BASHOPTS=cmdhist:expand_aliases:extquote:force_fignore:hostcomplete:interactive_comments:progcomp:promptvars:sourcepath
BASH_ALIASES=()
BASH_ARGC=()
BASH_ARGV=()
BASH_CMDS=()
BASH_LINENO=()
BASH_SOURCE=()
BASH_VERSINFO=([0]="4" [1]="2" [2]="37" [3]="2" [4]="release" [5]="x86_64-slackware-linux-gnu")
BASH_VERSION='4.2.37(2)-release'
COLORTERM=Terminal
COLUMNS=80
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-qOyAwXIfJD,guid=f6ea102da29471d7122e268800000026
DESKTOP_SESSION=xfce
DESKTOP_STARTUP_ID=
DIRSTACK=()
DISPLAY=:0.0
EUID=1000
GDK_USE_XFT=1
GDMSESSION=xfce
GDM_XSERVER_LOCATION=local
GLADE_CATALOG_PATH=:/usr/share/glade3/catalogs
GLADE_MODULE_PATH=:/usr/share/glade3/pixmaps
GLADE_PIXMAP_PATH=:/usr/lib64/glade3/modules
GROUPS=()
G_BROKEN_FILENAMES=1
G_FILENAME_ENCODING=@locale
HISTFILE=/home/harry/.bash_history
HISTFILESIZE=500
HISTSIZE=500
HOME=/home/harry
HOSTNAME=slack.slack.org
HOSTTYPE=x86_64
IFS=$' \t\n'
INPUTRC=/etc/inputrc
LANG=de_DE.utf8
LC_COLLATE=C
LESS=-M
LESSOPEN='|lesspipe.sh %s'
LINES=24
LOGNAME=harry
LS_COLORS=
LS_OPTIONS='-F -b -T 0 --color=auto'
MACHTYPE=x86_64-slackware-linux-gnu
MAILCHECK=60
MANPATH=/usr/local/man:/usr/man
MINICOM='-c on'
OPTERR=1
OPTIND=1
OSTYPE=linux-gnu
PAGER=most
PATH=/usr/local/bin:/usr/bin:/bin:/usr/games:.
PIPESTATUS=([0]="1")
PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig
PPID=2345
PS1='\u[\W]\$ '
PS2='> '
PS4='+ '
PWD=/home/harry
SESSION_MANAGER=local/slack:@/tmp/.ICE-unix/2220,unix/slack:/tmp/.ICE-unix/2220
SHELL=/bin/bash
SHELLOPTS=braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor
SHLVL=2
SSH_AGENT_PID=2215
SSH_AUTH_SOCK=/tmp/ssh-Nt1jfh4Hve3b/agent.2149
T1LIB_CONFIG=/usr/share/t1lib/t1lib.config
TERM=xterm
UID=1000
USER=harry
USERNAME=harry
WINDOWID=31457284
WINDOWPATH=7
XAUTHORITY=/home/harry/.Xauthority
XDG_CONFIG_DIRS=/etc/xdg
XDG_DATA_DIRS=/usr/local/share/:/usr/share/:/usr/share/gdm/:/usr/share
XDG_MENU_PREFIX=xfce-
XDG_SESSION_COOKIE=1bf4ee017e94bc54ff4e3b450000001a-1350036973.367453-1359733849
_=']'
where can i add sudo to the PATH variable? In the bashrc or...?
64bit Salix OS 14.0 beta1 xfce4 basic installation
User avatar
gapan
Salix Wizard
Posts: 6368
Joined: 6. Jun 2009, 17:40

Re: sudo slapt-get, slapt-src

Post by gapan »

It doesn't have to do with sudo. slapt-get, slapt-src and all other system tools are in /sbin and /usr/sbin. You need to add these to your PATH. Otherwise sudo /usr/sbin/slapt-get will work.
Image
Image
User avatar
jayseye
Posts: 233
Joined: 24. Jul 2011, 17:22
Location: Brownsmead, Oregon (Center of the Universe)

Re: sudo slapt-get, slapt-src

Post by jayseye »

Yes, your previous report of the output from "set" makes it clear that the relevant directories are missing from your PATH:

Code: Select all

PATH=/usr/local/bin:/usr/bin:/bin:/usr/games:.
User avatar
barchi
Posts: 26
Joined: 12. Oct 2012, 06:47

Re: sudo slapt-get, slapt-src

Post by barchi »

You need to add these to your PATH.
how?
64bit Salix OS 14.0 beta1 xfce4 basic installation
User avatar
gapan
Salix Wizard
Posts: 6368
Joined: 6. Jun 2009, 17:40

Re: sudo slapt-get, slapt-src

Post by gapan »

Code: Select all

export PATH=$PATH:/sbin:/usr/sbin
end of ~/.bashrc will do.
Image
Image
User avatar
barchi
Posts: 26
Joined: 12. Oct 2012, 06:47

Re: sudo slapt-get, slapt-src

Post by barchi »

gapan wrote:

Code: Select all

export PATH=$PATH:/sbin:/usr/sbin
end of ~/.bashrc will do.
yes, worked!
Thank You :-)

btw: "sudo mc" worked without the PATH, therefore i thought system config was correct.
64bit Salix OS 14.0 beta1 xfce4 basic installation
User avatar
jayseye
Posts: 233
Joined: 24. Jul 2011, 17:22
Location: Brownsmead, Oregon (Center of the Universe)

Re: sudo slapt-get, slapt-src

Post by jayseye »

The mc command is present in the PATH for normal (non-root) users:

username[~]$ which mc
/usr/bin/mc

OTOH, commands intended for root users are generally located in sbin directories (System Binaries).
User avatar
barchi
Posts: 26
Joined: 12. Oct 2012, 06:47

Re: sudo slapt-get, slapt-src

Post by barchi »

now that you 've told me, i've checked both directories and your right, i didnt know that, thank you :-)
64bit Salix OS 14.0 beta1 xfce4 basic installation
Post Reply