python - ImportError: libffi.so.6: cannot open shared object file: No such file or directory
问题描述
The linux server is not connected to the network. I need use the serve to train my deep learning model. So, I installed Anaconda to manage the environment. I have created a empty environment Example. I have installed offline Python 3.6.7 into Example (The Linux server had Python 3.8.8). My problem is: when I use "python setup.py install" to install setuptool in “setuptools-57.0.0" folder,an error occurred: ImportError: libffi.so.6: cannot open shared object file: No such file or directory
So, what should I do? Do I need to updata Python? What should I do without upgrading Python? Thank you very much!
解决方案
更新 conda 后我遇到了同样的错误。conda 不会安装软件包:
(myEnv) $ conda install requests
Traceback (most recent call last):
File "/home/me/miniconda2/bin/conda", line 13, in <module>
...
ImportError: libffi.so.6: cannot open shared object file: No such file or directory
我在 miniconda 的包中找到了 libffi.so.6 并创建了一个符号链接:
cd ~/miniconda2/lib
# this would list all libffi and no libffi.so.6 there
ls -lsah libffi*
# there might be different libffi versions, you can delete a link if not working
# I had libffi.so.6 in this folder
ls ../pkgs/libffi-3.3-he6710b0_2/lib/
# created a symlink
ln -s ../pkgs/libffi-3.3-he6710b0_2/lib/libffi.so.6 libffi.so.6
# or you could try creating symlink from libffi.so.7.1.0, both libffi.so.7 and libffi.so.6 were symlinks to it
ln -s ../pkgs/libffi-3.3-he6710b0_2/lib/libffi.so.7.1.0 libffi.so.6
现在~/miniconda2/lib
已经libffi.so.6
安装成功。
如果有你可以尝试创建符号链接libffi.so.7.1.0
,~/miniconda2/lib
我没有。
推荐阅读
- django - OSMGeoAdmin:导入的 OSM 地图:点、线和路都可以,不是多面体
- android - 未解决的参考:TabLayoutMediator
- if-statement - 使用 INDEX 和 IF 创建公式
- apache - 添加虚拟主机后 Apache 未启动
- three.js - Three.js 将加载的 glb 模型的网格几何图形转换为与边界框具有相同的中心
- c# - 是否可以连接到在程序外部创建的内存中 Sqlite 数据库?
- php - 如何使用 Laravel 生成报告票号?
- apache-kafka - 处理 kafka 消费者中的反序列化错误(死信队列)
- entity-framework - 添加数据时是否可以确保顺序?
- excel - 如何仅禁用 Excel 电子表格中特定列的填充句柄?