测试环境操作系统版版本为oracle linux 8.6,安装完19c版本后需要再安装一套11.2.0.4版本。安装完成11.2.0.4版本后使用dbca建库时出现ORA-12547错误。
一、安装完成19c
[root@ol8601 ~]# cat /etc/os-release NAME="Oracle Linux Server" VERSION="8.6" ID="ol" ID_LIKE="fedora" VARIANT="Server" VARIANT_ID="server" VERSION_ID="8.6" PLATFORM_ID="platform:el8" PRETTY_NAME="Oracle Linux Server 8.6" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:oracle:linux:8:6:server" HOME_URL="https://linux.oracle.com/" BUG_REPORT_URL="https://bugzilla.oracle.com/" ORACLE_BUGZILLA_PRODUCT="Oracle Linux 8" ORACLE_BUGZILLA_PRODUCT_VERSION=8.6 ORACLE_SUPPORT_PRODUCT="Oracle Linux" ORACLE_SUPPORT_PRODUCT_VERSION=8.6
复制
SQL> select * from v$version; BANNER -------------------------------------------------------------------------------- BANNER_FULL -------------------------------------------------------------------------------- BANNER_LEGACY -------------------------------------------------------------------------------- CON_ID ---------- Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.3.0.0.0 Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production 0 BANNER -------------------------------------------------------------------------------- BANNER_FULL -------------------------------------------------------------------------------- BANNER_LEGACY -------------------------------------------------------------------------------- CON_ID ----------
复制

二、安装11g
1、环境变量
安装11g时单独准备一套环境变量配置文件。
[oracle@ol8601 ~]$ cat .11g_profile # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs umask 022 TMP=/tmp; export TMP TMPDIR=$TMP; export TMPDIR ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1; export ORACLE_HOME ORACLE_SID=db11g; export ORACLE_SID #ORACLE_SID=orcl;export ORACLE_SID ORACLE_TERM=xterm; export ORACLE_TERM NLS_LANG="AMERICAN_CHINA.ZHS16GBK"; export NLS_LANG PATH=$ORACLE_HOME/bin:$PATH; export PATH LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
复制
调整环境变量,将ORACLE_HOME变更至ORACLE_BASE下的11.2.0/dbhome_1,其它不变
2、安装软件
1、报错1
安装软件过程中出现报错,直接忽略即可
Error in invoking target 'links proc gen_pcscfg' of makefile '/u01/app/oracle/product/11.2.0.4/dbhome_1/precomp/lib/ins_precomp.mk'.
复制
解决
11.2:Oracle database software installation failed with “Error in invoking target ‘links proc gen_pcscfg’ of makefile … ins_precomp.mk” on RHEL 8 (Doc ID 2915371.1)中提到
Symptoms The following message appears in the installation log when linking. INFO: Exception thrown from action: make Exception Name: MakefileException Exception String: Error in invoking target 'links proc gen_pcscfg' of makefile '/home/oracle/app/oracle/product/11.2.0/dbhome_1/precomp/lib/ins_precomp.mk'. See '/home/oracle/app/oraInventory/logs/installActions2022-12-07_05-36-30PM.log' for details. <<<------ The left column is the link error message Exception Severity: 1 INFO: Creating symbolic links INFO: Creating symbolic links INFO: The output of this make operation is also available at: '/home/oracle/app/oracle/product/11.2.0/dbhome_1/install/make.log' INFO: Cause Link errors can be ignored when installing Oracle 11g on RHEL8. This is also stated in Release Notes 11g Release 2 (11.2) for Linux (E23558-23).
复制
一路点continue即可
2、dbca报错
报错
ERROR: ORA-12547: TNS:lost contact
复制
检查发现ORACLE_HOME/bin/oracle文件权限不对,修改为6751,并且文件大小为0。检查ORACLE_HOME/rbdms/lib/config.o文件发现大小为0。
[oracle@ol8601 bin]$ ls -lsa oracle 0 -rwsr-s--x 1 oracle oinstall 0 8月 24 2013 oracle [oracle@ol8601 lib]$ cd .. [oracle@ol8601 dbhome_1]$ cd rdbms/lib/ [oracle@ol8601 dbhome_1]$ ls -lsa config.o 0 -rwsr-s--x 1 oracle oinstall 0 8月 24 2013 config.o
复制
oracle文件和config.o文件大小为0,且oracle文件的权限不对。对于oracle文件为空的情况,需要relink
[oracle@ol8601 bin]$ relink writing relink log to: /u01/app/oracle/product/11.2.0/dbhome_1/install/relink.log [oracle@ol8601 bin]$ ls -lsa oracle 0 -rwsr-s--x 1 oracle oinstall 0 8月 24 2013 oracle
复制
relink之后依然为0,检查relink日志
Linking <ORACLE_HOME>/precomp/lib/proc //usr/lib64/libaio.so.1: undefined reference to `__stack_chk_fail@GLIBC_2.4' collect2: error: ld returned 1 exit status
复制
按照/usr/lib64/libaio.so.1: undefined reference to `__stack_chk_fail@GLIBC_2.4’ while installing 11.2.0.4 on RHEL 8 (Doc ID 2931113.1)提示
Cause laio flag is missing in $ORACLE_HOME/lib/sysliblist Solution Make the following changes $ORACLE_HOME/lib/sysliblist from: -ldl -lm -lpthread -lnsl -lirc -lipgo -lsvml to: -ldl -lm -lpthread -lnsl -lirc -lipgo -lsvml -laio Then relink the binaries . $ORACLE_HOME/bin/relink all
复制
解决
[oracle@ol8601 ~]$ cat $ORACLE_HOME/lib/sysliblist -ldl -lm -lpthread -lnsl -lirc -limf -lirc -lrt -laio -lresolv -lsvml [oracle@ol8601 lib]$ relink all writing relink log to: /u01/app/oracle/product/11.2.0/dbhome_1/install/relink.log [oracle@ol8601 lib]$ ls -lsa config.o 4 -rw-r--r-- 1 oracle oinstall 1256 7月 28 09:34 config.o [oracle@ol8601 bin]$ ls -lsa oracle 233748 -rwsr-s--x 1 oracle oinstall 239354536 7月 28 09:35 oracle
复制
SQL> select * from v$version; BANNER -------------------------------------------------------------------------------- Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production PL/SQL Release 11.2.0.4.0 - Production CORE 11.2.0.4.0 Production TNS for Linux: Version 11.2.0.4.0 - Production NLSRTL Version 11.2.0.4.0 - Production
复制
至此问题解决。所以安装数据库时一定要遵循官方建议的操作系统版本
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。
评论
相关阅读
2025年4月中国数据库流行度排行榜:OB高分复登顶,崖山稳驭撼十强
墨天轮编辑部
2031次阅读
2025-04-09 15:33:27
【MySQL 30周年庆】MySQL 8.0 OCP考试限时免费!教你免费领考券
墨天轮小教习
1627次阅读
2025-04-25 18:53:11
【DBA坦白局】第一期:在小城市和一线城市做DBA,是“躺”还是“卷”?
墨天轮编辑部
1367次阅读
2025-04-10 14:17:22
Oracle Concepts(Oracle 19c):07 SQL
Ryan Bai
1023次阅读
2025-04-09 10:57:11
2025年3月国产数据库大事记
墨天轮编辑部
910次阅读
2025-04-03 15:21:16
数据库国产化替代深化:DBA的机遇与挑战
代晓磊
856次阅读
2025-04-27 16:53:22
2025 DBA 薪资观察:做 DBA 还香吗?
墨天轮编辑部
826次阅读
2025-04-24 15:53:21
MySQL 30 周年庆!MySQL 8.4 认证免费考!这次是认真的。。。
严少安
623次阅读
2025-04-25 15:30:58
2025年3月国产数据库中标情况一览:TDSQL大单622万、GaussDB大单581万……
通讯员
623次阅读
2025-04-10 15:35:48
月薪快6万的DBA,有命干不一定有命花
多明戈教你玩狼人杀
597次阅读
2025-04-18 10:36:38