python 调用so文件 报错 dlopen(XXXXOOOO.so, 6): no suitable image found. Did find:
作者:高景洋 日期:2021-04-22 16:01:39 浏览次数:3290
centos 下 python 调用 so 文件报错。
内容如下:
发生异常: OSError
dlopen(目录.so, 6): no suitable image found. Did find:
目录XXXXOOOO.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00
目录.so: stat() failed with errno=13
File "目录/tmall_sku.py", line 13, in __init__
self.lib = ctypes.cdll.LoadLibrary(DLL_PATH)
File "/Users/jasongao/Downloads/淘系店铺商品采集/tmall_sku.py", line 150, in <module>
cla = TmallSku()
原因:
缺少系统so文件,和 系统so文件,与要调用的so文件,版本不匹配。
处理方式:
1、下载zip文件
2、解压zip文件后,会有两个文件 libstdc++.so.6 和 libcrypto.so.1.1
3、将这两个文件拷到 centos /lib64/ 目录下,重新运行程序,即正常~
本文永久性链接:
<a href="http://r4.com.cn/art177.aspx">python 调用so文件 报错 dlopen(XXXXOOOO.so, 6): no suitable image found. Did find:</a>
<a href="http://r4.com.cn/art177.aspx">python 调用so文件 报错 dlopen(XXXXOOOO.so, 6): no suitable image found. Did find:</a>
当前header:Host: r4.com.cn
X-Host1: r4.com.cn
X-Host2: r4.com.cn
X-Host3: 127.0.0.1:8080
X-Forwarded-For: 18.218.231.116
X-Real-Ip: 18.218.231.116
X-Domain: r4.com.cn
X-Request: GET /art177.aspx HTTP/1.1
X-Request-Uri: /art177.aspx
Connection: close
Accept: */*
User-Agent: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Accept-Encoding: gzip, br, zstd, deflate