Qt5 on R28.2

How can I install Qt5 in R28.2?

nvidia@tegra-ubuntu:~$ sudo apt-get install qt5-default
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 qt5-default : Depends: qtbase5-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
nvidia@tegra-ubuntu:~$ sudo apt-get install qtbase5-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 qtbase5-dev : Depends: libqt5core5a (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.1 is to be installed
               Depends: libqt5dbus5 (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.1 is to be installed
               Depends: libqt5gui5 (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.1 is to be installed
               Depends: libqt5network5 (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.1 is to be installed
               Depends: libqt5printsupport5 (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.1 is to be installed
               Depends: libqt5sql5 (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.1 is to be installed
               Depends: libqt5test5 (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.1 is to be installed
               Depends: libqt5widgets5 (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.1 is to be installed
               Depends: libqt5xml5 (= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.1 is to be installed
               Recommends: libqt5opengl5-dev (= 5.5.1+dfsg-16ubuntu7) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

This worked for me on R28.2 full release, but I have done previous updates:

sudo apt-get install qtbase5-dev qtbase5-dev-tools

Perhaps my previous my previous upgrade/update commands changed it. You will find this file is broken by the first upgrade:

/usr/lib/xorg/modules/extensions/libglx.so

(verify after apt commands with “sha1sum -c /etc/nv_tegra_release”)

After it breaks just copy the version here to the xorg version:

/usr/lib/aarch64-linux-gnu/tegra/libglx.so

I also have all of the repositories enabled prior to the “sudo apt update”. My “/etc/apt/sources.list”:

...snip...

File “sources.list” re-listed in #5:
https://devtalk.nvidia.com/default/topic/1031227/jetson-tx2/qt5-on-r28-2/post/5246271/#5246271

As linuxdev noted, you are probably just missing the universe repository:

$ sudo apt-add-repository universe
$ sudo apt-get update

You may also try to activate xenial-updates:

sudo apt list -a qt5-default
Listing... Done
qt5-default/xenial-updates,now 5.5.1+dfsg-16ubuntu7.5 arm64 [installed]
qt5-default/xenial 5.5.1+dfsg-16ubuntu7 arm64

Oops! Someone saw a mistake I made…I actually uncommented some repositories multiple times. In case it helps someone, here’s what to look at…

There is a “deb” line to imply “.deb” binary files, a “deb-src” line to show source files. Then a URL. After this is the name of the release…the Ubuntu 16.04 is also known as “xenial”. Then a series of repositories are listed after this. There can be a single repository per line if desired, or if the URL is the same, multiple repositories after this. I had uncommented the lines with both single repos and multiple repos.

So having this one line:

deb http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted universe multiverse

…is equivalent to having these four lines:

deb http://ports.ubuntu.com/ubuntu-ports/ xenial main
deb http://ports.ubuntu.com/ubuntu-ports/ xenial restricted
deb http://ports.ubuntu.com/ubuntu-ports/ xenial universe
deb http://ports.ubuntu.com/ubuntu-ports/ xenial multiverse

I don’t know why, but sometimes after the initial edit this doesn’t show as being included multiple times. There are advantages to using the tools for adding/removing repositories.

Note that relevant to this release are:

xenial
xenial-updates
xenial-backports
xenial-security

Here’s the actual sources.list without the repeats (pointed out by @Honey_Patouceul):

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.

deb http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted universe multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted universe multiverse

## Major bug fix updates produced after the final release of the
## distribution.
deb http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted universe multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted universe multiverse

## Uncomment the following two lines to add software from the 'universe'
## repository.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
#deb http://ports.ubuntu.com/ubuntu-ports/ xenial universe
#deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial universe
#deb http://ports.ubuntu.com/ubuntu-ports/ xenial-updates universe
#deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-updates universe

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted universe multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted universe multiverse

deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse
#deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security universe
#deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security universe
#deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security multiverse
#deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security multiverse

Does anyone have an idea on how to get extended qt-creator samples with that method of installation from apt-get?
I was looking to start 3d bars example from qt , but did not have a chance to do that, because it is neither installed via apt-get nor it dependencies are installed.
[url]https://dw3i9sxi97owk.cloudfront.net/uploads/stream/2018/02/1274822/16194913/bars-example.png[/url]
I am just wondering if I need to compile the qt5 from sources to be able to access that example as it is said from the “Welcome” section of qt-creator.
Thanks.
Reference: Bars Example | Qt Data Visualization 5.10

@Andrey

Qt DataVisualization was commercial only, it has been included since Qt5.7, but current version on arm64 is Qt5.5. [url]https://wiki.qt.io/New_Features_in_Qt_5.7[/url]
You may find the package sources and build yourself.

Thank you for the explanation.

Hi,linuxdev,
I just met the same problem as Mohsen_UTD. You mentioned to modify the contents of ‘sources.list’. I open the file on my computer and found that it is different from yours. I have no idea about how the change it. Would you please give me more detailed instructions? Thanks in advance!
My sources.list is :
[b]# deb cdrom:[Ubuntu 16.04.3 LTS Xenial Xerus - Release amd64 (20170801)]/ xenial main restricted

See UpgradeNotes - Community Help Wiki for how to upgrade to

newer versions of the distribution.

deb Index of /ubuntu xenial main restricted
deb-src Index of /ubuntu xenial multiverse universe restricted main

Major bug fix updates produced after the final release of the

distribution.

N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu

team. Also, please note that software in universe WILL NOT receive any

review or updates from the Ubuntu security team.

deb Index of /ubuntu xenial universe

deb-src Index of /ubuntu xenial universe

deb-src Index of /ubuntu xenial-updates universe

N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu

team, and may not be under a free licence. Please satisfy yourself as to

your rights to use the software. Also, please note that software in

multiverse WILL NOT receive any review or updates from the Ubuntu

security team.

deb Index of /ubuntu xenial multiverse

deb-src Index of /ubuntu xenial multiverse

deb-src Index of /ubuntu xenial-updates multiverse

N.B. software from this repository may not have been tested as

extensively as that contained in the main release, although it includes

newer versions of some applications which may provide useful features.

Also, please note that software in backports WILL NOT receive any review

or updates from the Ubuntu security team.

Uncomment the following two lines to add software from Canonical’s

‘partner’ repository.

This software is not part of Ubuntu, but is offered by Canonical and the

respective vendors as a service to Ubuntu users.

deb Index of /ubuntu xenial partner

deb-src Index of /ubuntu xenial partner

deb Index of /ubuntu xenial-security main restricted
deb-src Index of /ubuntu xenial-security multiverse universe restricted main
deb Index of /ubuntu xenial-security universe

deb-src Index of /ubuntu xenial-security universe

deb Index of /ubuntu xenial-security multiverse

deb-src Index of /ubuntu xenial-security multiverse

deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable mai[/b]