调优地址:https://www.cnblogs.com/swordfall/p/10427150.html#auto_id_17
下载路径:https://mirrors.tuna.tsinghua.edu.cn/gnu/glibc/
http://ftp.gnu.org/gnu/glibc/
参考地址:https://blog.csdn.net/officercat/article/details/39520227
https://blog.csdn.net/cpplang/article/details/8462768
查看openssl是否安装命令:rpm -qa | grep openssl,未安装的可以使用yum安装
[root@matio1 lib64]# rpm -qa | grep openssl
openssl098e-0.9.8e-29.el7.centos.3.x86_64
openssl-1.0.2k-16.el7.x86_64
openssl-libs-1.0.2k-16.el7.x86_64
xmlsec1-openssl-1.2.20-7.el7_4.x86_64
进入/usr/lib64目录
[root@matio1 lib64]# cd /usr/lib64
找到以 libssl.so开头的文件,发现并没有libcrypto.so.1.0.0
[root@matio1 lib64]# ll -h | grep libssl.so
-rwxr-xr-x. 1 root root 333K Mar 9 2016 libssl.so.0.9.8e
lrwxrwxrwx. 1 root root 16 Nov 17 19:13 libssl.so.10 -> libssl.so.1.0.2k
-rwxr-xr-x. 1 root root 460K Oct 31 2018 libssl.so.1.0.2k
lrwxrwxrwx. 1 root root 16 Nov 17 19:14 libssl.so.6 -> libssl.so.0.9.8e
创建软连接
[root@matio1 lib64]#ln -s libssl3.so libssl.so.1.0.0
再次执行命令发现错误改变了
[root@matio2 lib64]# mongod -f /home/hadoop/mongodb/data/config/config.conf
mongod: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by mongod)
mongod: /lib64/libcrypto.so.1.0.0: version `OPENSSL_1.0.0' not found (required by mongod)
mongod: /lib64/libcurl.so.4: no version information available (required by mongod)
mongod: /lib64/libcrypto.so.1.0.0: version `OPENSSL_1.0.0' not found (required by mongod)
mongod: /lib64/libcrypto.so.1.0.0: version `OPENSSL_1.0.1' not found (required by mongod)
报以上错误原因是:没有找到2.18的glibc版本
执行命令strings /lib64/libc.so.6 |grep GLIBC_ 可以查看系统glibc支持的版本,发现果然没有2.18版本的glibc
[root@matio2 lib64]# strings /lib64/libc.so.6 |grep GLIBC_
GLIBC_2.2.5
GLIBC_2.2.6
GLIBC_2.3
GLIBC_2.3.2
GLIBC_2.3.3
GLIBC_2.3.4
GLIBC_2.4
GLIBC_2.5
GLIBC_2.6
GLIBC_2.7
GLIBC_2.8
GLIBC_2.9
GLIBC_2.10
GLIBC_2.11
GLIBC_2.12
GLIBC_2.13
GLIBC_2.14
GLIBC_2.15
GLIBC_2.16
GLIBC_2.17
GLIBC_PRIVATE
[root@matio2 lib64]# rpm -qa |grep glibc
compat-glibc-2.12-4.el7.centos.x86_64
glibc-common-2.17-260.el7.x86_64
compat-glibc-headers-2.12-4.el7.centos.x86_64
glibc-2.17-260.el7.x86_64
[root@matio2 lib64]#
下载好glibc-2.18.tar.gz并放在/usr/java目录下
解压命令 tar -zxvf glibc-2.18.tar.gz
进入glibc目录cd glibc-2.18
新建build目录
进入build目录
[root@matio1 java]# ls
glibc-2.18 jdk-8u201-linux-x64.tar.gz openssl-1.0.0t zookeeper-3.4.12.tar.gz
glibc-2.18.tar.gz mongodb-linux-x86_64-ubuntu1604-4.0.6 openssl-1.0.0t.tar.gz zookeeperData
jdk1.8.0_201 mongodb-linux-x86_64-ubuntu1604-4.0.6.tgz zookeeper-3.4.12
[root@matio1 java]# cd glibc-2.18/
[root@matio1 glibc-2.18]# ls
abi-tags ChangeLog.14 conform gshadow mach po stdio-common
aclocal.m4 ChangeLog.15 CONFORMANCE hesiod Makeconfig ports stdlib
argp ChangeLog.16 COPYING hurd Makefile posix streams
assert ChangeLog.17 COPYING.LIB iconv Makefile.in PROJECTS string
benchtests ChangeLog.2 cppflags-iterator.mk iconvdata Makerules pwd sunrpc
bits ChangeLog.3 crypt include malloc README sysdeps
BUGS ChangeLog.4 csu inet manual resolv sysvipc
build ChangeLog.5 ctype INSTALL math resource termios
CANCEL-FCT-WAIVE ChangeLog.6 debug intl misc rt test-skeleton.c
CANCEL-FILE-WAIVE ChangeLog.7 dirent io NAMESPACE Rules time
catgets ChangeLog.8 dlfcn libc-abis NEWS scripts timezone
ChangeLog ChangeLog.9 elf libidn nis setjmp version.h
ChangeLog.1 conf extra-lib.mk libio nptl shadow Versions.def
ChangeLog.10 config.h.in extra-modules.mk LICENSES nptl_db shlib-versions wcsmbs
ChangeLog.11 config.make.in gmon locale nscd signal wctype
ChangeLog.12 configure gnulib localedata nss socket WUR-REPORT
ChangeLog.13 configure.in grp login o-iterator.mk soft-fp
[root@matio1 glibc-2.18]# mkdir build
执行命令../configure --prefix=/opt/glibc-2.18
[root@matio1 build]# ../configure --prefix=/opt/glibc-2.18
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/usr/java/glibc-2.18/build':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
报错原因:需要安装GCC软件套件
yum install gcc
安装完成后重新运行../configure --prefix=/opt/glibc-2.18成功
运行make -j4
运行sudo make install