当前位置:网站首页>/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】344-反转字符串
- Leetcode skimming - remove duplicate letters 316 medium
- Pytoch saves tensor to Mat file
- 6096. 咒语和药水的成功对数
- Semantic segmentation learning notes (1)
- 2278. Percentage of letters in string
- Infra11199 database system
- [leetcode] 695 - maximum area of the island
- 19_ Redis_ Manually configure the host after downtime
- 高考录取分数线爬取
猜你喜欢
Party History Documentary theme public welfare digital cultural and creative products officially launched
Solve the problem of frequent interruption of mobaxterm remote connection
Evaluation of embedded rz/g2l processor core board and development board of Feiling
14_ Redis_ Optimistic lock
动态规划入门一,队列的bfs(70.121.279.200)
. Solution to the problem of Chinese garbled code when net core reads files
已知兩種遍曆序列構造二叉樹
【网络安全】网络资产收集
Semantic segmentation learning notes (1)
Leetcode skimming -- count the number of numbers with different numbers 357 medium
随机推荐
MySQL calculate n-day retention rate
15_ Redis_ Redis. Conf detailed explanation
Pytorch 保存tensor到.mat文件
Oracle primary key auto increment
02. After containerization, you must face golang
LeetCode刷题——递增的三元子序列#334#Medium
19_ Redis_ Manually configure the host after downtime
6091. Divide the array so that the maximum difference is K
【LeetCode】876-链表的中间结点
怎样从微信返回的json字符串中截取某个key的值?
Pytoch saves tensor to Mat file
College entrance examination admission score line crawler
[leetcode] 1905 statistics sub Island
【LeetCode】283-移动零
/bin/ld: 找不到 -lcrypto
6090. 极大极小游戏
(4) Flink's table API and SQL table schema
Yolo format data set processing (XML to txt)
[experience cloud] how to get the metadata of experience cloud in vscode
6090. Minimax games