Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
how to install serial bus in ubuntu18.04
I want to use modbus module, serialbus add in pro file then occured a problem, Project ERROR: Unknown module(s) in QT: serialbus. I don't find command line to install serialbus. Only find in ubuntu19 can install this module by sudo apt-get install libqt5serialbus5-dev.Anyone can help me...
This post is deleted!
@goldLovemoon Which Qt version do you use and how did you install it? On which platform?
@jsulm I used Qt5.9.5 and install in ubuntu 18.04
@goldLovemoon Did you try to install the Qt serialport(-dev) module? Maybe serialbus is part of it in Ubuntu 18?
@jsulm yeah,serialport can be used, but when I use serialbus occured an error
@goldLovemoon What I mean is: did you install the serialport Qt package on Ubuntu and then tried to use serialbus? Also it can be that Ubuntu 18 does not provide Qt serialbus, but that I don't know, I just can see that there is no deb package for that. If you don't have to use Ubuntu Qt packages then you can use Qt online installer and download recent Qt version.
@jsulm I know, but I can't use the command line 'apt-get install libqt5serialbus5-dev' to get package.
@goldLovemoon You misunderstand me: install the serialport package and then try to use serialbus.
@goldLovemoon If Ubuntu does not provide an official package, then you cannot use it.
Either find an apt repo doing so, or install Qt with the online installer as @jsulm already said.
@jsulm I have install the serialport package, but can't work
@goldLovemoon https://ubuntu.pkgs.org/19.04/ubuntu-universe-amd64/libqt5serialbus5-dev_5.12.2-1_amd64.deb.html I find the package in ubuntu19
@goldLovemoon Yes Ubuntu 19 provides it, but not Ubuntu 18.
@jsulm But now I want use this module in Qt, how can I install it
how can I install it
I already suggested to install a newer Qt version using online installer. Since Ubuntu 18 does not provide this package this would be the easiest solution...
Loophole Fred last edited by Loophole Fred
In case someone else get stuck with old requirements.... yay...
- Required: Git, qmake, make
- You may wanna skip the 'overkill' step
Overkill: get all qt-stuff
sudo apt install qml-module-qt-labs-folderlistmodel qml-module-qtquick-extras qml-module-qtquick-controls2 qt5-default libqt5quickcontrols2-5 qtquickcontrols2-5-dev qtcreator qtcreator-doc libqt5serialport5-dev build-essential qml-module-qt3d qt3d5-dev qtdeclarative5-dev qtconnectivity5-dev qtmultimedia5-dev
To get rid of the private/qobject_p.h error
sudo apt-get install qtbase5-private-dev
Set build env
git clone git://code.qt.io/qt/qtserialbus.git
git checkout tags/QT_VERSION version [-b LOCAL_BRANCH]
- QT_VERSION: version shall be written in a v.X.X.X format (v.5.9.5 for Ubunu 18.04)
- LOCAL_BRANCH:: optional, but still a good practice..
Build and install
- where X is the number of cores use to build. If single core, don't use the -j
sudo make install