Centos8 运行cx_oracle DPI-1047: Cannot locate a 64-bit Oracle Client library异常解决

情况描述:

复制代码
cx_Oracle 在centos 7版本上运行正常,迁移到Centos8后发现有如下报错:
java 复制代码
Error:DPI-1047: Cannot locate a 64-bit Oracle Client library: 
"libclntsh.so: cannot open shared object file: No such file or directory". 
See https://oracle.github.io/odpi/doc/installation.html#linux for help

初步分析:

a)尝试从yum获取libclntsh.so 库文件,并尝试从7版本上看是哪个软件包提供的

发现8的yum源里面并不包含oracle-instantclient-basic这个软件包

b)尝试看报错提示里面的网址,找到对应软件包的下载路径,注意操作系统版本,这是64位Centos 8

https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html

c)安装软件包后,正常运行

d)参考文档地址:

https://oracle.github.io/odpi/doc/installation.html#linux

总结:

复制代码
a)操作系统跨大版本迁移要多测试,发现报错要先尝试复现,缩小问题范围
b)对于比较完善的Python库的错误提示,要重视,里面可能会提供较好的解决方式
相关推荐
人生匆匆4 分钟前
通过nginx解决跨域问题
运维·nginx
秦ぅ时12 分钟前
保姆级教程|OpenAI tts-1-hd模型调用全流程(Python+curl+懒人用法)
开发语言·python
Muyuan199814 分钟前
25.Paper RAG Agent 优化记录:上传反馈、计算器安全与 Chunk 参数调整
python·安全·django·sqlite·fastapi
原来是猿16 分钟前
【Socket编程预备知识】
linux·运维·服务器·网络
Java面试题总结27 分钟前
使用 Python 设置 Excel 数据验证
开发语言·python·excel
茉莉玫瑰花茶30 分钟前
LangChain 核心组件 [ 2 ]
java·数据库·langchain
吴爃35 分钟前
Spring Boot 项目在 K8S 中的打包、部署与运维发布实践
运维·spring boot·kubernetes
小郑加油36 分钟前
python学习Day10天:列表进阶 + 内置函数 + 代码简化
开发语言·python·学习
时空系1 小时前
第13篇:综合实战——制作我的小游戏 python中文编程
开发语言·python·ai编程
Elastic 中国社区官方博客1 小时前
在 Elastic 中使用 MCP 自动化用户旅程以进行合成监控
大数据·运维·人工智能·elasticsearch·搜索引擎·自动化·可用性测试