Firefoxのビルド「パスに 'rustc'が必要です」?

Firefoxのビルド「パスに 'rustc'が必要です」?

Mint 17のソースからFirefox 51をビルドしようとしています。

ブーストラップスクリプトを実行してRustをインストールしましたが./mach build見つかりませんでしたか?

エラーは次のとおりです。

 0:03.58 checking for rustc... not found
 0:03.58 checking for cargo... not found
 0:03.58 ERROR: Rust compiler not found.
 0:03.58 To compile rust language sources, you must have 'rustc' in your path.
 0:03.58 See https//www.rust-lang.org/ for more information.
 0:03.58 
 0:03.58 You can install rust by running './mach bootstrap'
 0:03.58 or by directly running the installer from https://rustup.rs/
 0:03.58 

しかし、実行してみると./mach bootstrapRustがインストールされました!

もう一度実行すると、次のよう./mach bootstrapに表示されます。

Could not find a Rust compiler.

You have some rust files in /home/user/.cargo/bin
but they're not part of this shell's PATH.

To add these to the PATH, edit your shell initialization
script, which may be called ~/.bashrc or ~/.bash_profile or
~/.profile, and add the following line:

    source /home/user/.cargo/env

Then restart your shell and run the bootstrap script again.

だからそれが私がしたことです。~/.profile今は一番下にありますsource /home/user/.cargo/env。端末を再起動しました。そして./mach bootstrapまだ./mach build溶けたが見つかりませんでした。

どうすれば解決できますか?

ベストアンサー1

source ~/.profile起動スクリプトはすでにRustcパスをmy ~/.profile

パスがまたは~/.bashrc~/.bash_profile追加されたら、source ~/.bashrcそれぞれsource ~/.bash_profileに対応する必要があります。

スクリプトがどのファイルにもパスを追加しない場合は、3つのファイルのいずれかに直接パスを追加し(export PATH="$HOME/.cargo/bin:$PATH"myに追加~/.profile)、実行できますsource ~/.<respective file>

おすすめ記事