Rust compiler cannot find box for 'std'

I recently downloaded and unpacked Rust Language from this site (Linux 64-bit).

Then I installed Rust using the given script in the file install.sh:

root@kali:~# /root/rust-1.9.0-x86_64-unknown-linux-gnu/install.sh
install: uninstalling component 'rustc'
install: creating uninstall script at /usr/local/lib/rustlib/uninstall.sh
install: installing component 'rustc'
install: installing component 'rust-std-x86_64-unknown-linux-gnu'
install: installing component 'rust-docs'
install: installing component 'cargo'

    Rust is ready to roll.

I am trying to install a cargo box, but I continue to encounter this error:

root@kali:~# cargo install racer
    Updating registry `https://github.com/rust-lang/crates.io-index`
   Compiling winapi v0.2.7
   Compiling bitflags v0.5.0
error: can't find crate for `std` [E0463]
error: aborting due to previous error
Build failed, waiting for other jobs to finish...
error: can't find crate for `std` [E0463]
error: aborting due to previous error
error: failed to compile `racer v1.2.10`, intermediate artifacts can be found at `/root/target-install`

cargo install cargo-edit failed with the same result as above, so it is not limited to one specific package.

Even creating a simple program:

fn main() {
    println!("Hello, world!");
}

in the file with the name hello.rsand the launch rustc hello.rsdoes not compile; it gives the same error: error: can't find crate for 'std' [E0463].

The download was carried out with a directory rust-std-x86_64-unknown-linux-gnu, which, I believe, is a std-box. How can I tell rustc to find this directory when trying to find the std box?

+4
1

. , tar,

$HOME/rust-1.10.0-x86_64-unknown-linux-gnu

arch=x86_64-unknown-linux-gnu
dl=$HOME/rust-1.10.0-$arch
$dl/rustc/bin/rustc -L $dl/rustc/lib \
    -L $dl/rust-std-$arch/lib/rustlib/$arch/lib \
    hello.rs

, - rustup, .

Coupla

  • root.
  • , bash -l, rustup.

( newb)

+1

All Articles