暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

CentOS8静默安装Oracle11g oracle lsnrctl、tnsping等文件大小为0的问题

原创 不吃草的牛_Nick 2023-01-31
1996

技术标签: Oracle oracle安装 lnsrctl大小是0

平台 版本
操作系统 centOS 8
Oracle 11.2.0.1

故障现象

数据库软件安装完毕,并创建了监听。但在启动监听时,命令一跳而过,不报错,无反应。且文件大小为0。

[oracle@s1 bin]$ lsnrctl start
[oracle@s1 bin]$



同时,其他内部工具如tnsping、impdp、expdp等都有相同情况。

原理

数据库软件安装的有问题。
因为是采用的静默方式,命令行反馈的消息基本无价值。实际已经安装失败了,但没有发现。

实际报错信息包含在了详细日志里:

INFO: ----------------------------------
INFO:

INFO: /bin/chmod 755 /home/oracle/app/product/112010/db_1/bin/

INFO: - Linking tnslsnr
rm -f tnslsnr
gcc -o tnslsnr -m64 -L/home/oracle/app/product/112010/db_1/network/lib/ -L/home/oracle/app/product/112010/db_1/lib/ -L/home/oracle/app/product/112010/db_1/lib/stubs/ /home/oracle/app/product/112010/db_1/network/lib/s0nsgl.o /home/oracle/app/product/112010/db_1/network/lib/snsglp.o -lclntsh `cat /home/oracle/app/product/112010/db_1/lib/ldflags` -lncrypt11 -lnsgr11 -lnzjs11 -ln11 -lnl11 -lnro11 `cat /home/oracle/app/product/112010/db_1/lib/ldflags` -lncrypt11 -lnsgr11
INFO: -lnzjs11 -ln11 -lnl11 -lnnz11 -lzt11 -lztkg11 -lztkg11 -lclient11 -lnnetd11 -lvsn11 -lcommon11 -lgeneric11 -lmm -lsnls11 -lnls11 -lcore11 -lsnls11 -lnls11 -lcore11 -lsnls11 -lnls11 -lxml11 -lcore11 -lunls11 -lsnls11 -lnls11 -lcore11 -lnls11 `cat /home/oracle/app/product/112010/db_1/lib/ldflags` -lncrypt11 -lnsgr11 -lnzjs11 -ln11 -lnl11 -lnro11 `cat /home/oracle/app/product/112010/db_1/lib/ldflags` -lncrypt11 -lnsgr11 -lnzjs11 -ln11 -lnl11 -lclient11 -lnnetd11 -lvsn11 -lcommon11 -lgeneric11 -lsnls
INFO: 11 -lnls11 -lcore11 -lsnls11 -lnls11 -lcore11 -lsnls11 -lnls11 -lxml11 -lcore11 -lunls11 -lsnls11 -lnls11 -lcore11 -lnls11 -lclient11 -lnnetd11 -lvsn11 -lcommon11 -lgeneric11 -lsnls11 -lnls11 -lcore11 -lsnls11 -lnls11 -lcore11 -lsnls11 -lnls11 -lxml11 -lcore11 -lunls11 -lsnls11 -lnls11 -lcore11 -lnls11 `cat /home/oracle/app/product/112010/db_1/lib/sysliblist` -Wl,-rpath,/home/oracle/app/product/112010/db_1/lib -lm `cat /home/oracle/app/product/112010/db_1/lib/sysliblist` -ldl -lm -L/home/oracle/ap
INFO: p/product/112010/db_1/lib -lons -lnl11 -ln11 -lnlsnr11 -lnlsnrc11 -lnsgr11 -lnms -lncm11 -lnmsp -lpeer -lnro11 -ln11 -lnl11 -lnlsnr11 -lnlsnrc11 -lnms -lncm11 -lnmsp -ln11 -lm

INFO: //usr/lib64/libaio.so.1: undefined reference to `__stack_chk_fail@GLIBC_2.4
INFO: '
collect2: error: ld returned 1 exit status
make: *** [/home/oracle/app/product/112010/db_1/network/lib/ins_net_server.mk:29: tnslsnr] Error 1

INFO: End output from spawned process.
INFO: ----------------------------------





解决方法

居然是用gcc编译实现的安装,关键报错信息是:

INFO: //usr/lib64/libaio.so.1: undefined reference to `__stack_chk_fail@GLIBC_2.4



对于oracle11g 的安装, libaio1库版本不能大于0.3.109
libaio1.so.1文件不依赖与任何其他库,本质就是一个独立的so文件,我们直接替换即可。

查看centos8的是0.3.110了,比要求的版本高。

[oracle@s3 install]$ rpm -qa libaio
libaio-0.3.110-12.el8.x86_64




下载合适的so文件,并重建libaio.so.1的软链接
注意:新so文件的大小是5256,自带文件的大小是16248。

[oracle@s3 admin]$ cd /usr/lib64
ln -sf libaio.so.1.0.1.new libaio.so.1


[oracle@s3 lib64]$ ll libaio*
lrwxrwxrwx. 1 root root 19 Jan 12 11:05 libaio.so.1 -> libaio.so.1.0.1.new
-rwxr-xr-x. 1 root root 16248 May 11 2019 libaio.so.1.0.0
-rwxr-xr-x. 1 root root 16248 May 11 2019 libaio.so.1.0.1
-rw-r--r--. 1 root root 5256 Jan 12 11:04 libaio.so.1.0.1.new


图形化安装下,也一样出现该问题,但是会有提示,更容易发现一些。

https://www.cnblogs.com/jinzhenshui/p/9366002.html
https://codeleading.com/article/30615154777/

「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论