在 Fedora 18 上安装 Oracle 11g 时出现链接器错误

rsj*_*ani 2 linux fedora installation oracle-11g

我必须在 Linux 上使用 C/C++ 教授针对 Oracle DB 的数据库编程。所以第一步是在 Linux 上安装 Oracle 11g。

机器配置:主机:Windows 8 Enterprise 64 位客户机:Fedora 18 XFCE 版 32 位使用 Virtual Box 4.2.10

我正在使用此链接作为指南。

我已经完成了所有步骤,直到在链接阶段出现错误的“./runInstall”步骤:

以下是“/u01/app/oraInventory/logs”中日志文件的摘录:

[oracle@localhost logs]$ tail -n 25 installActions2013-03-31_03-14-24PM.log 
INFO: /usr/bin/ld: warning: -z lazyload ignored.

/usr/bin/ld: warning: -z nolazyload ignored.
/usr/bin/ld: /u01/app/oracle/product/11.2.0/db_1/sysman/lib//libnmectl.a(nmectlt.o): undefined reference to symbol 'B_DestroyKeyObject'
/usr/bin/ld: note: 'B_DestroyKeyObject' is defined in DSO /u01/app/oracle/product/11.2.0/db_1/lib/libnnz11.so so try adding it to the linker command line
/u01/app/oracle/product/11.2.0/db_1/lib/libnnz11.so: could not read symbols: Invalid operation

INFO: collect2: error: ld returned 1 exit status

INFO: make[1]: *** [/u01/app/oracle/product/11.2.0/db_1/sysman/lib/emdctl] Error 1

INFO: make[1]: Leaving directory `/u01/app/oracle/product/11.2.0/db_1/sysman/lib'

INFO: make: *** [emdctl] Error 2

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

INFO: Exception thrown from action: make
Exception Name: MakefileException
Exception String: Error in invoking target 'agent nmhs' of makefile '/u01/app/oracle/product/11.2.0/db_1/sysman/lib/ins_emagent.mk'. See '/u01/app/oraInventory/logs/installActions2013-03-31_03-14-24PM.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 Database 11g Release 2 Installer

INFO: Unloading Setup Driver
[oracle@localhost logs]$
Run Code Online (Sandbox Code Playgroud)

如何修复此错误?

还有其他方法可以使用 C++ 展示 Oracle DB 编程吗?

如果需要任何其他信息,请告诉我。

小智 5

请执行下列操作:

  1. vi $ORACLE_HOME/sysman/lib/ins_emagent.mk
  2. 搜索行: $(MK_EMAGENT_NMECTL)
  3. 将其更改为: $(MK_EMAGENT_NMECTL) -lnnz11