当前位置:网站首页>/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边栏推荐
- [leetcode] 877 stone game
- 6.12 critical moment of Unified Process Platform
- 04.进入云原生后的企业级应用构建的一些思考
- PTA ladder game exercise set l2-001 inter city emergency rescue
- SQL stored procedure
- Thoroughly understand browser strong cache and negotiation cache
- Libcurl Lesson 13 static library introduces OpenSSL compilation dependency
- College entrance examination score line climbing
- Pytoch saves tensor to Mat file
- 2279. Maximum number of backpacks filled with stones
猜你喜欢

Custom exception
![[leetcode] 417 - Pacific Atlantic current problem](/img/30/c541bc1e81eb4e348ca11116a05e84.png)
[leetcode] 417 - Pacific Atlantic current problem

yolo格式数据集处理(xml转txt)

动态规划入门一,队列的bfs(70.121.279.200)

Build your own semantic segmentation platform deeplabv3+

SQL stored procedure

5. Practice: jctree implements the annotation processor at compile time

03. Preliminary use of golang

How to find a sense of career direction

Pytorch 保存tensor到.mat文件
随机推荐
Pytorch 保存tensor到.mat文件
二叉树前,中,后序遍历
已知两种遍历序列构造二叉树
College entrance examination admission score line climbing
Force deduction solution summary 2029 stone game IX
动态规划入门二(5.647.62)
[leetcode] 19 delete the penultimate node of the linked list
5. Practice: jctree implements the annotation processor at compile time
MD5加密
How to intercept the value of a key from the JSON string returned by wechat?
/bin/ld: 找不到 -lssl
04. Some thoughts on enterprise application construction after entering cloud native
Bing.com網站
16_ Redis_ Redis persistence
[leetcode] 486 predict winners
Folium, diagnosis and close contact trajectory above
[leetcode] 1020 number of enclaves
LeetCode刷题——递增的三元子序列#334#Medium
[leetcode] 283 move zero
Storage read-write speed and network measurement based on rz/g2l | ok-g2ld-c development board