linux - 以静默模式安装 Oracle 后,我无法运行 SQLPLUS

标签 linux oracle installation sqlplus

显示错误

/oracle/product/12.1.0/dbhome_1/bin/sqlplus: error while loading shared libraries: /oracle/product/12.1.0/dbhome_1/lib/libclntsh.so.12.1: file too short

[oracle@82eb40bf3cd2 ~]$ strace $ORACLE_HOME/bin/sqlplus
execve("/oracle/product/12.1.0/dbhome_1/bin/sqlplus", ["/oracle/product/12.1.0/dbhome_1/"...], 0x7ffd4df2e550 /* 23 vars */) = 0
brk(NULL)                               = 0xd63000
arch_prctl(0x3001 /* ARCH_??? */, 0x7fffa311c1b0) = -1 EINVAL (Invalid argument)
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/oracle/product/12.1.0/dbhome_1/lib/tls/haswell/x86_64/libsqlplus.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/oracle/product/12.1.0/dbhome_1/lib/tls/haswell/x86_64", 0x7fffa311b400) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/oracle/product/12.1.0/dbhome_1/lib/tls/haswell/libsqlplus.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/oracle/product/12.1.0/dbhome_1/lib/tls/haswell", 0x7fffa311b400) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/oracle/product/12.1.0/dbhome_1/lib/tls/x86_64/libsqlplus.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/oracle/product/12.1.0/dbhome_1/lib/tls/x86_64", 0x7fffa311b400) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/oracle/product/12.1.0/dbhome_1/lib/tls/libsqlplus.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/oracle/product/12.1.0/dbhome_1/lib/tls", 0x7fffa311b400) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/oracle/product/12.1.0/dbhome_1/lib/haswell/x86_64/libsqlplus.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/oracle/product/12.1.0/dbhome_1/lib/haswell/x86_64", 0x7fffa311b400) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/oracle/product/12.1.0/dbhome_1/lib/haswell/libsqlplus.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/oracle/product/12.1.0/dbhome_1/lib/haswell", 0x7fffa311b400) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/oracle/product/12.1.0/dbhome_1/lib/x86_64/libsqlplus.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/oracle/product/12.1.0/dbhome_1/lib/x86_64", 0x7fffa311b400) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/oracle/product/12.1.0/dbhome_1/lib/libsqlplus.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\374\1\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1546540, ...}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f664e6da000
mmap(NULL, 3112424, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f664e1bc000
mprotect(0x7f664e2a6000, 2093056, PROT_NONE) = 0
mmap(0x7f664e4a5000, 61440, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xe9000) = 0x7f664e4a5000
close(3)                                = 0
openat(AT_FDCWD, "/oracle/product/12.1.0/dbhome_1/lib/libclntsh.so.12.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "", 832)                        = 0
close(3)                                = 0
writev(2, [{iov_base="/oracle/product/12.1.0/dbhome_1/"..., iov_len=43}, {iov_base=": ", iov_len=2}, {iov_base="error while loading shared libra"..., iov_len=36}, {iov_base=": ", iov_len=2}, {iov_base="/oracle/product/12.1.0/dbhome_1/"..., iov_len=53}, {iov_base=": ", iov_len=2}, {iov_base="file too short", iov_len=14}, {iov_base="", iov_len=0}, {iov_base="", iov_len=0}, {iov_base="\n", iov_len=1}], 10/oracle/product/12.1.0/dbhome_1/bin/sqlplus: error while loading shared libraries: /oracle/product/12.1.0/dbhome_1/lib/libclntsh.so.12.1: file too short
) = 153
exit_group(127)                         = ?
+++ exited with 127 +++

最佳答案

出现此错误的主要原因是系统上缺少 glib-devel rpm 包。 在我的系统上,问题在以下操作后得到解决:

  1. 为 glib 安装正确的 rpm
  2. 然后运行此命令重新创建所有符号链接(symbolic link)。 $ORACLE_HOME/bin/relink all
  3. 现在试试 sqlplus。

关于linux - 以静默模式安装 Oracle 后,我无法运行 SQLPLUS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58539012/

相关文章:

SQL - 如何选择具有最大值的列的行

express - NPM 安装快速。错误 : No compatible version found

wix - 此 Windows 安装程序包有问题。无法运行完成此安装所需的程序

linux - Fontconfig 2.8.0 linux fc-list 没有结果

python celery 没有名为 app.tasks 的模块

使用 group by 的 SQL 查询并计算联接中的某些行

node.js - 从源安装 Node 后出现 "Process out of memory"错误

从远程 NFS 共享复制时,PHP 复制功能比 linux cp 命令慢

linux - 按名称杀死正在运行的进程

sql - 将过滤条件放在 join on 语句中是否等效?