Open drauschenbach opened 8 months ago
How is rust/cargo installed? Can you run which cargo
from root env?
How is rust/cargo installed? Can you run
which cargo
from root env?
Rust was installed with curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
. Yes the root env can find cargo, which is what this is demonstrating:
$ sudo su -
$ cargo --version
cargo 1.75.0 (1d8b05cdd 2023-11-20)
It is sudo
that seems intentionally unsupported by the Rust tooling.
Yes the root env can find cargo, which is what this is demonstrating:
But could you run which cargo
on root env, to see exact path?
And could you try sudo -i cargo
to see if it can be found.
It is sudo that seems intentionally unsupported by the Rust tooling.
It's not about rust tooling. This code checks for cargo presence.
So seems luarocks.fs.is_tool_available
cannot find it.
Like this? I did the rustup install separately for both my user and the root user.
$ sudo su -
root@bitscope-0:~# which cargo
/root/.cargo/bin/cargo
Maybe this has to do with sudo
not running the shell .profile
, which contains:
mesg n 2> /dev/null || true
. "$HOME/.cargo/env"
I can install this module on my Mac with
sudo luarocks install lua-ryaml
. However on Debian 12 Linux the Rust environment does not get set whensudo
is invoked. this thread mentions something similar.In my own
mlua
based projects I'd like to document for the end user how to install the LuaRock.