gcc:尝试执行‘cc1plus’时出错:execvp:没有此文件或目录

gcc:尝试执行‘cc1plus’时出错:execvp:没有此文件或目录

我正在尝试运行 ovs faucet 教程。其中一个步骤是编译 faucet 容器包。当我尝试运行它时,我收到以下错误

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

我在 Ubuntu 18.04 上,内核版本 5.4.0-65-generic

我确保我的 gcc 和 g++ 都是最新的。当我尝试 sudo apt-get install g++(gcc) 时,它告诉我我已经拥有两者的最新版本。

$ sudo apt-get install g++
Reading package lists... Done
Building dependency tree       
Reading state information... Done
g++ is already the newest version (4:7.4.0-1ubuntu2.3).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

$ gcc --version
gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ g++ --version
g++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.

$ g++ --print-prog-name=cc1plus
/usr/lib/gcc/x86_64-linux-gnu/7/cc1plus

编译第一个 cpp 文件时失败。似乎在出现错误之前编译了 c 文件。

如果有人能给我一些指点,我将不胜感激。

相关内容