当前位置:网站首页>/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
边栏推荐
- Pytorch 保存tensor到.mat文件
- [network security] network asset collection
- 2022 年辽宁省大学生数学建模A、B、C题(相关论文及模型程序代码网盘下载)
- 【LeetCode】877-石子游戏
- NBA player analysis
- College entrance examination admission score line crawler
- 彻底弄懂浏览器强缓存和协商缓存
- 2278. Percentage of letters in string
- LeetCode刷题——递增的三元子序列#334#Medium
- 【LeetCode】1020-飞地的数量
猜你喜欢
Leetcode question brushing - parity linked list 328 medium
PostgresSQL 流复制 主备切换 主库无读写宕机场景
[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)
I made an istio workshop. This is the first introduction
【LeetCode】417-太平洋大西洋水流问题
Pytoch saves tensor to Mat file
03.golang初步使用
[experience cloud] how to get the metadata of experience cloud in vscode
MySQL calculate n-day retention rate
MySQL -- Index Optimization -- order by
随机推荐
NBA player analysis
【LeetCode】283-移动零
. Solution to the problem of Chinese garbled code when net core reads files
College entrance examination score line climbing
【LeetCode】1162-地图分析
【LeetCode】577-反转字符串中的单词 III
怎样从微信返回的json字符串中截取某个key的值?
[leetcode] 19 delete the penultimate node of the linked list
【LeetCode】877-石子游戏
Party History Documentary theme public welfare digital cultural and creative products officially launched
损失函数与正负样本分配:YOLO系列
6092. 替换数组中的元素
2303. 计算应缴税款总额
Custom exception
College entrance examination admission score line crawler
Libcurl Lesson 13 static library introduces OpenSSL compilation dependency
LeetCode刷题——两整数之和#371#Medium
[leetcode] 200 number of islands
6090. 极大极小游戏
02. After containerization, you must face golang