Qt 找不到库



我想开始学习QT。我正在使用 Ubuntu,所以我从软件中心安装了 QT,我创建了一个 HTML5 项目,我试图让它运行,但我收到了很多错误,所以我做了以下事情来解决其中一些问题:

sudo apt-get install qtquick1-5-dev qtlocation5-dev qtsensors5-dev qtdeclarative5-dev
sudo apt-get install libxslt1-dev

但现在仍然得到这个:

:-1: error: cannot find -lgio-2.0
:-1: error: cannot find -lgstapp-0.10
:-1: error: cannot find -lgstinterfaces-0.10
:-1: error: cannot find -lgstpbutils-0.10
:-1: error: cannot find -lgstvideo-0.10
:-1: error: cannot find -lgstbase-0.10
:-1: error: cannot find -lgstreamer-0.10
:-1: error: cannot find -lgobject-2.0
:-1: error: cannot find -lgmodule-2.0
:-1: error: cannot find -lgthread-2.0
:-1: error: cannot find -lglib-2.0
:-1: error: cannot find -lsqlite3 

那么我该怎么办,以及如何安装所有缺少的库?

sudo apt-get install qtbase5-dev

试试这个。

我在Debian/jessie上遇到了完全相同的问题。例如缺少的gmodule,我尝试:

$locate libgmodule
/usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0
/usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0.3600.4

编译命令行必须包含"-L/usr/lib/x86_64-linux-gnu"。解决方案是创建一个符号链接:

$cd /usr/lib/x86_64-linux-gnu
$sudo ln -s libgmodule-2.0.so.0 libgmodule-2.0.so

对所有缺少的库执行相同的操作。希望对您有所帮助

转到 Ubuntu 的软件中心,逐个安装所有软件包。这些都是安装Qt的依赖项。就像搜索 sqlite3 并安装一样。像这样为所有人做。利格利布等

最新更新