一、报错:autoconf ./autogen.sh:行5: autoconf: 未找到命令 Error 0 in autoconf
- 解决:安装 automake and autoconf
yum whatprovides autoconf automake #检查需要的安装包
yum -y install automake and autoconf #下载
二、报错:gcc版本不够
- 解决:升级版本
rpm -Uvh --force http://mirror.centos.org/centos-7/7.7.1908/os/x86_64/Packages/centos-release-7-7.1908.0.el7.centos.x86_64.rpm #1、获取yum源
yum -y install centos-release-scl #2、
yum -y install devtoolset-7-gcc* #3、安装需要的gcc版本
scl enable devtoolset-7 bash #4、执行devtoolset-7自带的bash脚本
gcc -v #5、查看gcc版本
三、报错:wget下载报错
[root@localhost ~]# wget https://www.kernel.org/pub/software/scm/git/git-2.0.5.tar.gz
--2018-03-22 01:43:37-- https://www.kernel.org/pub/software/scm/git/git-2.0.5.tar.gz
Resolving www.kernel.org... 147.75.42.139, 2604:1380:40a0:500::1
Connecting to www.kernel.org|147.75.42.139|:443... connected.
ERROR: certificate common name “kernel.org” doesn’t match requested host name “www.kernel.org”.
To connect to www.kernel.org insecurely, use ‘--no-check-certificate’.
- 解决:连接到www.kernel.org不安全,使用“不检查证书”;加入no-check-cretificate即可下载成功
[root@localhost ~]# wget --no-check-certificate 'https://www.kernel.org/pub/software/scm/git/git-2.0.5.tar.gz'
。
。
100%[======================================>] 4,910,412 180K/s in 36s
四、报错:make编译时报的各种错误
-
解决:每次make编译的时候到八十多就报错,后来知道原来是内存不足,增加虚拟内存,也就是增加swap
-
编译时报 -Werror=implicit-fallthrough=
需要在cmake时指定编译参数cmake -DCMAKE_C_FLAGS=“-Wno-implicit-fallthrough” -DCMAKE_CXX_FLAGS=“-Wno-implicit-fallthrough” -
编译时报没有配套的boost
需要在cmake时指定boost路径-DWITH_BOOST=/home/wl/boost/boost_1_59_0 -
编译时报
需要指定openssl路径 -DWITH_SSL=system
Wrong option or path for WITH_SSL=bundled.
Make sure you have specified a supported SSL version.
Valid options are :
system (use the OS openssl library),
yes (synonym for system),
</path/to/custom/openssl/installation>
CMake Error at cmake/ssl.cmake:63 (MESSAGE):
Please install the appropriate openssl developer package.
Call Stack (most recent call first):
cmake/ssl.cmake:269 (FATAL_SSL_NOT_FOUND_ERROR)
CMakeLists.txt:579 (MYSQL_CHECK_SSL)
五、报错:yum下载失败的解决方案(参考)
mkdir /mnt/cdrom #创建
mount /dev/cdrom /mnt/cdrom/ #挂载
在CentOS-Media.repo下baseurl 中修改第2个路径为/mnt/cdrom(光盘挂载点)将enabled=0改为1
将yum 网络源配置文件改名为CentOS-Base.repo.bak,否则会先在网络源中寻找适合的包,改名之后直接从本地源读取。
CentOS-Base.repo 是yum 网络源的配置文件
CentOS-Media.repo 是yum 本地源的配置文件