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해당 작업을 수행해야 합니다.

스크립트가 어떤 파일에도 경로를 추가하지 않으면 세 파일 중 하나에 경로를 직접 추가하고( export PATH="$HOME/.cargo/bin:$PATH"my 에 추가 ~/.profile) 를 실행할 수 있습니다 source ~/.<respective file>.

답변2

Rust를 수동으로 설치하면 문제가 해결되는 것 같습니다.

curl https://sh.rustup.rs -sSf | sh

관련 정보