LINUX动态库(.SO)搜索路径(目录)设置方法

LINUX动态库(.SO)搜索路径(目录)设置方法

 

[root@VM_0_11_centos ld.so.conf.d]# cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
[root@VM_0_11_centos ld.so.conf.d]# ll -as /etc/ld.so.conf.d/
total 36
4 drwxr-xr-x. 2 root root 4096 Mar 6 21:39 .
12 drwxr-xr-x. 99 root root 12288 Mar 9 20:50 ..
4 -rw-r--r-- 1 root root 26 Aug 8 2019 bind-export-x86_64.conf
4 -rw-r--r-- 1 root root 19 Aug 9 2019 dyninst-x86_64.conf
4 -r--r--r-- 1 root root 63 Feb 5 07:07 kernel-3.10.0-1062.12.1.el7.x86_64.conf
4 -r--r--r-- 1 root root 63 Dec 6 23:53 kernel-3.10.0-1062.9.1.el7.x86_64.conf
4 -rw-r--r-- 1 root root 17 Aug 8 2019 mariadb-x86_64.conf
[root@VM_0_11_centos ld.so.conf.d]# cat mariadb-x86_64.conf
/usr/lib64/mysql
[root@VM_0_11_centos ld.so.conf.d]# cat dyninst-x86_64.conf
/usr/lib64/dyninst

 

编辑

/etc/ld.so.conf

 

[root@VM_0_11_centos bin]# openssl
openssl: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
[root@VM_0_11_centos bin]# ln -s /usr/local/openssl-1.1.1d/libssl.so.1.1 /usr/lib64/libssl.so.1.1
[root@VM_0_11_centos bin]# openssl
openssl: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory
[root@VM_0_11_centos bin]# ln -s /usr/local/openssl-1.1.1d/libcrypto.so.1.1 /usr/lib64/libcrypto.so.1.1
[root@VM_0_11_centos bin]# openssl
OpenSSL> ^C

 

checking for openssl/ssl.h in /usr/local/bin/openssl... no

 

LibreSSL is lacking host and IP verify parameters · Issue #381 · libressl-portable/portable https://github.com/libressl-portable/portable/issues/381

 


The following modules found by detect_modules() in setup.py, have been
built by the Makefile instead, as configured by the Setup files:
_abc atexit pwd
time


Failed to build these modules:
_ctypes


Following modules built successfully but were removed because they could not be imported:
_hashlib _ssl


Could not build the ssl module!
Python requires an OpenSSL 1.0.2 or 1.1 compatible libssl with X509_VERIFY_PARAM_set1_host().
LibreSSL 2.6.4 and earlier do not provide the necessary APIs, https://github.com/libressl-portable/portable/issues/381

 

 

更新  编译安装 openssl版本

 

Ubuntu/Deepin下Python3.8出现SSL错误的解决方案_Python_lh1136863240的博客-CSDN博客 https://blog.csdn.net/lh1136863240/article/details/103197393

 

 

 

checking whether compiling and linking against OpenSSL works... yes
checking for X509_VERIFY_PARAM_set1_host in libssl... yes

 

posted @   papering  阅读(2198)  评论(0编辑  收藏  举报
编辑推荐:
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· AI技术革命,工作效率10个最佳AI工具
历史上的今天:
2019-03-09 STW
2019-03-09 进程的目标 原子 二元信号量 多元信号量 互斥量 临界区 读写锁 变量缓存到寄存器 CPU动态调度换序
2019-03-09 页式内存管理
2019-03-09 a
2019-03-09 内存抖动
2019-03-09 内存管理 垃圾回收 C语言内存分配 垃圾回收3大算法 引用计数3个缺点 染色标记 标记清除 复制收集
2019-03-09 typedef define typedef可以使程序参数化,提高程序的可移植性。
点击右上角即可分享
微信分享提示