Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED] Possible to install QT5?

Programming languages, Coding, Executables, Package Creation, and Scripting.
Post Reply
Message
Author
montagdude
Posts: 26
Joined: 2016-03-19 22:18

[SOLVED] Possible to install QT5?

#1 Post by montagdude »

Hi,

I'm trying to install QT5 on Jessie. I get the following error when running apt install qt5-default:

Code: Select all

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.
Could this be because I have QT4 installed and my desktop environment (KDE) depends on it? Note, I am not mixing stable with unstable/testing or any other outside repositories except Google chrome. I don't mind compiling QT5 from source and installing it locally if I have to, but it would be nice if it were possible to install it on my system with apt.

From what I gathered from searching online, it should be possible to install it using apt, but that may have been assuming a system that wasn't already dependent on QT4. I didn't find much from searching here on the forums. Thanks for your advice.
Last edited by montagdude on 2016-03-25 21:07, edited 1 time in total.

montagdude
Posts: 26
Joined: 2016-03-19 22:18

Re: Possible to install QT5?

#2 Post by montagdude »

Just some more info. Here's what happens when I simulate an attempt to install the unmet dependencies:

Code: Select all

sudo apt install -s 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: libgl1-mesa-dev but it is not going to be installed or
                        libgl-dev
               Depends: libglu1-mesa-dev but it is not going to be installed or
                        libglu-dev
E: Unable to correct problems, you have held broken packages.

Code: Select all

sudo apt install -s libgl1-mesa-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:
 libgl1-mesa-dev : Depends: mesa-common-dev (= 10.3.2-1+deb8u1) but it is not going to be installed
                   Depends: libgl1-mesa-glx (= 10.3.2-1+deb8u1) but 11.1.2-1~bpo8+1 is to be installed
                   Depends: libdrm-dev (>= 2.4.52) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Code: Select all

sudo apt install -s libdrm-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:
 libdrm-dev : Depends: libdrm2 (= 2.4.58-2) but 2.4.67-1~bpo8+1 is to be installed
              Depends: libdrm-intel1 (= 2.4.58-2) but 2.4.67-1~bpo8+1 is to be installed
              Depends: libdrm-radeon1 (= 2.4.58-2) but 2.4.67-1~bpo8+1 is to be installed
              Depends: libdrm-nouveau2 (= 2.4.58-2) but 2.4.67-1~bpo8+1 is to be installed
E: Unable to correct problems, you have held broken packages.
So it appears that QT5 depends on older versions of some of these packages, but other parts of my system need newer versions of them, which seems kind of strange to me. Is QT5 really incompatible with, for example, libdrm2 > 2.4.58-2?

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Possible to install QT5?

#3 Post by GarryRicketson »

https://packages.debian.org/jessie/qt5-default
It is available , you shouldn't be having any problems.
running apt install qt5-default:
You are not very clear on exactly how you are trying to install it.
"apt install anypackage" would not work anyway.

Code: Select all

apt-get install 

Code: Select all

man apt-get
If you have not updated your apt resources lately , that may be the problem.
Try running

Code: Select all

apt-get update 
first.
read the apt-get manual,..

Code: Select all

man apt-get
update
update is used to resynchronize the package index files from their
sources. The indexes of available packages are fetched from the
location(s) specified in /etc/apt/sources.list. For example, when
using a Debian archive, this command retrieves and scans the
Packages.gz files, so that information about new and updated
packages is available. An update should always be performed before
an upgrade or dist-upgrade. Please be aware that the overall
progress meter will be incorrect as the size of the package files
cannot be known in advance.
Then in the part on upgrading it says :
An update must be performed first
so that apt-get knows that new versions of packages are available.
I do not use apt-get that much, usually I use synaptic, there is a option to try to fix or repair broken packages, which is what you need to do before you can continue.
apt-get has the same options, looking at the manual myself now, it appears to have the same options.
-f, --fix-broken
Fix; attempt to correct a system with broken dependencies in
place. This option, when used with install/remove, can omit any
packages to permit APT to deduce a likely solution. If packages
are specified, these have to completely correct the problem. The
option is sometimes necessary when running APT for the first time;
APT itself does not allow broken package dependencies to exist on
a system. It is possible that a system's dependency structure can
be so corrupt as to require manual intervention (which usually
means using dselect(1) or dpkg --remove to eliminate some of the
offending packages). Use of this option together with -m may
produce an error in some situations. Configuration Item:
APT::Get::Fix-Broken.
Lots if details here :
https://www.debian.org/doc/manuals/debi ... 02.en.html

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Possible to install QT5?

#4 Post by stevepusser »

Yes, it's because you have those upgraded libraries from backports. You can work around that by specifying you want those jessie-backports versions of those problem libraries installed first.

However, qt5-default and all the -dev packages it requires are only necessary if you are to compile anything using Qt 5. Any package that uses the runtime Qt 5 libraries will just pull them automatically from Jessie when installed.

Life and installing -dev packages would be simpler if you really didn't need those upgraded jessie-backports mesa libraries. Trying using aptitude to downgrade back to the stock Jessie versions if you don't need them.
Garry wrote:
You are not very clear on exactly how you are trying to install it.
"apt install anypackage" would not work anyway.

Code: Select all
apt-get install
Just "apt" now works in Jessie.
MX Linux packager and developer

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Possible to install QT5?

#5 Post by GarryRicketson »

stevepusser »Just "apt" now works in Jessie.
Ok, thanks... I didn't know that. I am still using Wheezy and Squeeze :D

montagdude
Posts: 26
Joined: 2016-03-19 22:18

Re: Possible to install QT5?

#6 Post by montagdude »

GarryRicketson wrote:
stevepusser »Just "apt" now works in Jessie.
Ok, thanks... I didn't know that. I am still using Wheezy and Squeeze :D
Yes, from what I gather, apt is the newer version which seems to me to be nicer than apt-get. I did run update before trying to install qt5-default.

All, thanks for your help. After running this command:

Code: Select all

sudo apt install -s libdrm2=2.4.58-2  
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  apper apper-data hyphen-en-us kdeaccessibility kdesudo libdebconf-kde0
  libgee-0.8-2 liblistaller-glib0 libpackagekitqt4-0 libqapt-runtime libqapt1
  libreoffice-help-en-us listaller python3-dbus python3-pykde4
  python3-software-properties qapt-batch software-properties-common
  software-properties-kde unattended-upgrades x11-apps x11-session-utils xinit
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  i965-va-driver:i386 libdrm-amdgpu1 libdrm-amdgpu1:i386 libdrm-intel1:i386
  libdrm-nouveau2:i386 libdrm-radeon1:i386 libdrm2:i386 libgl1-mesa-dri
  libgl1-mesa-dri:i386 libgl1-mesa-glx:i386 libglu1-mesa:i386 libwine:i386
  task-desktop task-kde-desktop va-driver-all:i386 vdpau-va-driver:i386
  wine32:i386 xorg
The following packages will be DOWNGRADED:
  libdrm2
0 upgraded, 0 newly installed, 1 downgraded, 18 to remove and 0 not upgraded.
Remv va-driver-all:i386 [1.4.1-1]
Remv i965-va-driver:i386 [1.4.1-2]
Remv task-kde-desktop [3.31+deb8u1]
Remv task-desktop [3.31+deb8u1]
Remv xorg [1:7.7+7]
Remv libgl1-mesa-dri [11.1.2-1~bpo8+1]
Remv libdrm-amdgpu1 [2.4.67-1~bpo8+1]
Remv wine32:i386 [1.8-2~bpo8+1]
Remv libgl1-mesa-dri:i386 [11.1.2-1~bpo8+1]
Remv libdrm-amdgpu1:i386 [2.4.67-1~bpo8+1]
Remv libdrm-intel1:i386 [2.4.67-1~bpo8+1]
Remv libdrm-nouveau2:i386 [2.4.67-1~bpo8+1]
Remv libdrm-radeon1:i386 [2.4.67-1~bpo8+1]
Remv libwine:i386 [1.8-2~bpo8+1]
Remv vdpau-va-driver:i386 [0.7.4-3]
Remv libglu1-mesa:i386 [9.0.0-2]
Remv libgl1-mesa-glx:i386 [11.1.2-1~bpo8+1]
Remv libdrm2:i386 [2.4.67-1~bpo8+1]
Inst libdrm2 [2.4.67-1~bpo8+1] (2.4.58-2 Debian:8.3/stable [amd64])
Conf libdrm2 (2.4.58-2 Debian:8.3/stable [amd64])
I gathered that the issue was that some of the things I installed from backports (e.g., wine32) had brought in the newer libraries, and qt5-default hasn't been compiled against the backports libraries. Steve's post confirmed that for me. I will look into downgrading those packages, or I may just compile QT5 locally, which seems like the simplest option to me right now. (I want to use QT5 for development for an app, but for everything else I am happy to just leave my system as it is.)

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Possible to install QT5?

#7 Post by stevepusser »

qt5-default is just a metapackage that sets qt5 as the default Qt compile environment and pulls in the appropriate Qt 5 development package; it's not compiled, and can certainly be installed alongside those newer libraries from backports.

Simply install them first from jessie-backports, as listed in your error message:

Code: Select all

# apt install libdrm2-dev/jessie-backports
If this balks because it wants something else from backports, simply repeat by installing that first with the same type of command, and so on. I'm assuming you have the backports repo installed.

You may have set some of your KDE desktop as autoremovable, I'd fix that first.
MX Linux packager and developer

montagdude
Posts: 26
Joined: 2016-03-19 22:18

Re: Possible to install QT5?

#8 Post by montagdude »

stevepusser wrote:qt5-default is just a metapackage that sets qt5 as the default Qt compile environment and pulls in the appropriate Qt 5 development package; it's not compiled, and can certainly be installed alongside those newer libraries from backports.

Simply install them first from jessie-backports, as listed in your error message:

Code: Select all

# apt install libdrm2-dev/jessie-backports
If this balks because it wants something else from backports, simply repeat by installing that first with the same type of command, and so on. I'm assuming you have the backports repo installed.

You may have set some of your KDE desktop as autoremovable, I'd fix that first.
Steve,

That worked! I just had to install libdrm-dev and libgl1-mesa-dev from jessie-backports, and then I could install qt5-default. It didn't say that any part of KDE needed to be removed. Actually, the solution seems obvious to me now that you walked me through it. Thanks for bearing with me. I think this experience will help me in the future when working with backports. I'm marking this as solved now.

Post Reply