是否可以在没有管理员权限的情况下在 Linux 上安装 Rust?

Is it possible to install Rust on Linux without admin privileges?

版本:1.0.0 beta 5

我已经 运行 install.sh 带有参数“--prefix=$HOME/local”的脚本(安装到我的主目录)

这工作正常,但是 ldconfig(install.sh 进程的一部分)由于缺少 root 权限而失败,然后 rustc 无法找到库

rustc: error while loading shared libraries: librustc_driver-4e7c5e5c.so: cannot open shared object file: No such file or directory

如果指定不同的前缀,则需要设置LD_LIBRARY_PATH环境变量。这是一个通常未设置的冒号分隔列表(如 PATH)。您需要在 shell 配置中使用这样的东西:

export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:~/local/lib"