侧边栏壁纸
  • 累计撰写 74 篇文章
  • 累计创建 45 个标签
  • 累计收到 4 条评论

目 录CONTENT

文章目录

linux编译报错:/usr/include/c++/7/cstdlib:41:10: fatal error: bits/c++config.h: No such file or directory

码峰
2022-05-23 / 0 评论 / 0 点赞 / 135 阅读 / 270 字 / 正在检测是否收录...
温馨提示:
本文最后更新于 2022-08-28,若内容或图片失效,请留言反馈。部分素材来自网络,若不小心影响到您的利益,请联系我们删除。

今天在Linux中编译C/C++的程序遇到如下错误:

make[3]: Leaving directory '/home/v2ray/lede/feeds/luci/applications/luci-app-upnp'
time: package/feeds/luci/luci-app-upnp/compile#1.74#1.44#3.88
In file included from ../deps/v8/src/base/bits.h:9:0,
from ../deps/v8/src/base/bits.cc:5:
/usr/include/c++/7/type_traits:38:10: fatal error: bits/c++config.h: No such file or directory
#include <bits/c++config.h>
^~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/7/stdlib.h:36:0,
from ../deps/v8/include/v8-platform.h:10,
from ../deps/v8/src/base/bounded-page-allocator.h:8,
from ../deps/v8/src/base/bounded-page-allocator.cc:5:
/usr/include/c++/7/cstdlib:41:10: fatal error: bits/c++config.h: No such file or directory
#include <bits/c++config.h>
^~~~~~~~~~~~~~~~~~
compilation terminated.

解决方法:
命令行先输入 sudo apt-get update ,然后执行以下安装

sudo apt-get -y install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch python3.5 unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs git-core gcc-multilib p7zip p7zip-full msmtp libssl-dev texinfo libglib2.0-dev xmlto qemu-utils upx libelf-dev autoconf automake libtool autopoint device-tree-compiler g++-multilib linux-libc-dev:i386

或者直接先执行以下安装试试:

sudo apt-get install gcc-multilib g++-multilib
0

评论区