当前位置:网站首页>[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
边栏推荐
- leetcode-303:区域和检索 - 数组不可变
- [牛客网刷题 Day6] JZ27 二叉树的镜像
- MySQL insert data create trigger fill UUID field value
- Deeply analyze the main contents of erc-4907 agreement and think about the significance of this agreement to NFT market liquidity!
- Schnuka: working principle of robot visual grasping machine visual grasping
- What are the contents of the intermediate soft test, the software designer test, and the test outline?
- 2022年7月10日“五心公益”活动通知+报名入口(二维码)
- [daiy5] jz77 print binary tree in zigzag order
- I plan to take part in security work. How about information security engineers and how to prepare for the soft exam?
- leetcode-304:二维区域和检索 - 矩阵不可变
猜你喜欢
软考信息处理技术员有哪些备考资料与方法?
Find the root of equation ax^2+bx+c=0 (C language)
How to prepare for the advanced soft test (network planning designer)?
1323: [example 6.5] activity selection
如何顺利通过下半年的高级系统架构设计师?
ThreadLocal会用可不够
CAS机制
简单易修改的弹框组件
Applet jump to H5, configure business domain name experience tutorial
小程序跳转H5,配置业务域名经验教程
随机推荐
单调性约束与反单调性约束的区别 monotonicity and anti-monotonicity constraint
P1223 queuing for water /1319: [example 6.1] queuing for water
宁愿把简单的问题说一百遍,也不把复杂的问题做一遍
如何顺利通过下半年的高级系统架构设计师?
Slurm资源管理与作业调度系统安装配置
Pre knowledge reserve of TS type gymnastics to become an excellent TS gymnastics master
Monai version has been updated to 0.9. See what new functions it has
Some properties of leetcode139 Yang Hui triangle
table宽度比tbody宽度大4px
What are the contents of the intermediate soft test, the software designer test, and the test outline?
How embedded engineers improve work efficiency
TypeScript 接口继承
Trajectory planning for multi robot systems: methods and Applications Overview reading notes
Socket communication principle and Practice
Schnuka: machine vision positioning technology machine vision positioning principle
php \n 换行无法输出
gym安装踩坑记录
Mendeley--免费的文献管理工具,给论文自动插入参考文献
[email protected] can help us get the log object quickly
【推荐系统 01】Rechub