environment variables - Command shows up under 'which' but system can't find it - Ask Ubuntu
this question has answer here:
- environment variables when run 'sudo' 5 answers
i have ubuntu installed on 1 partition of computer , i'm trying install arch linux on second partition. i'm having trouble bootable usb, i'm trying install after booting ubuntu , add binary path $path , pacstrap command need shows when use command, doesn't work when try run it. use ./pacstrap, needs able find other binaries in same directory.
is there reason environment able find binary 'which' not when execute it?
john@thebrain:/storage/part4/software/root.x86_64/bin$ export path john@thebrain:/storage/part4/software/root.x86_64/bin$ sudo pacstrap /mnt base base-devel sudo: pacstrap: command not found john@thebrain:/storage/part4/software/root.x86_64/bin$ pacstrap /storage/part4/software/root.x86_64/bin/pacstrap john@thebrain:/storage/part4/software/root.x86_64/bin$
it's because you're using sudo
, resets environment use own secure path. can tell use normal path this:
sudo env path=$path pacstrap
Comments
Post a Comment