14.04中Qt5的开发包是什么?


70

我想在台式机上构建一个Qt5示例。我安装了qt5-defaultqtdeclarative5-dev,但是仍然出现此错误:

Project ERROR: Unknown module(s) in QT: quick qml

应该安装哪个软件包进行编译?在Qt4时代,libqt4-dev

Answers:



72

所有Qt5开发包的列表,可在Ubuntu上获得

Qt模块dev软件包lib软件包
-------------------------------------------------- -----------------------
蓝牙qtconnectivity5-dev libqt5bluetooth5
并发qtbase5-dev libqt5concurrent5
连接qtmobility-dev libqtconnectivity1
联系人qtmobility-dev libqt5contacts5
核心qtbase5-dev libqt5core5a
dbus qtbase5-dev libqt5dbus5
设计师qttools5-dev libqt5designer5
designercomponents qttools5-dev libqt5designercomponents5
反馈qtmobility-dev libqt5feedback5
qtmobility-dev libqtgallery1画廊
gui qtbase5-dev libqt5gui5
帮助qttools5-dev libqt5help5
位置qtmobility-dev libqt5location5
多媒体qtmultimedia5-dev libqt5multimedia5
多媒体套件qtmobility-dev libqtmultimediakit1
网络qtbase5-dev libqt5network5
nfc qtconnectivity5-dev libqt5nfc5
opengl libqt5opengl5-dev libqt5opengl5
组织者qtmobility-dev libqt5organizer5
定位qtpositioning5-dev libqt5positioning5
printsupport qtbase5-dev libqt5printsupport5
发布订阅qtmobility-dev libqt5publishsubscribe5
qml qtdeclarative5-dev libqt5qml5
快速qtdeclarative5-dev libqt5quick5
quickparticles qtdeclarative5-dev libqt5quickparticles5
quicktest qtdeclarative5-dev libqt5quicktest5
quickwidgets qtdeclarative5-dev libqt5quickwidgets5
脚本qtscript5-dev libqt5script5
scripttools qtscript5-dev libqt5scripttools5
传感器qtmobility-dev,libqt5sensors5-dev libqt5sensors5
串口libqt5serialport5-dev libqt5serialport5
serviceframework qtmobility-dev libqt5serviceframework5
sql qtbase5-dev libqt5sql5
svg libqt5svg5-dev libqt5svg5
systeminfo qtmobility-dev libqt5systeminfo5
测试qtbase5-dev libqt5test5
uitools qttools5-dev吗?
versit qtmobility-dev libqtversit1
网络频道??
webkit libqt5webkit5-dev libqt5webkit5
websockets libqt5websockets5-dev libqt5websockets5
部件qtbase5-dev libqt5widgets5
x11extras libqt5x11extras5-dev libqt5x11extras5
xml qtbase5-dev libqt5xml5
xmlpatterns libqt5xmlpatterns5-dev libqt5xmlpatterns5


1
这对于弄清楚cmake构建提供类似内容时要安装的内容很有帮助/usr/bin/ld: cannot find -lQt5::Help。这种故障模式对于cmake来说似乎很典型。
彼得·科德斯

这非常有用!
Atifm

1
有没有一种简单的方法可以一次安装所有这些* -dev软件包?
匿名

您可以尝试apt-get install qt5*-dev
Hyndrix

一个忠告。尝试避免在任何智能命令中使用*!我的朋友不得不重新启动计算机,因为apt remove wine*删除了其中包含子字符串的所有软件包win。对此要格外小心。
严厉的Poddar

40

标题的答案是:

sudo apt-get install qtbase5-dev

对于您的特定问题,上面的答案是正确的。


1
sudo apt-get install qtdeclarative5-dev qml-module-qtquick-controls

通过以下方式验证安装:

qtchooser -print-env

输出可能类似于以下内容(基于适用于您的Ubuntu版本的软件包):

QT_SELECT="default"
QTTOOLDIR="/usr/lib/x86_64-linux-gnu/qt5/bin"
QTLIBDIR="/usr/lib/x86_64-linux-gnu"

参考这里

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.