首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >货物执行-拒绝[先前]铁锈安装许可-拒绝许可

货物执行-拒绝[先前]铁锈安装许可-拒绝许可
EN

Unix & Linux用户
提问于 2019-01-19 14:20:45
回答 1查看 1.5K关注 0票数 2

我用curl https://sh.rustup.rs -sSf | sh安装了生锈装置,并按照指示进行了安装。安装成功,路径被添加到.bash_profile中,如下所示:

代码语言:javascript
复制
export PATH=$HOME/.cargo/bin:$PATH

回送$PATH显示变量已正确设置,如下所示:

代码语言:javascript
复制
rust@rusty:~$ echo $PATH
/home/rust/.cargo/bin:/usr/local/bin:/usr/bin:/bin:/usr/games

我将/home作为一个单独的分区挂载,并通过/etc/fstab安装如下

代码语言:javascript
复制
# Mounting home partition
/dev/sda4                 /home                 ext4      rw,async,users      0 0

最初,我选择了noexec作为选项之一。但是,取消这一政策并没有给结果带来任何变化。

我怀疑我的默认/home分区权限,但没有任何其他的linux运行框来验证。

代码语言:javascript
复制
total 20
drwx------  2 root     root     16384 Jan 18 08:38 lost+found
drwxr-xr-x 22 rust     rust     4096  Jan 19 19:45 rust

这个权限正确吗?

如果有人能弄清楚我遗漏了什么,注意/做错了什么,以及如何解决和解决这个问题,我们将不胜感激。

在@kusalananda的评论之后意识到

编辑-1

代码语言:javascript
复制
rust@rusty:~$ cargo
bash: /home/rust/.cargo/bin/cargo: Permission denied

它应该提示我使用cargo的帮助文档,但未能如愿以偿。

编辑-2添加了.cargo.cargo/bin的权限

代码语言:javascript
复制
rust@rusty:~$ ls -l .cargo/
total 8
drwxr-xr-x 2 rust rust 4096 Jan 19 18:45 bin
-rw-r--r-- 1 rust rust   37 Jan 19 18:58 env
rust@rusty:~$ ls -l .cargo/bin/
total 108560
-rwxr-xr-x 10 rust rust 11116056 Jan 19 18:45 cargo
-rwxr-xr-x 10 rust rust 11116056 Jan 19 18:45 cargo-clippy
-rwxr-xr-x 10 rust rust 11116056 Jan 19 18:45 cargo-fmt
-rwxr-xr-x 10 rust rust 11116056 Jan 19 18:45 rls
-rwxr-xr-x 10 rust rust 11116056 Jan 19 18:45 rustc
-rwxr-xr-x 10 rust rust 11116056 Jan 19 18:45 rustdoc
-rwxr-xr-x 10 rust rust 11116056 Jan 19 18:45 rustfmt
-rwxr-xr-x 10 rust rust 11116056 Jan 19 18:45 rust-gdb
-rwxr-xr-x 10 rust rust 11116056 Jan 19 18:45 rust-lldb
-rwxr-xr-x 10 rust rust 11116056 Jan 19 18:45 rustup

编辑-3

代码语言:javascript
复制
>> curl https://sh.rustup.rs -sSf | sh
info: downloading installer

Welcome to Rust!

This will download and install the official compiler for the Rust programming 
language, and its package manager, Cargo.

It will add the cargo, rustc, rustup and other commands to Cargo's bin 
directory, located at:

  /home/rusty/.cargo/bin

This path will then be added to your PATH environment variable by modifying the
profile files located at:

  /home/rusty/.profile
  /home/rusty/.bash_profile

You can uninstall at any time with rustup self uninstall and these changes will
be reverted.

Current installation options:

   default host triple: x86_64-unknown-linux-gnu
     default toolchain: stable
  modify PATH variable: yes

1) Proceed with installation (default)
2) Customize installation
3) Cancel installation
>1

info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2019-01-17, rust version 1.32.0 (9fda7c223 2019-01-16)
info: downloading component 'rustc'
 79.5 MiB /  79.5 MiB (100 %) 883.2 KiB/s ETA:   0 s                
info: downloading component 'rust-std'
 54.3 MiB /  54.3 MiB (100 %) 611.2 KiB/s ETA:   0 s                
info: downloading component 'cargo'
  4.4 MiB /   4.4 MiB (100 %) 761.4 KiB/s ETA:   0 s                
info: downloading component 'rust-docs'
  8.5 MiB /   8.5 MiB (100 %) 553.6 KiB/s ETA:   0 s                
info: installing component 'rustc'
info: installing component 'rust-std'
info: installing component 'cargo'
info: installing component 'rust-docs'
info: default toolchain set to 'stable'

  stable installed - (error reading rustc version)


Rust is installed now. Great!

To get started you need Cargo's bin directory ($HOME/.cargo/bin) in your PATH 
environment variable. Next time you log in this will be done automatically.

To configure your current shell run source $HOME/.cargo/env
EN

回答 1

Unix & Linux用户

回答已采纳

发布于 2019-01-23 05:03:11

问题是我所拥有的/etc/fstab条目。它在我改变了我的安装方式后起了作用。以下是我的新fstab条目:

代码语言:javascript
复制
/dev/sda4            /home/rusty            ext4            defaults            0  2

我将/home/rusty的所有者和组改为rusty,它起了作用。

票数 0
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/495451

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档