You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm a Rust developer, and have installed Rust through rustup (https://rustup.rs) already, so it's not considered a system utility (it's not inside /usr/bin or /usr/local/bin) and not available inside the default sudo PATH. Rather, it's inside my home at ~/.cargo/bin.
Thus, running the Makefile through make calls sudo cargo, which will not exist inside the sudo'ed PATH.
So you get an error saying cargo doesn't exist.
One has to set the PATH inside a sudo using
sudo PATH=$PATH your-command
So you would have to replace sudo cargo build by sudo PATH=$PATH cargo build inside the Makefile.
An alternative is to remove calls to sudo within the Makefile and instead do a sudo -s before running it, or do sudo PATH=$PATH make install.
The text was updated successfully, but these errors were encountered:
Describe the bug
I'm a Rust developer, and have installed Rust through rustup (https://rustup.rs) already, so it's not considered a system utility (it's not inside
/usr/bin
or/usr/local/bin
) and not available inside the defaultsudo
PATH. Rather, it's inside my home at~/.cargo/bin
.Thus, running the Makefile through
make
callssudo cargo
, which will not exist inside the sudo'ed PATH.So you get an error saying cargo doesn't exist.
One has to set the PATH inside a sudo using
sudo PATH=$PATH your-command
So you would have to replace
sudo cargo build
bysudo PATH=$PATH cargo build
inside the Makefile.An alternative is to remove calls to sudo within the Makefile and instead do a
sudo -s
before running it, or dosudo PATH=$PATH make install
.The text was updated successfully, but these errors were encountered: