LoginSignup
9
3

More than 3 years have passed since last update.

Error trying to exec 'cc1plus': execvp: No such file or directory

Posted at

経緯

$ pip install matplotlib

これを実行すると、
Error trying to exec 'cc1plus': execvp: No such file or directory
と言われハマった。
検索すると

$ apt-get install g++

をすれば直るらしいけど直らなかった。よくよく調べると、gccとg++のバージョンを合わせないといけないとの事らしい。

解決法

$ gcc --version
gcc (Raspbian 4.8.5-4) 4.8.5
$ dpkg -l | grep g++
g++  ・・・
g++-4.6 ・・・

うん。違うね...

はい、て事でgccにバージョン合わせます。下のサイト見て自分にあったバージョンを入れます。
g++をUbuntuへインストールする

$ sudo apt-get install g++-4.8

再起動して、再度pip使ってmatplotlibインストールすると、ちゃんと入りました。

9
3
0

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
9
3