cc:尝试执行'cc1plus'时出错:execvp:没有这样的文件或目录

the*_*Jun 3 perl perl-module

尝试使用此命令安装perl的Encode :: Detect模块时出现以下错误

perl -MCPAN -e "install Encode::Detect"
Run Code Online (Sandbox Code Playgroud)

错误信息

cc: error trying to exec 'cc1plus': execvp: No such file or directory
Run Code Online (Sandbox Code Playgroud)

the*_*Jun 7

我搜索了一些东西,我发现我没有安装g ++,即使我有以下c compliers(gcc,c,c ++).

为了解决这个问题,我在我的ubuntu机器上安装了g ++编译器

apt-get install g++
Run Code Online (Sandbox Code Playgroud)

在RedHat和CentOS上它将是

yum install g++
Run Code Online (Sandbox Code Playgroud)

  • 关于centos:gcc-c ++ (4认同)