首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >由于c++17,无法编译MK实时状态

由于c++17,无法编译MK实时状态
EN

Stack Overflow用户
提问于 2018-12-05 18:27:42
回答 1查看 1.8K关注 0票数 2

我想在this insturctions之后安装MK-Livestatus来连接nagios和thruk。

当我尝试使用./configure && make进行编译时,它会提示我:

代码语言:javascript
复制
    checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc-8... no
checking for clang-7... no
checking for gcc-7... no
checking for clang-6.0... no
checking for clang-5.0... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
...
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking whether g++ supports C++17 features by default... no
checking whether g++ supports C++17 features with -std=c++17... no
checking whether g++ supports C++17 features with +std=c++17... no
checking whether g++ supports C++17 features with -h std=c++17... no
checking whether g++ supports C++17 features with -std=c++1z... no
checking whether g++ supports C++17 features with +std=c++1z... no
checking whether g++ supports C++17 features with -h std=c++1z... no
configure: error: *** A compiler with support for C++17 language features is required.

我一直在寻找如何编译这段代码,但我从未找到有效的方法..

EN

回答 1

Stack Overflow用户

发布于 2019-01-10 10:49:14

需要安装“gcc-7”或“gcc-8”。我通过构建仿生而不是Xenial解决了这个问题。要在Xenial上获取gcc-7,请运行以下命令:

代码语言:javascript
复制
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-7 g++-7
gcc-7 --version
# The following commands make gcc7/g++7 the defaults.
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 60
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60

这应该会让你克服你遇到的错误。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/53630143

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档