Сборка Firefox «у вас должен быть« rustc »на вашем пути»?

Я пытаюсь собрать Firefox 51 из исходного кода на Mint 17.

Я уже запустил сценарий boostrap, и он установил 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 bootstrap , и он установил ржавчину!

Теперь, когда я снова запускаю ./ 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 теперь имеет источник /home/user/.cargo/env внизу. И я перезапустил терминал. И ./ mach bootstrap и ./ mach build по-прежнему не может найти ржавчину.

Как мне это исправить?

0
09.02.2017, 10:44
2 ответа

Установка Rust вручную, похоже, устранила проблему:

curl https://sh.rustup.rs -sSf | sh
0
28.01.2020, 02:34

Выполнение source ~/.profile сработало для меня, поскольку сценарий bootstrap уже добавил путь rustc в мой ~/.profile.

Если путь добавлен в ~/.bashrc или ~/.bash_profile, то source ~/.bashrc или source ~/.bash_profile соответственно должны сработать.

Если путь не добавляется скриптом ни в один из файлов, вы можете добавить путь самостоятельно в любой из трех файлов (export PATH="$HOME/.cargo/bin:$PATH" добавляется в моем ~/.profile) и сделать source ~/.<отдельный файл>.

2
28.01.2020, 02:34

Теги

Похожие вопросы