安装稳定-(读取 rustc 版本时出错)
stable installed - (error reading rustc version)
我的 linux 盒子 运行 生锈了。
这是我的安装日志:
>> 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/linuxbox/.cargo/bin
This path will then be added to your PATH environment variable by modifying the
profile files located at:
/home/linuxbox/.profile
/home/linuxbox/.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.
配置你当前的 shell 运行 source $HOME/.cargo/env
我已经设置了环境变量并且我的路径显示 /home/linuxbox/.cargo/bin/cargo
。但是,当我输入“cargo”时,我得到
>> cargo
bash: /home/linuxbox/.cargo/bin/cargo: Permission denied
.cargo
和.rustup
目录权限为:
>> ll .cargo/ .rustup/
.cargo/:
total 16K
4.0K drwxr-xr-x 3 linuxbox linuxbox 4.0K Jan 20 10:13 ./
4.0K drwxr-xr-x 27 linuxbox linuxbox 4.0K Jan 20 10:08 ../
4.0K drwxr-xr-x 2 linuxbox linuxbox 4.0K Jan 20 10:08 bin/
4.0K -rw-r--r-- 1 linuxbox linuxbox 37 Jan 20 10:13 env
.rustup/:
total 28K
4.0K drwxr-xr-x 6 linuxbox linuxbox 4.0K Jan 20 10:12 ./
4.0K drwxr-xr-x 27 linuxbox linuxbox 4.0K Jan 20 10:08 ../
4.0K drwxr-xr-x 2 linuxbox linuxbox 4.0K Jan 20 10:13 downloads/
4.0K -rw-r--r-- 1 linuxbox linuxbox 124 Jan 20 10:13 settings.toml
4.0K drwxr-xr-x 2 linuxbox linuxbox 4.0K Jan 20 10:13 tmp/
4.0K drwxr-xr-x 3 linuxbox linuxbox 4.0K Jan 20 10:12 toolchains/
4.0K drwxr-xr-x 2 linuxbox linuxbox 4.0K Jan 20 10:13 update-hashes/
权限似乎 o.k 但不知道为什么我会收到 Permission denied
错误。
有人可以提供一些帮助troubleshoot/fix吗?
编辑:
我的发行版:Antix(基于 Debian),我有一个单独的 /home
分区。
通过在 /etc/fstab
中添加以下行来安装我的 /home
分区,设法完成这项工作
/dev/sda4 /home/rusty ext4 defaults 0 2
谢谢大家
我的 linux 盒子 运行 生锈了。
这是我的安装日志:
>> 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/linuxbox/.cargo/bin
This path will then be added to your PATH environment variable by modifying the
profile files located at:
/home/linuxbox/.profile
/home/linuxbox/.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.
配置你当前的 shell 运行 source $HOME/.cargo/env
我已经设置了环境变量并且我的路径显示 /home/linuxbox/.cargo/bin/cargo
。但是,当我输入“cargo”时,我得到
>> cargo
bash: /home/linuxbox/.cargo/bin/cargo: Permission denied
.cargo
和.rustup
目录权限为:
>> ll .cargo/ .rustup/
.cargo/:
total 16K
4.0K drwxr-xr-x 3 linuxbox linuxbox 4.0K Jan 20 10:13 ./
4.0K drwxr-xr-x 27 linuxbox linuxbox 4.0K Jan 20 10:08 ../
4.0K drwxr-xr-x 2 linuxbox linuxbox 4.0K Jan 20 10:08 bin/
4.0K -rw-r--r-- 1 linuxbox linuxbox 37 Jan 20 10:13 env
.rustup/:
total 28K
4.0K drwxr-xr-x 6 linuxbox linuxbox 4.0K Jan 20 10:12 ./
4.0K drwxr-xr-x 27 linuxbox linuxbox 4.0K Jan 20 10:08 ../
4.0K drwxr-xr-x 2 linuxbox linuxbox 4.0K Jan 20 10:13 downloads/
4.0K -rw-r--r-- 1 linuxbox linuxbox 124 Jan 20 10:13 settings.toml
4.0K drwxr-xr-x 2 linuxbox linuxbox 4.0K Jan 20 10:13 tmp/
4.0K drwxr-xr-x 3 linuxbox linuxbox 4.0K Jan 20 10:12 toolchains/
4.0K drwxr-xr-x 2 linuxbox linuxbox 4.0K Jan 20 10:13 update-hashes/
权限似乎 o.k 但不知道为什么我会收到 Permission denied
错误。
有人可以提供一些帮助troubleshoot/fix吗?
编辑:
我的发行版:Antix(基于 Debian),我有一个单独的 /home
分区。
通过在 /etc/fstab
/home
分区,设法完成这项工作
/dev/sda4 /home/rusty ext4 defaults 0 2
谢谢大家