在 RHEL 5.5 上构建 Oracle 客户端 11g R2 时出错

在 RHEL 5.5 上构建 Oracle 客户端 11g R2 时出错

我们正在尝试在 Rhel 5.5 机器(64 位)中安装 oracle 11g R2 64 位。内核版本是2.6.18-194.el5。我们在安装时遇到以下错误。

error in  invoking target 'mkldflags ntcontab.o nnfgt.o' of makefile '/home/oracle/app/product/11.2.0/network/lib/ins_net_client.mk'.
See '/home/oracle/oraInventory/logs/installAction2013-09-03_04-52-05PM.log' for details.

我们已经安装了所有必需的库包。

binutils-2.17.50.0.6-14.el5.x86_64
compat-libstdc++-33-3.2.3-61.x86_64
compat-libstdc++-33-3.2.3-61.i386
elfutils-libelf-0.137-3.el5.x86_64
elfutils-libelf-0.137-3.el5.i386
elfutils-libelf-devel-static-0.137-3.el5.x86_64
elfutils-libelf-devel-static-0.137-3.el5.i386 
elfutils-libelf-devel-0.137-3.el5.x86_64
elfutils-libelf-devel-0.137-3.el5.i386
gcc-4.1.2-48.el5.x86_64
gcc-c++-4.1.2-48.el5.x86_64
glibc-2.5-49.x86_64
glibc-2.5-49.i686
glibc-common-2.5-49.x86_64
glibc-devel-2.5-49.x86_64
glibc-devel-2.5-49.i386
glibc-headers-2.5-49.x86_64
ksh-20100202-1.el5.x86_64
libaio-0.3.106-5.x86_64
libaio-0.3.106-5.i386
libaio-devel-0.3.106-5.x86_64
libaio-devel-0.3.106-5.i386
libgcc-4.1.2-48.el5.x86_64
libgcc-4.1.2-48.el5.i386
libstdc++-4.1.2-48.el5.x86_64
libstdc++-4.1.2-48.el5.i386 
libstdc++44-devel-4.4.0-6.el5.x86_64
libstdc++44-devel-4.4.0-6.el5.i386
libstdc++-devel-4.1.2-48.el5.x86_64 
libstdc++-devel-4.1.2-48.el5.i386

make 已经安装:

make-3.81-3.el5.x86_64

日志文件的内容:

INFO: Calling Query fileQueries10.1.0.3.0  exists

filename = /home/oracle/app/product/11.2.0/rdbms/lib/libknlopt.a
INFO: Query Returned: false
INFO: Calling Action unixActions10.2.0.3.0  registerForMake
        installMakePath = /usr/bin/make
        installMakeFileName = /home/oracle/app/product/11.2.0/network/lib/ins_nau.mk
        installTarget = ioklist
        installArguments = ORACLE_HOME=/home/oracle/app/product/11.2.0
        undoMakeFileName = null
        undoTarget = null
        undoArguments = null
        logFile = /home/oracle/app/product/11.2.0/install/make.log
        progMsg = Linking Adapters

INFO: Calling Action unixActions10.2.0.3.0  registerForMake
        installMakePath = /usr/bin/make
        installMakeFileName = /home/oracle/app/product/11.2.0/network/lib/ins_nau.mk
        installTarget = iokinit
        installArguments = ORACLE_HOME=/home/oracle/app/product/11.2.0
        undoMakeFileName = null
        undoTarget = null
        undoArguments = null
        logFile = /home/oracle/app/product/11.2.0/install/make.log
        progMsg = Linking Adapters

INFO: Calling Action unixActions10.2.0.3.0  registerForMake
        installMakePath = /usr/bin/make
        installMakeFileName = /home/oracle/app/product/11.2.0/network/lib/ins_nau.mk
        installTarget = iokdstry
        installArguments = ORACLE_HOME=/home/oracle/app/product/11.2.0
        undoMakeFileName = null
        undoTarget = null
        undoArguments = null
        logFile = /home/oracle/app/product/11.2.0/install/make.log
        progMsg = Linking Adapters

INFO: Linking 'Oracle Database Utilities 11.2.0.3.0 '
INFO: Linking 'Oracle Database Utilities 11.2.0.3.0 '
INFO: 9/3/13 4:54:07 PM IST: Starting install Link Phase of component Oracle Database Utilities
INFO: Calling Action unixActions10.2.0.3.0  registerForMake
        installMakePath = /usr/bin/make
        installMakeFileName = /home/oracle/app/product/11.2.0/rdbms/lib/ins_rdbms.mk
        installTarget = utilities
        installArguments = ORACLE_HOME=/home/oracle/app/product/11.2.0
        undoMakeFileName = null
        undoTarget = null
        undoArguments = null
        logFile = /home/oracle/app/product/11.2.0/install/make.log
        progMsg = Linking Utilities Executables

INFO: Linking 'SQL*Plus 11.2.0.3.0 '
INFO: Linking 'SQL*Plus 11.2.0.3.0 '
INFO: 9/3/13 4:54:07 PM IST: Starting install Link Phase of component SQL*Plus
INFO: Calling Action unixActions10.2.0.3.0  registerForMake
        installMakePath = /usr/bin/make
        installMakeFileName = /home/oracle/app/product/11.2.0/sqlplus/lib/ins_sqlplus.mk
        installTarget = install
        installArguments = ORACLE_HOME=/home/oracle/app/product/11.2.0
        undoMakeFileName = null
        undoTarget = null
        undoArguments = null
        logFile = /home/oracle/app/product/11.2.0/install/make.log
        progMsg = Linking SQLPLUS Executables

INFO: Linking 'Oracle Programmer 11.2.0.3.0 '
INFO: Linking 'Oracle Programmer 11.2.0.3.0 '
INFO: 9/3/13 4:54:07 PM IST: Starting install Link Phase of component Oracle Programmer
INFO: Linking 'Oracle Internet Directory Client 11.2.0.3.0 '
INFO: Linking 'Oracle Internet Directory Client 11.2.0.3.0 '
INFO: 9/3/13 4:54:07 PM IST: Starting install Link Phase of component Oracle Internet Directory Client
INFO: Calling Action unixActions10.2.0.3.0  registerForMake
        installMakePath = /usr/bin/make
        installMakeFileName = /home/oracle/app/product/11.2.0/ldap/lib/ins_ldap.mk
        installTarget = clientonlyinstall
        installArguments = ORACLE_HOME=/home/oracle/app/product/11.2.0
        undoMakeFileName = null
        undoTarget = clientonlyinstall
        undoArguments = ORACLE_HOME=/home/oracle/app/product/11.2.0
        logFile = /home/oracle/app/product/11.2.0/install/make.log
        progMsg = Linking OID Client

INFO: Calling Action unixActions10.2.0.3.0  registerForMake
        installMakePath = /usr/bin/make
        installMakeFileName = /home/oracle/app/product/11.2.0/ldap/lib/ins_ldap.mk
        installTarget = clientonlyinstall
        installArguments = ORACLE_HOME=/home/oracle/app/product/11.2.0
        undoMakeFileName = /home/oracle/app/product/11.2.0/ldap/lib/ins_ldap.mk
        undoTarget = clientonlyinstall
        undoArguments = ORACLE_HOME=/home/oracle/app/product/11.2.0
        logFile = /home/oracle/app/product/11.2.0/install/make.log
        progMsg = Linking Client-only Install

INFO: Linking 'SQLJ Runtime 11.2.0.3.0 '
INFO: Linking 'SQLJ Runtime 11.2.0.3.0 '
INFO: 9/3/13 4:54:07 PM IST: Starting install Link Phase of component SQLJ Runtime
INFO: Linking 'Oracle SQLJ 11.2.0.3.0 '
INFO: Linking 'Oracle SQLJ 11.2.0.3.0 '
INFO: 9/3/13 4:54:07 PM IST: Starting install Link Phase of component Oracle SQLJ
INFO: Linking 'Oracle Client 11.2.0.3.0 '
INFO: Linking 'Oracle Client 11.2.0.3.0 '
INFO: 9/3/13 4:54:07 PM IST: Starting install Link Phase of component Oracle Client
INFO: Linking in progress
INFO: Linking in progress
INFO: Link Phase JRE files in Scratch :0
INFO: Calling Action unixActions10.2.0.3.0  make
        registerOnly = false
        installMakePath = /usr/bin/make
        installMakeFileName = /home/oracle/app/product/11.2.0/network/lib/ins_net_client.mk
        installTarget = mkldflags ntcontab.o nnfgt.o
        undoMakeFileName =
        installArguments = ORACLE_HOME=/home/oracle/app/product/11.2.0
        logFile = /home/oracle/app/product/11.2.0/install/make.log
        undoTarget =
        progMsg = Linking ldflags Executables

INFO: Linking ldflags Executables
INFO: Linking ldflags Executables
INFO: The output of this make operation is also available at: '/home/oracle/app/product/11.2.0/install/make.log'
INFO:

INFO: Start output from spawned process:
INFO: ----------------------------------
INFO:

INFO: rm -f ntcontab.*

INFO: (if [ "compile" = "compile" ] ; then \
          /home/oracle/app/product/11.2.0/bin/gennttab > ntcontab.c ;\
          /usr/bin/gcc -m32  -m32  -fPIC -c ntcontab.c ;\
          rm -f /home/oracle/app/product/11.2.0/lib/ntcontab.o ;\
          mv ntcontab.o /home/oracle/app/product/11.2.0/lib/ ;\
          /usr/bin/ar rv /home/oracle/app/product/11.2.0/lib/libn11.a /home/oracle/app/product/11.2.0/lib/ntcontab.o ; fi)

INFO: /bin/sh: line 2: /usr/bin/gcc: No such file or directory

INFO: mv: cannot stat `ntcontab.o'
INFO: : No such file or directory

INFO: /usr/bin/ar: /home/oracle/app/product/11.2.0/lib/ntcontab.o: No such file or directory

INFO: make: *** [ntcontab.o] Error 1

INFO: End output from spawned process.
INFO: ----------------------------------
INFO: Exception thrown from action: make
Exception Name: MakefileException
Exception String: Error in invoking target 'mkldflags ntcontab.o nnfgt.o' of makefile '/home/oracle/app/product/11.2.0/network/lib/ins_net_client.mk'. See '/home/oracle/oraInventory/logs/installActions2013-09-03_04-52-05PM.log' for details.
Exception Severity: 1
INFO: Adding ExitStatus STOP_INSTALL to the exit status set
INFO: Finding the most appropriate exit status for the current application
INFO: Exit Status is -4
INFO: Shutdown Oracle Client Installer

该错误的解决方案是什么?

答案1

以 root 身份登录系统,然后执行以下操作:

  1. 使用 mv 命令将现有的 /usr/bin/gcc 文件移动到 /usr/bin/gcc.orig: mv /usr/bin/gcc /usr/bin/gcc.orig
  2. 使用文本编辑器(例如 vi)创建一个名为 gcc41 的新文件,其中包含以下内容(以 exec 开头的行必须是单行):

     #!/bin/sh
     exec /usr/bin/gcc.orig -m32 -static-libgcc -B /usr/lib/gcc/x86_64-redhat-linux/4.4.7/32/ $*
    

注意:根据 Linux 操作系统的版本,目录 usr/lib/gcc/x86_64-redhat-linux/4.1.2/32/ 可能略有不同。在 Linux 操作系统的 /usr/lib/gcc 下搜索相应的 32 位目录,并在 gcc41 文件中使用该目录。

  1. 使用以下命令更改 gcc41 文件的文件权限:

    chmod 755 /usr/bin/gcc41 
    chmod 755 /usr/bin/gcc
    
  2. 使用以下命令创建到 /usr/bin/gcc 的符号链接: ln -s -f /usr/bin/gcc41 /usr/bin/gcc
  3. 以 root 用户身份退出

相关内容