当前位置:网站首页>/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边栏推荐
- Libcurl Lesson 13 static library introduces OpenSSL compilation dependency
- [leetcode] 877 stone game
- folium地图无法显示的问题,临时性解决方案如下
- 【LeetCode】1162-地图分析
- 6095. Strong password checker II
- 04.进入云原生后的企业级应用构建的一些思考
- 树-二叉搜索树
- 已知两种遍历序列构造二叉树
- College entrance examination score line climbing
- 2279. Maximum number of backpacks filled with stones
猜你喜欢

6.12 critical moment of Unified Process Platform

Deux séquences ergodiques connues pour construire des arbres binaires

4. Jctree related knowledge learning

Redux——详解

Beijing rental data analysis

Finally, I understand the event loop, synchronous / asynchronous, micro task / macro task, and operation mechanism in JS (with test questions attached)

Yolov5 code reproduction and server operation
![[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)](/img/cf/38e4035c3b318814672f21c8a42618.jpg)
[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)

03. Preliminary use of golang

16_ Redis_ Redis persistence
随机推荐
【LeetCode】1140-石子游戏II
[leetcode] 200 number of islands
2278. Percentage of letters in string
LeetCode刷题——两整数之和#371#Medium
[leetcode] 1140 stone game II
YOLOV5 代码复现以及搭载服务器运行
Yolo format data set processing (XML to txt)
Basic knowledge of cryptography
03. Preliminary use of golang
LeetCode刷题——统计各位数字都不同的数字个数#357#Medium
2022 college students in Liaoning Province mathematical modeling a, B, C questions (related papers and model program code online disk download)
LeetCode刷题——递增的三元子序列#334#Medium
Two traversal sequences are known to construct binary trees
2303. Calculate the total tax payable
College entrance examination admission score line climbing
[leetcode] 577 reverse word III in string
17_ Redis_ Redis publish subscription
[leetcode] 1020 number of enclaves
. Net again! Happy 20th birthday
【LeetCode】877-石子游戏