environment variables - Command shows up under 'which' but system can't find it - Ask Ubuntu


this question has answer here:

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

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User