签到成功

知道了

CNDBA社区CNDBA社区

达梦 DMHS libdmoci.so: cannot open shared object file 错误解决方法

2023-01-29 17:16 1015 0 原创 DM 达梦
作者: dave

1 问题现象

配置达梦DMHS 初始状态的时候,报如下错误:

https://www.cndba.cn/dave/article/116421
https://www.cndba.cn/dave/article/116421
https://www.cndba.cn/dave/article/116421

DMHS >copy 0 "sch.name='SYSDBA'" DICT|LSN|CREATE|INSERT|INDEX 

CSL[ERROR]: 加载日志分析模块失败

查看日志,错误如下:

2022-12-22 07:54:29 PUB[INFO]: set enable_directio = 0
2022-12-22 07:54:29 MGR[INFO]: ▒▒▒ڼ▒▒▒DM8▒▒־▒▒▒▒ģ▒▒...
2022-12-22 07:54:29 MGR[ERROR]: ▒▒▒ļ▒ libcpt_dm8.so δ▒ҵ▒, ▒▒▒: 0, libdmoci.so: cannot open shared object file: No such file or directory
2022-12-22 07:54:29 MGR[INFO]: ▒▒▒ 127.0.0.1(dmhs_console) ▒▒▒▒▒▒Ѿ▒▒Ͽ▒!

2 解决方法

提示缺失的文件实际是存在的,所以怀疑是环境变量配置的问题:https://www.cndba.cn/dave/article/116421https://www.cndba.cn/dave/article/116421https://www.cndba.cn/dave/article/116421

[dave@www.cndba.cn log]$ find /dm -name libdmoci.so
/dm/dmhs/bin/stat/libdmoci.so
/dm/dmhs/hs_agent/libdmoci.so
/dm/dmhs/db/bin/libdmoci.so
/dm/dmhs/INST_STAT/USTC/libdmoci.so


[dave@www.cndba.cn USTC]$ pwd
/dm/dmhs/INST_HS/USTC
[dave@www.cndba.cn USTC]$ cat ~/.bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH

export DM_HOME="/dm/dmdbms"
export LD_LIBRARY_PATH="/dm/dmdbms/bin:$LD_LIBRARY_PATH"
export PATH="/dm/dmdbms/bin:$PATH"

export DM_HOME="/dm/dmdbms"
export DMHS_HOME=/dm/dmhs
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/dm/dmhs/bin:/dm/dmhs/db/bin:/dm/dmdbms/bin:/dm/dmhs/db/bin

export PATH="/dm/dmdbms/bin:/dm/dmhs/bin:/dm/dmhs/db/bin:$PATH"
[dave@www.cndba.cn USTC]$

但修改配置,然后重启,并没有解决问题。

https://www.cndba.cn/dave/article/116421
https://www.cndba.cn/dave/article/116421

所以ldd 了一把,看到调用的是/dm/dmhs/bin/libdmoci.sohttps://www.cndba.cn/dave/article/116421

[dave@www.cndba.cn USTC]$ ll libcpt_dm8.so
-rwxr-xr-x 1 dmdba dinstall 942561 12月 22 05:10 libcpt_dm8.so
[dave@www.cndba.cn USTC]$ ldd libcpt_dm8.so
        linux-vdso.so.1 =>  (0x00007ffc5a1d4000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f85f4ac7000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f85f47c5000)
        librt.so.1 => /lib64/librt.so.1 (0x00007f85f45bd000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f85f43a1000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f85f419d000)
        libdmhs_pub.so => ./libdmhs_pub.so (0x00007f85f3e93000)
        libdmhs_net.so => ./libdmhs_net.so (0x00007f85f3c4a000)
        libdmhs_ld_dm8.so => ./libdmhs_ld_dm8.so (0x00007f85f39eb000)
        libdmhs_ucvt.so => ./libdmhs_ucvt.so (0x00007f85f3493000)
        libdmoci.so => /dm/dmhs/bin/libdmoci.so (0x00007f85f288e000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f85f5169000)
        libdmhs_bool_parse.so => ./libdmhs_bool_parse.so (0x00007f85f2681000)
        libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f85f237a000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f85f2164000)

所以接单粗暴的把这个文件复制到DMHS 实例目录下,再次初始化,就没有报错了:https://www.cndba.cn/dave/article/116421

[dave@www.cndba.cn USTC]$ pwd
/dm/dmhs/INST_HS/USTC
[dave@www.cndba.cn USTC]$

[dave@www.cndba.cn USTC]$ cp /dm/dmhs/hs_agent/libdmoci.so .
[dave@www.cndba.cn USTC]$ ldd libcpt_dm8.so
        linux-vdso.so.1 =>  (0x00007ffe597a7000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f84f38c8000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f84f35c6000)
        librt.so.1 => /lib64/librt.so.1 (0x00007f84f33be000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f84f31a2000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f84f2f9e000)
        libdmhs_pub.so => ./libdmhs_pub.so (0x00007f84f2c94000)
        libdmhs_net.so => ./libdmhs_net.so (0x00007f84f2a4b000)
        libdmhs_ld_dm8.so => ./libdmhs_ld_dm8.so (0x00007f84f27ec000)
        libdmhs_ucvt.so => ./libdmhs_ucvt.so (0x00007f84f2294000)
        libdmoci.so => ./libdmoci.so (0x00007f84f168f000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f84f3f6a000)
        libdmhs_bool_parse.so => ./libdmhs_bool_parse.so (0x00007f84f1482000)
        libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f84f117b000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f84f0f65000)

版权声明:本文为博主原创文章,未经博主允许不得转载。

用户评论
* 以下用户言论只代表其个人观点,不代表CNDBA社区的观点或立场
dave

dave

关注

人的一生应该是这样度过的:当他回首往事的时候,他不会因为虚度年华而悔恨,也不会因为碌碌无为而羞耻;这样,在临死的时候,他就能够说:“我的整个生命和全部精力,都已经献给世界上最壮丽的事业....."

  • 2237
    原创
  • 2
    翻译
  • 535
    转载
  • 185
    评论
  • 访问:6531820次
  • 积分:4229
  • 等级:核心会员
  • 排名:第1名
精华文章
    最新问题
    查看更多+
    热门文章
      热门用户
      推荐用户
        Copyright © 2016 All Rights Reserved. Powered by CNDBA · 皖ICP备2022006297号-1·

        QQ交流群

        注册联系QQ