5
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Rust: error: could not exec the linker `cc`: No such file or directory

Last updated at Posted at 2017-08-05

下記のようにRustをインストール、
いつものようにHello Worldを書いてコンパイルしてみたらエラーが出た。

動作環境はUbuntu16.04

command
curl https://sh.rustup.rs -sSf | sh
hello.rs
fn main() {
    println!("Hello World!");
}
command
rustc hello.rs
response
error: could not exec the linker `cc`: No such file or directory (os error 2)

以下のコマンドを実行してみたところ、エラーが解消しコンパイルできた

command
sudo apt-get update
sudo apt-get install build-essential 
5
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?