Follow Excellent, Success will Chase you

0%

ubuntu查询相关库的情况

查询一个库的位置

环境: Ubuntu 18.04.1 LTS

  • 测试库名: libmpfr

库的相关描述

1
$dpkg -l "*库信息*"

示例:

1
2
3
4
5
6
7
$dpkg -l "*libmpfr*"
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-========================================-=========================-=========================-======================================================================================
ii libmpfr6:amd64 4.0.1-1 amd64 multiple precision floating-point computation

库的位置

查询libmpfr的路径

直接查找

1
$ldconfig -p | grep "库信息"

示例:

1
2
$ldconfig -p | grep "libmpfr"
libmpfr.so.6 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libmpfr.so.6

间接查找

1
dpkg -L "库名称"

示例:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
$dpkg -L "libmpfr6:amd64"
/.
/usr
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/libmpfr.so.6.0.1
/usr/share
/usr/share/doc
/usr/share/doc/libmpfr6
/usr/share/doc/libmpfr6/AUTHORS
/usr/share/doc/libmpfr6/BUGS
/usr/share/doc/libmpfr6/NEWS.gz
/usr/share/doc/libmpfr6/README
/usr/share/doc/libmpfr6/TODO.gz
/usr/share/doc/libmpfr6/changelog.Debian.gz
/usr/share/doc/libmpfr6/copyright
/usr/lib/x86_64-linux-gnu/libmpfr.so.6

-------------本文结束感谢您的阅读-------------
  • 本文作者: Winddoing
  • 本文链接: https://winddoing.github.io/post/31784.html
  • 作者声明: 本博文为个人笔记, 由于个人能力有限,难免出现错误,欢迎大家批评指正。
  • 版权声明: 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!