如何找到丢失的图书馆的位置

用户名

我已经为C ++安装了mysql连接器。我正在编写一个c ++ cgi应用程序。cgi页已在编译。我昨天重新启动,它停止了编译。g++ -o sales.cgi sales.cpp -lcgicc -lmysqlcppcon给出以下错误。/usr/bin/ld cannot find -lmysqlcppconapt-get告诉我我具有libmysqlcppconn7v5的最新版本,而我具有libmyqlcppconn-dev的最新版本。我如何找到图书馆。我检查了一下,/usr/lib/但不知道该找什么。

保罗4

由于您使用apt-get进行安装,因此可以使用dpkg来确定安装了哪些文件。

示例(您将用“ mysqlcppcon”代替):

dpkg -l|grep -i mysql
ii  php-mysql                        1:7.2+60ubuntu1                            all          MySQL module for PHP [default]
...  <= Search for the exact package name (here, "php-mysql")

   dpkg -L php-mysql
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/php-mysql
/usr/share/doc/php-mysql/copyright
/usr/share/doc/php-mysql/changelog.gz
  <= List files installed to your system from that package

您也可以使用查找

例:

find / -name "*mysqlcppcon*" -print 2> /dev/null

*xxx*语法让你做一个通配符搜索; 2> /dev/null从通配符搜索中过滤掉无关的“噪声”,例如“查找:'/ run / lvm':权限被拒绝”。

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章