当前位置:网站首页>[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
Linuxin , 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
exportCommand to configure environment variables , But only limited to the current terminal ; For other terminal windows, you need to reuseexportOrders work . exportThe format of the configuration environment variable is :
export LD_LIBRARY_PATH=/home/dabai/mpfr-4.0.2/lib:$LD_LIBRARY_PATH
- among ,
LD_LIBRARY_PATHyesLinuxEnvironment 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
~/.bashrcor~/.bash_profileor/etc/profile. - among ,
Ordinary usersIt can be modified directly~/.bashrcor~/.bash_profile, therefore , This modification is only valid for the current user . root userModifiable/etc/profile, And it is effective for all users .
- Let's modify
~/.bashrcFile as an example :
vim ~/.bashrc
- then , stay
.bashrcAdd 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



边栏推荐
- MONAI版本更新到 0.9 啦,看看有什么新功能
- Is the soft test intermediate useful??
- SQL Server 知识汇集11 : 约束
- Using U2 net deep network to realize -- certificate photo generation program
- 中级网络工程师是什么?主要是考什么,有什么用?
- CSAPP bomb lab parsing
- String formatting
- Multisim -- software related skills
- Some superficial understanding of word2vec
- Schnuka: working principle of robot visual grasping machine visual grasping
猜你喜欢

【亲测可行】error while loading shared libraries的解决方案

对word2vec的一些浅层理解

使用Tansformer分割三维腹部多器官--UNETR实战

香橙派OrangePi 4 LTS开发板通过Mini PCIE连接SATA硬盘的操作方法

BUUCTF---Reverse---reverse1

【推薦系統 01】Rechub

使用U2-Net深层网络实现——证件照生成程序

Application of OpenGL gllightfv function and related knowledge of light source

Openinstall and Hupu have reached a cooperation to mine the data value of sports culture industry

What does intermediate software evaluator test
随机推荐
[recommendation system 01] rechub
[dai6] mirror image of JZ27 binary tree
【OneNote】无法连接到网络,无法同步问题
如何顺利通过下半年的高级系统架构设计师?
深入理解Apache Hudi异步索引机制
软考中级有用吗??
Monai version has been updated to 0.9. See what new functions it has
leetcode-303:区域和检索 - 数组不可变
JS implementation chain call
BUUCTF---Reverse---reverse1
Schnuka: machine vision positioning technology machine vision positioning principle
【作业】2022.7.6 写一个自己的cal函数
关于easyflash v3.3使用过程的记录
Trajectory planning for multi robot systems: methods and Applications Overview reading notes
【实战】霸榜各大医学分割挑战赛的Transformer架构--nnFormer
求最大公约数与最小公倍数(C语言)
IDA中常见快捷键
What are the contents of the intermediate soft test, the software designer test, and the test outline?
table宽度比tbody宽度大4px
2022年上半年5月网络工程师试题及答案