当前位置: 首页 > article >正文

【无标题】observer: error while loading shared libraries: libmariadb.so.3处理办法

文章目录


1.记录新装的oceanbase,使用observer帮助时,出现lib文件无法找到的处理过程

./observer --help
./observer: error while loading shared libraries: libmariadb.so.3: cannot open shared object file: No such file or directory

2.做一个strace跟踪,发现是某些lib文件无法找到

 strace ./observer 

输出截取如下:

openat(AT_FDCWD, "/usr/lib/libmariadb.so.3", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
writev(2, [{iov_base="./observer", iov_len=10}, {iov_base=": ", iov_len=2}, {iov_base="error while loading shared libra"..., iov_len=36}, {iov_base=": ", iov_len=2}, {iov_base="libmariadb.so.3", iov_len=15}, {iov_base=": ", iov_len=2}, {iov_base="cannot open shared object file", iov_len=30}, {iov_base=": ", iov_len=2}, {iov_base="No such file or directory", iov_len=25}, {iov_base="\n", iov_len=1}], 10./observer: error while loading shared libraries: libmariadb.so.3: cannot open shared object file: No such file or directory
) = 125
exit_group(127)                         = ?
+++ exited with 127 +++
obadmin@obsrv01:~/myoceanb

4.使用ldd查看observer依赖的lib库文件,结果有libmariadb.so.3,libaio.so.1两个文件是not found

obadmin@obsrv01:~/myoceanbase/oceanbase/bin$ ldd ./observer
        linux-vdso.so.1 (0x00007ffd27bdb000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007ff1f16cd000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ff1f16c8000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ff1f15df000)
        libmariadb.so.3 => not found
        libaio.so.1 => not found 
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ff1f15d8000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff1c7a00000)
        /lib64/ld-linux-x86-64.so.2 (0x00007ff1f16da000)

5.使用find查找文件时,发现oceanbase的lib库文件夹实际上有这个文件

 sudo find / -name libmariadb.so.3
/home/obadmin/.obd/repository/oceanbase-ce-libs/4.3.1.0/68f0b5f988bd5fb80d44ac29afad0c2b2f2d3763/libmariadb.so.3
/home/obadmin/myoceanbase/oceanbase/lib/libmariadb.so.3

6.使用ls确认,libmariadb与libaio两个文件都在/home/obadmin/myoceanbase/oceanbase/lib/文件夹下

 ls /home/obadmin/myoceanbase/oceanbase/lib/libmariadb.so /home/obadmin/myoceanbase/oceanbase/lib/libaio.so.1.0.1
/home/obadmin/myoceanbase/oceanbase/lib/libaio.so.1.0.1
/home/obadmin/myoceanbase/oceanbase/lib/libmariadb.so

7.查询$LD_LIBRARY_PATH,结果返回空值

echo $LD_LIBRARY_PATH

8.设置LD_LIBRARY_PATH

export LD_LIBRARY_PATH=/home/obadmin/myoceanbase/oceanbase/lib

9.再次查询LD_LIBRARY_PATH变量,这回有值了

 echo $LD_LIBRARY_PATH
/home/obadmin/myoceanbase/oceanbase/lib

10.再次运行observer

 ./observer --help
./observer --help
observer [OPTIONS]
  -h,--help                print this help
  -z,--zone ZONE           zone
  -p,--mysql_port PORT     mysql port
  -P,--rpc_port PORT       rpc port
  -N,--nodaemon            don't run in daemon
  -n,--appname APPNAME     application name
  -c,--cluster_id ID       cluster id
  -d,--data_dir DIR        OceanBase data directory
  -i,--devname DEV         net dev interface
  -I,--local_ip            ip of the current machine
  -o,--optstr OPTSTR       extra options string
  -r,--rs_list RS_LIST     root service list
  -l,--log_level LOG_LEVEL server log level
  -6,--ipv6 USE_IPV6       server use ipv6 address
  -m,--mode MODE server mode
  -f,--scn flashback_scn



http://www.kler.cn/news/327823.html

相关文章:

  • 以串口接口为例介绍关于BSP底层架构开发的迭代过程
  • LeetCode 983.最低票价
  • 前端面试:项目细节重难点问题分享(17)
  • 无环SLAM系统集成后端回环检测模块(loop):SC-A-LOAM以及FAST_LIO_SLAM
  • 基于MTK7981平台,学习了解理解SoC上电和boot流程
  • Thinkphp/Laravel基于vue的的出版社书籍阅读管理系统
  • Docker笔记-Docker磁盘空间清理
  • c#中的功能优势
  • 【QT Quick】基础语法:文件定义类型与枚举类型
  • 最大正方形 Python题解
  • windows下安装nginx和基本配置
  • cfg80211是怎么配置无线设备的AP的?
  • Python与MongoDB交互
  • 《一本书讲透Elasticsearch》读书笔记-索引
  • 2024年主流前端框架的比较和选择指南
  • 【学术会议征稿】2024年遥感技术与图像处理国际学术会议(RSTIP 2024)
  • taro RN 左右滑动切换页面
  • 自动驾驶 3DGS 学习笔记
  • 接口性能优化日记
  • Java高级Day51-apacheDBUtils
  • mybatis-plus与xml结合使用
  • 17【Protues单片机仿真】基于51单片机的太阳能智能谷物翻晒机器人
  • Vue 技术进阶 day2 数据监视的原理、其他内置指令、自定义指令、生命周期、组件化、VueComponent构造函数
  • 第十三届蓝桥杯真题Java c组C.纸张尺寸(持续更新)
  • leetcode力扣刷题系列——【座位预约管理系统】
  • Vue3实现mqtt的订阅与发布
  • 【论文解析】基于开源 Matrix 指令集扩展(矢量点积)的高性能 RISC-V 处理器“香山”(nanhu 版本)的 LLM 加速的研究
  • 828华为云征文|部署多功能集成的协作知识库 AFFiNE
  • mysql如何不使用窗口函数,去统计出入库情况
  • 全视通智慧养老护理呼叫求助,打造安心舒适的养老生活