配置:错误:C++预处理器"/lib/cpp"未通过健全性检查

Configure: error: C++ preprocessor "/lib/cpp" fails sanity check

本文关键字:检查 lib C++ 错误 预处理 处理器 配置 cpp      更新时间:2023-10-16

这个错误让我抓狂。我尝试了许多解决方案,但没有成功。 这是我的问题,当我启动./configure来编译libtool时,出现此错误:

....
checking for g++... g++
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... /lib/cpp
configure: error: in `/home/thierry/libtool-master/libtool-master':
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details

由于它的大小,我无法向您展示config.log,并且它有一些二进制字符。

我有所有的编译器 c++、g++、gcc,如上所示:

thierry@LFR038391:~/DeepSpeech$ dpkg -l | grep c++
ii  libsigc++-2.0-0v5:amd64               2.10.0-2                           amd64        type-safe Signal Framework for C++ - runtime
ii  libstdc++-6-dev:amd64                 6.5.0-2ubuntu1~18.04               amd64        GNU Standard C++ Library v3 (development files)
ii  libstdc++-7-dev:amd64                 7.4.0-1ubuntu1~18.04.1             amd64        GNU Standard C++ Library v3 (development files)
ii  libstdc++6:amd64                      8.3.0-6ubuntu1~18.04.1             amd64        GNU Standard C++ Library v3
thierry@LFR038391:~/DeepSpeech$ pwd
/home/thierry/DeepSpeech
thierry@LFR038391:~/DeepSpeech$ dpkg -l | grep gcc
ii  gcc                                   4:7.4.0-1ubuntu2.3                 amd64        GNU C compiler
ii  gcc-6                                 6.5.0-2ubuntu1~18.04               amd64        GNU C compiler
ii  gcc-6-base:amd64                      6.5.0-2ubuntu1~18.04               amd64        GCC, the GNU Compiler Collection (base package)
ii  gcc-7                                 7.4.0-1ubuntu1~18.04.1             amd64        GNU C compiler
ii  gcc-7-base:amd64                      7.4.0-1ubuntu1~18.04.1             amd64        GCC, the GNU Compiler Collection (base package)
ii  gcc-8-base:amd64                      8.3.0-6ubuntu1~18.04.1             amd64        GCC, the GNU Compiler Collection (base package)
ii  libgcc-6-dev:amd64                    6.5.0-2ubuntu1~18.04               amd64        GCC support library (development files)
ii  libgcc-7-dev:amd64                    7.4.0-1ubuntu1~18.04.1             amd64        GCC support library (development files)
ii  libgcc1:amd64                         1:8.3.0-6ubuntu1~18.04.1           amd64        GCC support library
thierry@LFR038391:~/DeepSpeech$ dpkg -l | grep g++
ii  g++                                   4:7.4.0-1ubuntu2.3                 amd64        GNU C++ compiler
ii  g++-6                                 6.5.0-2ubuntu1~18.04               amd64        GNU C++ compiler
ii  g++-7                                 7.4.0-1ubuntu1~18.04.1             amd64        GNU C++ compiler

我现在对如何解决这个问题没有更多的想法。

我昨天遇到了同样的问题,我所做的是在我的 VM 中安装了所有这些 RPM,然后它开始运行良好。

这些转速中的大多数是相互依赖的。

已安装的 Pkgs

cpp-4.8.5-44.el7.x86_64.rpm
glibc-2.17-317.el7.x86_64.rpm
glibc-devel-2.17-317.el7.x86_64.rpm
kernel-headers-3.10.0-1160.15.2.el7.x86_64.rpm
mpfr-3.1.1-4.el7.x86_64.rpm
gcc-4.8.5-44.el7.x86_64.rpm
glibc-common-2.17-317.el7.x86_64.rpm
glibc-headers-2.17-317.el7.x86_64.rpm
libmpc-1.0.1-3.el7.x86_64.rpm
nss-softokn-freebl-3.44.0-8.el7_7.i686.rpm