Compiler errors 无法编译MK Livestatus,因为c++;17

Compiler errors 无法编译MK Livestatus,因为c++;17,compiler-errors,ubuntu-16.04,c++17,nagios,Compiler Errors,Ubuntu 16.04,C++17,Nagios,我想安装MK Livestatus Following以连接t与nagios和thruk 当我尝试使用./configure&&make编译时 它告诉我: 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 chec

我想安装MK Livestatus Following以连接t与nagios和thruk

当我尝试使用./configure&&make编译时 它告诉我:

    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.

我已经搜索了如何编译这个,但是我从来没有找到什么有用的东西

您需要安装gcc-7或gcc-8。我解决这个问题的方法是用仿生学而不是Xenial。要在Xenial上获得gcc-7,请运行以下命令:

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
这将帮助您克服遇到的错误。

另请参见: