当前位置:网站首页>/bin/ld: 找不到 -lxml2
/bin/ld: 找不到 -lxml2
2022-07-02 12:13:00 【六位元素】
目录
场景
当我们对某个源码包进行编译安装,再执行 configure 有时候会因为找不到库文件,报错如下:
[[email protected] ~]# ./configure
/bin/ld: 找不到 -lxml2
出现问题
/bin/ld: 找不到 -lxml2
问题分析
因为编译要使用 lib 库文件,但是由于没有文件索引关系,导致搜索不到库文件,从而报错。
解决方法
通过使用 locate 加载库文件,创建索引关系,更新 lib 库,从而解决这个问题。
首先,加载库文件,创建索引关系
[[email protected] ~]# locate libxml2
/usr/lib64/libxml2.so.2
/usr/lib64/libxml2.so.2.9.1
/usr/lib64/girepository-1.0/libxml2-2.0.typelib
/usr/share/doc/libxml2-2.9.1
/usr/share/doc/libxml2-2.9.1/AUTHORS
/usr/share/doc/libxml2-2.9.1/Copyright
/usr/share/doc/libxml2-2.9.1/NEWS
/usr/share/doc/libxml2-2.9.1/README
/usr/share/doc/libxml2-2.9.1/TODO
然后,创建库文件软链接
[[email protected] ~]# ln -s /usr/lib64/libxml2.so.2 /usr/lib/libxml2.so
之后,再次编译执行 configure 即可
[[email protected] ~]# ./configure
边栏推荐
- Yolo format data set processing (XML to txt)
- 损失函数与正负样本分配:YOLO系列
- 6090. Minimax games
- Infra11199 database system
- Case introduction and problem analysis of microservice
- List of sergeant schools
- 【LeetCode】200-岛屿数量
- Storage read-write speed and network measurement based on rz/g2l | ok-g2ld-c development board
- [leetcode] 877 stone game
- PTA 天梯赛习题集 L2-001 城市间紧急救援
猜你喜欢
[development environment] install the Chinese language pack for the 2013 version of visual studio community (install test agents 2013 | install visual studio 2013 simplified Chinese)
动态规划入门一,队列的bfs(70.121.279.200)
17_ Redis_ Redis publish subscription
Custom exception
Yolo format data set processing (XML to txt)
Be a good gatekeeper on the road of anti epidemic -- infrared thermal imaging temperature detection system based on rk3568
03.golang初步使用
Equipped with Ti am62x processor, Feiling fet6254-c core board is launched!
How to intercept the value of a key from the JSON string returned by wechat?
NBA player analysis
随机推荐
List of sergeant schools
LeetCode刷题——去除重复字母#316#Medium
2279. Maximum number of backpacks filled with stones
Thoroughly understand browser strong cache and negotiation cache
LeetCode刷题——奇偶链表#328#Medium
PTA 天梯赛习题集 L2-001 城市间紧急救援
6090. 极大极小游戏
损失函数与正负样本分配:YOLO系列
College entrance examination admission score line climbing
Loss function and positive and negative sample allocation: Yolo series
[leetcode] 344 reverse string
【Salesforce】如何确认你的Salesforce版本?
2022 年辽宁省大学生数学建模A、B、C题(相关论文及模型程序代码网盘下载)
[leetcode] 417 - Pacific Atlantic current problem
Libcurl Lesson 13 static library introduces OpenSSL compilation dependency
MySQL calculate n-day retention rate
【网络安全】网络资产收集
Bing.com网站
03.golang初步使用
LeetCode刷题——统计各位数字都不同的数字个数#357#Medium