当前位置:网站首页>[pro test feasible] error while loading shared libraries solution
[pro test feasible] error while loading shared libraries solution
2022-07-07 10:43:00 【Xminyang】
▚ 01 Problem description & analysis
- stay
Linux
in , When compiling or installing packages , We often encounter similar problems :
error while loading shared libraries: libxxx.so: cannot open shared object file: No such file or directory
- The reason for this problem is often not the absence of this file , Instead, the path is not configured , Therefore, an error will be reported when compiling because the file cannot be found .
This article assumes that the library not found is
libmpfr.so.6
, The absolute path is/home/dabai/mpfr-4.0.2/lib
There are two common solutions .
▚ 02 Method 1 : Use export command
- Terminal use
export
Command to configure environment variables , But only limited to the current terminal ; For other terminal windows, you need to reuseexport
Orders work . export
The format of the configuration environment variable is :
export LD_LIBRARY_PATH=/home/dabai/mpfr-4.0.2/lib:$LD_LIBRARY_PATH
- among ,
LD_LIBRARY_PATH
yesLinux
Environment variable name , This environment variable is mainly used to specify the search of shared libraries ( Dynamic link library ) In addition to the default path .
▚ 03 Method 2 : Modify the configuration file
- Modify the configuration file , Such as
~/.bashrc
or~/.bash_profile
or/etc/profile
. - among ,
Ordinary users
It can be modified directly~/.bashrc
or~/.bash_profile
, therefore , This modification is only valid for the current user . root user
Modifiable/etc/profile
, And it is effective for all users .
- Let's modify
~/.bashrc
File as an example :
vim ~/.bashrc
- then , stay
.bashrc
Add the following to the file :
export LD_LIBRARY_PATH=/home/dabai/mpfr-4.0.2/lib:$LD_LIBRARY_PATH
- After saving and exiting , Enter the following command at the terminal , To give effect to the above order :
source ~/.bashrc
边栏推荐
- table宽度比tbody宽度大4px
- 555 circuit details
- [detailed explanation of Huawei machine test] tall and short people queue up
- 中级网络工程师是什么?主要是考什么,有什么用?
- 施努卡:机器视觉定位技术 机器视觉定位原理
- BUUCTF---Reverse---reverse1
- TypeScript 接口继承
- CSAPP Bomb Lab 解析
- CC2530 ZigBee iar8.10.1 environment construction
- ArrayList thread insecurity and Solutions
猜你喜欢
ADB utility commands (network package, log, tuning related)
Prototype and prototype chain
1323:【例6.5】活动选择
leetcode-560:和为 K 的子数组
使用Tansformer分割三维腹部多器官--UNETR实战
成为优秀的TS体操高手 之 TS 类型体操前置知识储备
OpenGL glLightfv 函数的应用以及光源的相关知识
[recommendation system 02] deepfm, youtubednn, DSSM, MMOE
深入分析ERC-4907协议的主要内容,思考此协议对NFT市场流动性意义!
BUUCTF---Reverse---reverse1
随机推荐
How much review time does it usually take to take the intermediate soft exam?
2022年上半年5月网络工程师试题及答案
P1031 [noip2002 improvement group] average Solitaire
Socket通信原理和实践
Leetcode-303: region and retrieval - array immutable
高级软考(网络规划设计师)该如何备考?
TypeScript 接口继承
SQL Server 知识汇集9 : 修改数据
Schnuka: working principle of robot visual grasping machine visual grasping
Leetcode-304: two dimensional area and retrieval - matrix immutable
1324: [example 6.6] integer interval
Hdu-2196 tree DP learning notes
Is the soft test intermediate useful??
What are the contents of the intermediate soft test, the software designer test, and the test outline?
使用 load_decathlon_datalist (MONAI)快速加载JSON数据
【PyTorch 07】 动手学深度学习——chapter_preliminaries/ndarray 习题动手版
南航 PA3.1
P1223 queuing for water /1319: [example 6.1] queuing for water
Basic introduction of yarn and job submission process
Multithreaded asynchronous orchestration