当前位置:网站首页>Resolve importerror:lib*** so--cannot open shared object file: No such... (pycharm/clion reports an error but the shell does not)
Resolve importerror:lib*** so--cannot open shared object file: No such... (pycharm/clion reports an error but the shell does not)
2022-06-13 09:10:00 【Glass lamp】
Problem description : After successful compilation ( There are executable files in the folder ), Operation error reporting (Ubuntu)Clion The error cannot be found .so Shared library ( but shell Can be executed normally ) terms of settlement (pycharm The same goes for similar error reports )
/home/luoxinhao/Desktop/mywork/bin/Infantry: error while loading shared libraries: libopencv_features2d.so.4.5: cannot open shared object file: No such file or directory
reason :clion The implementation of may be similar to us shell The environment variables are different , Here's the solution
Method 1: Each start Clion Start without mouse , Use terminal , Get into clion In the folder , Input ./clion.sh, Can be executed normally .( Feasible but troublesome )
Method 2: Soft link mode (shell Reporting errors and IDLE Error reporting is feasible , But you may need to link many libraries , One link at a time )
my clion It was successfully modified in this way , however pycharm After linking sevenoreight links, I gave up without finishing the chain
1.1 file found
find / -name lib**.so ( Missing DLL )
1.2 Build soft links
ln -s /path/to/lib**.so /usr/lib
1.3 sudo ldconfig
Method 3: modify LD_LIBRARY_PATH( For me, it can only solve shell Report errors , After modification IDLE Still reporting a mistake )
sudo gedit ~/.bashrc
export LD_LIBRARY_PATH=/where/you/install/lib:$LD_LIBRARY_PATH
sudo source ~/.bashrc
Method 4: modify /etc/ld.so.conf( ditto )
vim /etc/ld.so.conf
add /where/you/install/lib
sudo ldconfig
Method 5: Add to environment variable ( You can use , For resolution IDLE Report errors , You may need a matching method 3 Use , Not tried alone )
Start by opening pycharm, Modify the environment variables of the running configuration in the upper right corner
If you already have environment variables , Put a semicolon in the back and paste .
The paste content is similar to the method 3
Such as method 3 The contents are as follows
export LD_LIBRARY_PATH="/opt/intel/openvino_2021.4.689/opencv/lib:$LD_LIBRARY_PATH"Add... After the semicolon
LD_LIBRARY_PATH=/opt/intel/openvino_2021.4.689/opencv/lib(2-4 strip ) reference : solve ImportError:lib***.so--cannot open shared object file: No such file or directory_hhhuua The blog of -CSDN Blog
边栏推荐
- Figure introduction to database neo4j
- Summary of the first retrospective meeting
- 【QNX Hypervisor 2.2 用户手册】4.5 构建Guest
- Pytorch model tuning - only some layers of the pre training model are loaded
- 20211006 integral, differential and projection belong to linear transformation
- Number of parameters of pytorch statistical model
- an error occurred while trying to rename a file in the destination directory code 5
- Drill down to protobuf - Introduction
- Tutorial (5.0) 04 Fortint cloud services and scripts * fortiedr * Fortinet network security expert NSE 5
- 14. class initialization, default constructor, =default
猜你喜欢

【网络安全渗透】如果你还不懂CSRF?这一篇让你彻底掌握

如何成为白帽子黑客?我建议你从这几个阶段开始学习

20220524 如何把CoppeliaSim安装到D盘

Cisco, Huawei network equipment

图数据库Neo4j介绍

Cmake Learning Series I

Some websites of QT (software download, help documents, etc.)

Longadder of the source code of JUC atomic accumulator

20211020 academician all drive system

Message Oriented Middleware
随机推荐
Tutorial (5.0) 01 Product introduction and installation * fortiedr * Fortinet network security expert NSE 5
20211028 adjustment and tracking
基于微信小程序的图书馆管理系统.rar(论文+源码)
torch. How to calculate addmm (m, mat1, mat2)
Pytorch model tuning - only some layers of the pre training model are loaded
Neo4j环境搭建
批量读取文件夹下的全部语音文件
Download address of QT source code of each version
Immutability of shared model
You don't know the usage of stringstream
Mttr/mttf/mtbf diagram
QT multithreaded TCP server
Simulink的Variant Model和Variant Subsystem用法
pytorch统计模型的参数个数
Simple implementation of database link pool
Yolov5 model evaluation
IP address introduction
20211104 why are the traces of similar matrices the same
网络安全漏洞分析之重定向漏洞分析
JS format file unit display