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

oracle linux 8.6安装11g报错ORA-12547解决

原创 _ 2024-08-01
143

测试环境操作系统版版本为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
----------

复制
clip.png

二、安装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
复制

至此问题解决。所以安装数据库时一定要遵循官方建议的操作系统版本

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

评论