ubuntu上安装oracle11g的错误解决
环境:
OS:16.04
DB:11.2.0.4 单机
发现在ubuntu上安装oracle,按照文档都已经安装了想要的包,但是检查还是无法通过,忽略后可以进行安装,但是需要修改很多地方
1.安装的依赖包
apt update
apt-get install binutils
apt-get install libcap-dev
apt-get install libstdc++5
apt-get install gcc
apt-get install g++
apt-get install libc6
apt-get install libc6-dev
apt-get install ksh
apt-get install libaio1
apt-get install libaio-dev
apt-get install lib32gcc1
apt-get install libgcc1
apt-get install libstdc++6
apt-get install libstdc++6-4.7-dev
apt-get install libxi6
apt-get install libxtst6
apt-get install make
apt-get install sysstat
apt-get install unzip
apt-get install apt-file
发现很多校验不通过,基本是因为版本的原因
2.忽略后安装报错解决
错误1:
collect2: error: ld returned 1 exit status
make: *** [/u01/app/oracle/product/11.2.0.4/db_1/rdbms/lib/kfod] Error 1
INFO: /u01/app/oracle/product/11.2.0.4/db_1/rdbms/lib/ins_rdbms.mk:1096: recipe for target '/u01/app/oracle/product/11.2.0.4/db_1/rdbms/lib/kfod' failed
INFO: End output from spawned process.
INFO: ----------------------------------
INFO: Exception thrown from action: make
Exception Name: MakefileException
Exception String: Error in invoking target 'all_no_orcl' of makefile '/u01/app/oracle/product/11.2.0.4/db_1/rdbms/lib/ins_rdbms.mk'. See '/u01/app/oraInventory/logs/installActions2024-07-03_10-59-07AM.log' for details.
Exception Severity: 1
解决办法:
root@11g:~# vi /u01/app/oracle/product/11.2.0.4/db_1/rdbms/lib/env_rdbms.mk
原来的:
KFOD_LINKLINE=$(LINK) $(S0MAIN) $(SSKFODED) $(SKFODPT) $(KFODOBJ) \
$(LIBGENERIC) $(LLIBDBTOOLS) \
$(LIBGENERIC) $(LLIBCOMMON) $(LLIBSAGE) $(LLIBSKGXP) $(LIBCORE) \
$(CSSCLNTLIBS_SERVER) $(LLIBASMCLNT) $(LINKTTLIBS)
修改为:
KFOD_LINKLINE=$(LINK) $(S0MAIN) -Wl,--no-as-needed $(SSKFODED) $(SKFODPT) $(KFODOBJ) \
$(LIBGENERIC) $(LLIBDBTOOLS) \
$(LIBGENERIC) $(LLIBCOMMON) $(LLIBSAGE) $(LLIBSKGXP) $(LIBCORE) \
$(CSSCLNTLIBS_SERVER) $(LLIBASMCLNT) $(LINKTTLIBS)
错误2:
INFO: /u01/app/oracle/product/11.2.0.4/db_1/rdbms/lib/ins_rdbms.mk:1102: recipe for target '/u01/app/oracle/product/11.2.0.4/db_1/rdbms/lib/amdu' failed
INFO: make: *** [/u01/app/oracle/product/11.2.0.4/db_1/rdbms/lib/amdu] Error 1
INFO: End output from spawned process.
INFO: ----------------------------------
INFO: Exception thrown from action: make
Exception Name: MakefileException
Exception String: Error in invoking target 'all_no_orcl' of makefile '/u01/app/oracle/product/11.2.0.4/db_1/rdbms/lib/ins_rdbms.mk'. See '/u01/app/oraInventory/logs/installActions2024-07-03_10-59-07AM.log' for details.
Exception Severity: 1
原来的:
AMDU_LINKLINE=$(LINK) $(S0MAIN) $(SSKFMUED) $(SKFMUPT) \
$(LLIBDBTOOLS) $(LLIBCORE) $(LLIBGENERIC) \
$(LLIBCOMMON) $(LLIBGENERIC) $(LLIBCOMMON) $(LLIBUNLSRTL) \
$(LLIBNLSRTL) $(LLIBCORE) $(LLIBSAGE) $(LLIBSKGXP) \
$(LLIBNLSRTL) $(CSSCLNTLIBS_SERVER) $(LLIBASMCLNT) $(LINKTTLIBS)
修改为:
AMDU_LINKLINE=$(LINK) $(S0MAIN) -Wl,--no-as-needed $(SSKFMUED) $(SKFMUPT) \
$(LLIBDBTOOLS) $(LLIBCORE) $(LLIBGENERIC) \
$(LLIBCOMMON) $(LLIBGENERIC) $(LLIBCOMMON) $(LLIBUNLSRTL) \
$(LLIBNLSRTL) $(LLIBCORE) $(LLIBSAGE) $(LLIBSKGXP) \
$(LLIBNLSRTL) $(CSSCLNTLIBS_SERVER) $(LLIBASMCLNT) $(LINKTTLIBS)
错误3:
INFO: :(text.unlikely+0x1a9c): undefined reference to `scls_meta_ctx_init'
collect2: error: ld returned 1 exit status
make: *** [/u01/app/oracle/product/11.2.0.4/db_1/rdbms/lib/renamedg] Error 1
INFO: /u01/app/oracle/product/11.2.0.4/db_1/rdbms/lib/ins_rdbms.mk:1114: recipe for target '/u01/app/oracle/product/11.2.0.4/db_1/rdbms/lib/renamedg' failed
INFO: End output from spawned process.
INFO: ----------------------------------
INFO: Exception thrown from action: make
Exception Name: MakefileException
Exception String: Error in invoking target 'all_no_orcl' of makefile '/u01/app/oracle/product/11.2.0.4/db_1/rdbms/lib/ins_rdbms.mk'. See '/u01/app/oraInventory/logs/installActions2024-07-03_10-59-07AM.log' for details.
Exception Severity: 1
修改
/u01/app/oracle/product/11.2.0.4/db_1/rdbms/lib/env_rdbms.mk
原来的
KFNDG_LINKLINE=$(LINK) $(S0MAIN) $(SSKFNDGED) $(SKFNDGPT) $(KFNDGOBJ) \
$(LIBGENERIC) $(DEF_OPT) $(LLIBDBTOOLS) $(LIBGENERIC) \
$(LIBCORE) $(CSSCLNTLIBS_SERVER) $(ASMCLNT_LIBS) $(LINKTTLIBS)
修改为
KFNDG_LINKLINE=$(LINK) $(S0MAIN) -Wl,--no-as-needed $(SSKFNDGED) $(SKFNDGPT) $(KFNDGOBJ) \
$(LIBGENERIC) $(DEF_OPT) $(LLIBDBTOOLS) $(LIBGENERIC) \
$(LIBCORE) $(CSSCLNTLIBS_SERVER) $(ASMCLNT_LIBS) $(LINKTTLIBS)
错误4:
INFO: /u01/app/oracle/product/11.2.0.4/db_1/rdbms/lib/ins_rdbms.mk:1314: recipe for target 'liborasdksh' failed
INFO: /u01/app/oracle/product/11.2.0.4/db_1/bin/genorasdksh: Failed to link liborasdk.so.11.1
make: *** [liborasdksh] Error 1
INFO: End output from spawned process.
INFO: ----------------------------------
INFO: Exception thrown from action: make
Exception Name: MakefileException
Exception String: Error in invoking target 'all_no_orcl' of makefile '/u01/app/oracle/product/11.2.0.4/db_1/rdbms/lib/ins_rdbms.mk'. See '/u01/app/oraInventory/logs/installActions2024-07-03_10-59-07AM.log' for details.
Exception Severity: 1
修改 vi /u01/app/oracle/product/11.2.0.4/db_1/bin/genorasdksh
原来的
echo "Creating $LD_DEST"
Remove_File $LIB_DIR/$OSDK_LIB
$LD $LD_RUNTIME $LD_OPT $LD_OUT $LD_SELF_CONTAINED $BASE_LIB \
$LD_OBJS $LD_SYMS $OLIBS $SYSLIBS $USRLIBS
Check_Status $? "Failed to link $OSDK_LIB"
(cd $LIB_DIR; ls -l $OSDK_LIB)
修改为
echo "Creating $LD_DEST"
Remove_File $LIB_DIR/$OSDK_LIB
$LD $LD_RUNTIME $LD_OPT -Wl,--no-as-needed $LD_OUT $LD_SELF_CONTAINED $BASE_LIB \
$LD_OBJS $LD_SYMS $OLIBS $SYSLIBS $USRLIBS
Check_Status $? "Failed to link $OSDK_LIB"
(cd $LIB_DIR; ls -l $OSDK_LIB)
错误5:
make: *** [getcrshome] Error 1
INFO: /u01/app/oracle/product/11.2.0.4/db_1/srvm/lib/ins_srvm.mk:52: recipe for target 'getcrshome' failed
INFO: End output from spawned process.
INFO: ----------------------------------
INFO: Exception thrown from action: make
Exception Name: MakefileException
Exception String: Error in invoking target 'install' of makefile '/u01/app/oracle/product/11.2.0.4/db_1/srvm/lib/ins_srvm.mk'. See '/u01/app/oraInventory/logs/installActions2024-07-03_10-59-07AM.log' for details.
Exception Severity: 1
修改
vi /u01/app/oracle/product/11.2.0.4/db_1/srvm/lib/env_srvm.mk
原来的:
GETCRSHOME_LINKLINE=$(LINK) $(LDPATHFLAG)$(RDBMSLIB) $(CDEBUG) $(OPT) \
$(GETCRSHOME_OBJ1) $(OCRLIBS_DEFAULT) $(LLIBCLNTSH) \
$(LINKLDLIBS)
修改为:
GETCRSHOME_LINKLINE=$(LINK) -Wl,--no-as-needed $(LDPATHFLAG)$(RDBMSLIB) $(CDEBUG) $(OPT) \
$(GETCRSHOME_OBJ1) $(OCRLIBS_DEFAULT) $(LLIBCLNTSH) \
$(LINKLDLIBS)
错误6:
collect2: error: ld returned 1 exit status
make: *** [tnslsnr] Error 1
INFO: /u01/app/oracle/product/11.2.0.4/db_1/network/lib/ins_net_server.mk:27: recipe for target 'tnslsnr' failed
INFO: End output from spawned process.
INFO: ----------------------------------
INFO: Exception thrown from action: make
Exception Name: MakefileException
Exception String: Error in invoking target 'install' of makefile '/u01/app/oracle/product/11.2.0.4/db_1/network/lib/ins_net_server.mk'. See '/u01/app/oraInventory/logs/installActions2024-07-03_10-59-07AM.log' for details.
修改
vi /u01/app/oracle/product/11.2.0.4/db_1/network/lib/env_network.mk
原来的:
TNSLSNR_LINKLINE=$(LINK) $(TNSLSNR_OFILES) $(LINKTTLIBS) $(LLIBONS) \
$(LOCALNETLIBS) $(MATHLIB) $(TNSLSNR_THREADLIB)
修改为:
TNSLSNR_LINKLINE=$(LINK) -Wl,--no-as-needed $(TNSLSNR_OFILES) $(LINKTTLIBS) $(LLIBONS) \
$(LOCALNETLIBS) $(MATHLIB) $(TNSLSNR_THREADLIB)
错误7:
make: *** [/u01/app/oracle/product/11.2.0.4/db_1/rdbms/lib/oracle] Error 1
INFO: /u01/app/oracle/product/11.2.0.4/db_1/rdbms/lib/ins_rdbms.mk:732: recipe for target '/u01/app/oracle/product/11.2.0.4/db_1/rdbms/lib/oracle' failed
INFO: End output from spawned process.
INFO: ----------------------------------
INFO: Exception thrown from action: make
Exception Name: MakefileException
Exception String: Error in invoking target 'irman ioracle' of makefile '/u01/app/oracle/product/11.2.0.4/db_1/rdbms/lib/ins_rdbms.mk'. See '/u01/app/oraInventory/logs/installActions2024-07-03_10-59-07AM.log' for details.
Exception Severity: 1
修改
vi /u01/app/oracle/product/11.2.0.4/db_1/rdbms/lib/env_rdbms.mk
原来的:
ORACLE_LINKLINE=$(ORACLE_LINKER) $(PL_FLAGS) $(ORAMAI) $(SSORED) $(TTCSOI) \
$(ORACLE_KERNEL_LIBS) $(LINKLDLIBS)
修改为:
ORACLE_LINKLINE=$(ORACLE_LINKER) $(PL_FLAGS) -Wl,--no-as-needed $(ORAMAI) $(SSORED) $(TTCSOI) \
$(ORACLE_KERNEL_LIBS) $(LINKLDLIBS)