一、错误发生情景:
使用sh setup.sh安装软件时,报以下错误:
...
configure: error: *** A compiler with support for C++11 language features is required.
---
ERROR: failed to configure xapian-core-scws, see 'setup.log' for more detail
二、错误原因:
gcc版本太低了
三、解决问题:
(1)查看当前的gcc版本:
gcc -v
结果:gcc 版本 4.4.7 20120313 (Red Hat 4.4.7-23) (GCC)
(2)下载高版本的gcc:
wget ftp://ftp.irisa.fr/pub/mirrors/gcc.gnu.org/gcc/releases/gcc-8.3.0/gcc-8.3.0.tar.gz
(3)解压:
tar -zxvf gcc-8.3.0.tar.gz
(4)进入目录
cd gcc-8.3.0
(5)配置
./configure --prefix=/usr/local/gcc-8.3.0 --enable-checking=release --enable-languages=c,c++ --disable-multilib