LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 05-10-2020, 07:05 AM   #1
Thomas#555
LQ Newbie
 
Registered: May 2020
Location: Rural Essex, UK
Distribution: Debian 10 Buster
Posts: 12

Rep: Reputation: Disabled
Unhappy you have held broken packages


I am no expert, but know enough to use Debian 10 Buster as my daily driver for not-work using bspwm and polybar. I can just about use nvim. I can't diagnose and solve real issues though.

The network crapping out defeated my last week. I reinstalled before realising it was the LAN port borking (it worked fine under W10 under my dual boot).

I have had a happy (genuinely!) week getting everything 'just-so' again having backed up my home directory. But I now have a problem that will make me reinstall in the natural way of things, but I want to learn more so here we are.

I am getting weird apt issues. eg.

Code:
me@debian:~$ sudo apt 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.
me@debian:~$ sudo apt 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: 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.
I initially had the same issue with qt4 - but managed to solve it by finding the one base package the other depend on. This then broke qt5. I need qt5 to compile something I was using before this problem.

What may have caused it:
I did edit my sources.list to add contrib non-free
I did accidentally add a sid source to my sources.list
I have removed both changes.

What I have tried... Lots. I manually went through this script too:
Code:
#!/bin/bash
sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup
sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status
sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
sudo rm -rf /var/lib/dpkg/updates/*
sudo rm -rf /var/lib/apt/lists
sudo mkdir /var/lib/apt/lists
sudo mkdir /var/lib/apt/lists/partial
sudo apt-get clean
sudo apt-get update
sudo dpkg --clear-avail
sudo dpkg --configure -a
sudo apt-get install -f
sudo apt-get update
sudo apt-get dist-upgrade
I have tried adding the missing dependencies to my install, but eventually run up against this, which is beyond me.
Code:
me@debian:~$ sudo apt install qt5-default qtbase5-dev libgl1-mesa-dev libglvnd-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: libx11-xcb-dev but it is not going to be installed
 libglvnd-dev : Depends: libglvnd0 (= 1.1.0-1) but 1.3.1-1 is to be installed
                Depends: libegl1 (= 1.1.0-1) but 1.3.1-1 is to be installed
                Depends: libgles1 (= 1.1.0-1) but it is not going to be installed
                Depends: libgles2 (= 1.1.0-1) but 1.3.1-1 is to be installed
                Depends: libgl1 (= 1.1.0-1) but 1.3.1-1 is to be installed
                Depends: libglx0 (= 1.1.0-1) but 1.3.1-1 is to be installed
                Depends: libopengl0 (= 1.1.0-1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
I am at a loss and will reinstall eventually, is there any guru out there who can save me?
 
Old 05-10-2020, 07:15 AM   #2
shruggy
Member
 
Registered: Mar 2020
Posts: 918

Rep: Reputation: Disabled
Quote:
Originally Posted by Thomas#555 View Post
What I have tried... Lots.
Seems you haven't tried dpkg -C yet. Won't fix anything by itself, but may give you useful hints.
 
1 members found this post helpful.
Old 05-10-2020, 07:23 AM   #3
Thomas#555
LQ Newbie
 
Registered: May 2020
Location: Rural Essex, UK
Distribution: Debian 10 Buster
Posts: 12

Original Poster
Rep: Reputation: Disabled
Code:
sudo dpkg -C
Did nothing. Just went to the next line.

The same problem persists.
 
Old 05-10-2020, 07:40 AM   #4
shruggy
Member
 
Registered: Mar 2020
Posts: 918

Rep: Reputation: Disabled
Quote:
Originally Posted by Thomas#555 View Post
libglvnd-dev : Depends: libglvnd0 (= 1.1.0-1) but 1.3.1-1 is to be installed
Are you sure you disabled all sid repositories? 1.1.0 is the version in Buster, 1.3.1 in Bullseye/sid.
 
1 members found this post helpful.
Old 05-10-2020, 07:49 AM   #5
Thomas#555
LQ Newbie
 
Registered: May 2020
Location: Rural Essex, UK
Distribution: Debian 10 Buster
Posts: 12

Original Poster
Rep: Reputation: Disabled
This is my current /etc/apt/sources.list

Code:
deb http://deb.debian.org/debian/ buster main                                   
deb-src http://deb.debian.org/debian/ buster main                               
                                                                                
deb http://security.debian.org/debian-security buster/updates main              
deb-src http://security.debian.org/debian-security buster/updates main          
                                                                                 
# buster-updates, previously known as 'volatile'                                
deb http://deb.debian.org/debian/ buster-updates main                           
deb-src http://deb.debian.org/debian/ buster-updates main
in /etc/apt/sources.list.d there is one file which is the microsoft source for Teams (I know - don't ask). I had forgotten to look in that directory. Not sure where else to look though for stray entries. I commented out the Teams entry, did an apt update but the same problem persists.

So we have a smoking gun... Where else can I look for sources?
 
Old 05-10-2020, 07:53 AM   #6
shruggy
Member
 
Registered: Mar 2020
Posts: 918

Rep: Reputation: Disabled
If sid is not in sources.list then the packages in question are already downloaded from sid and sit in /var/cache/apt/archives waiting to be installed.

Last edited by shruggy; 05-10-2020 at 07:54 AM.
 
1 members found this post helpful.
Old 05-10-2020, 07:56 AM   #7
Thomas#555
LQ Newbie
 
Registered: May 2020
Location: Rural Essex, UK
Distribution: Debian 10 Buster
Posts: 12

Original Poster
Rep: Reputation: Disabled
Unhappy

Code:
~$sudo ls /var/cache/apt/archives
lock  partial
~$ sudo ls /var/cache/apt/archives/partial/
~$
 
Old 05-10-2020, 08:01 AM   #8
shruggy
Member
 
Registered: Mar 2020
Posts: 918

Rep: Reputation: Disabled
Two questions.

1. Have you by chance installed something like apt-cacher-ng?
2. Can you install aptitude?
 
1 members found this post helpful.
Old 05-10-2020, 08:04 AM   #9
Thomas#555
LQ Newbie
 
Registered: May 2020
Location: Rural Essex, UK
Distribution: Debian 10 Buster
Posts: 12

Original Poster
Rep: Reputation: Disabled
Code:
apt search apt-cacher-ng
Sorting... Done
Full Text Search... Done
apt-cacher-ng/stable 3.2.1-1 amd64
  caching proxy server for software repositories

auto-apt-proxy/stable 11 all
  automatic detector of common APT proxy settings
So I don't think it is installed.

Yes, I can (and just did) install aptitude.
 
Old 05-10-2020, 08:06 AM   #10
Thomas#555
LQ Newbie
 
Registered: May 2020
Location: Rural Essex, UK
Distribution: Debian 10 Buster
Posts: 12

Original Poster
Rep: Reputation: Disabled
Code:
sudo aptitude install qt5-default
The following NEW packages will be installed:
  libdouble-conversion1{a} libdrm-dev{a} libgl1-mesa-dev{a} libgles1{ab} libglu1-mesa{a} libglu1-mesa-dev{a} libglvnd-core-dev{a} libglvnd-dev{ab} libopengl0{ab} libpcre2-16-0{a} libqt5concurrent5{a} 
  libqt5core5a{a} libqt5dbus5{a} libqt5gui5{a} libqt5network5{a} libqt5opengl5{a} libqt5opengl5-dev{a} libqt5printsupport5{a} libqt5sql5{a} libqt5sql5-sqlite{a} libqt5svg5{a} libqt5test5{a} 
  libqt5widgets5{a} libqt5xml5{a} libvulkan-dev{a} libvulkan1{a} libx11-xcb-dev{ab} libxcb-dri2-0-dev{a} libxcb-dri3-dev{a} libxcb-glx0-dev{a} libxcb-present-dev{a} libxcb-render-util0{a} 
  libxcb-sync-dev{a} libxdamage-dev{a} libxfixes-dev{a} libxshmfence-dev{a} libxxf86vm-dev{a} mesa-common-dev{a} qt5-default qt5-gtk-platformtheme{a} qt5-qmake{a} qt5-qmake-bin{a} qtbase5-dev{a} 
  qtbase5-dev-tools{a} qttranslations5-l10n{a} x11proto-damage-dev{a} x11proto-fixes-dev{a} x11proto-xf86vidmode-dev{a} 
0 packages upgraded, 48 newly installed, 0 to remove and 0 not upgraded.
Need to get 16.6 MB of archives. After unpacking 82.0 MB will be used.
The following packages have unmet dependencies:
 libx11-xcb-dev : Depends: libx11-xcb1 (= 2:1.6.7-1) but 2:1.6.9-2 is installed
 libopengl0 : Depends: libglvnd0 (= 1.1.0-1) but 1.3.1-1 is installed
 libgles1 : Depends: libglvnd0 (= 1.1.0-1) but 1.3.1-1 is installed
 libglvnd-dev : Depends: libglvnd0 (= 1.1.0-1) but 1.3.1-1 is installed
                Depends: libegl1 (= 1.1.0-1) but 1.3.1-1 is installed
                Depends: libgles2 (= 1.1.0-1) but 1.3.1-1 is installed
                Depends: libgl1 (= 1.1.0-1) but 1.3.1-1 is installed
                Depends: libglx0 (= 1.1.0-1) but 1.3.1-1 is installed
The following actions will resolve these dependencies:

     Keep the following packages at their current version:
1)     libgl1-mesa-dev [Not Installed]                    
2)     libgles1 [Not Installed]                           
3)     libglu1-mesa-dev [Not Installed]                   
4)     libglvnd-dev [Not Installed]                       
5)     libopengl0 [Not Installed]                         
6)     libqt5opengl5-dev [Not Installed]                  
7)     libx11-xcb-dev [Not Installed]                     
8)     qt5-default [Not Installed]                        
9)     qtbase5-dev [Not Installed]                        



Accept this solution? [Y/n/q/?]
Interesting! What to press... Going for n for now.

How do I downgrade stuff? I am guessing I did an apt upgrade whilst the rogue sid was in place.
 
Old 05-10-2020, 08:06 AM   #11
shruggy
Member
 
Registered: Mar 2020
Posts: 918

Rep: Reputation: Disabled
Code:
sudo apt install libx11-xcb1=2:1.6.7-1

Last edited by shruggy; 05-10-2020 at 08:16 AM.
 
1 members found this post helpful.
Old 05-10-2020, 08:08 AM   #12
Thomas#555
LQ Newbie
 
Registered: May 2020
Location: Rural Essex, UK
Distribution: Debian 10 Buster
Posts: 12

Original Poster
Rep: Reputation: Disabled
I think the issue was my installing kitty terminal - I think that is why I put the rogue entry in. I clicked n and was offered thusly:

Code:
Accept this solution? [Y/n/q/?] n
The following actions will resolve these dependencies:

     Remove the following packages:                              
1)     kitty [0.17.3-1 (now)]                                    

     Downgrade the following packages:                           
2)     gstreamer1.0-gl [1.16.2-4 (now) -> 1.14.4-2 (stable)]     
3)     libegl1 [1.3.1-1 (now) -> 1.1.0-1 (stable)]               
4)     libgl1 [1.3.1-1 (now) -> 1.1.0-1 (stable)]                
5)     libgles2 [1.3.1-1 (now) -> 1.1.0-1 (stable)]              
6)     libglvnd0 [1.3.1-1 (now) -> 1.1.0-1 (stable)]             
7)     libglx0 [1.3.1-1 (now) -> 1.1.0-1 (stable)]               
8)     libgstreamer-gl1.0-0 [1.16.2-4 (now) -> 1.14.4-2 (stable)]
9)     libx11-xcb1 [2:1.6.9-2 (now) -> 2:1.6.7-1 (stable)]       



Accept this solution? [Y/n/q/?]
Going for Y (but not in kitty terminal)

Last edited by Thomas#555; 05-10-2020 at 08:10 AM.
 
Old 05-10-2020, 08:09 AM   #13
shruggy
Member
 
Registered: Mar 2020
Posts: 918

Rep: Reputation: Disabled
Yes, that should work.
 
1 members found this post helpful.
Old 05-10-2020, 08:11 AM   #14
Thomas#555
LQ Newbie
 
Registered: May 2020
Location: Rural Essex, UK
Distribution: Debian 10 Buster
Posts: 12

Original Poster
Rep: Reputation: Disabled
So I now need to work out how to do a batch downgrade. @shruggy - thank you so much.
 
Old 05-10-2020, 08:15 AM   #15
Thomas#555
LQ Newbie
 
Registered: May 2020
Location: Rural Essex, UK
Distribution: Debian 10 Buster
Posts: 12

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by shruggy View Post
Code:
apt install libx11-xcb1=2:1.6.7-1
I am guessing there is a way to list all the packages that are versions beyond what is buster and then to downgrade them.

An easier way is to use aptitude to fix it each time... Think I will go for the latter.

Cheers!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Unable to correct problems, you have held broken packages steez2002 Linux - Desktop 13 07-15-2016 12:31 PM
Ubuntu Server 12.04: E: Unable to correct problems, you have held broken packages Suburban Errorist Ubuntu 1 09-21-2014 05:20 PM
E: Unable to correct problems, you have held broken packages fargris Debian 9 01-05-2014 10:03 AM
[SOLVED] VLC - Unable to correct problems, you have held broken packages. marcelp1 Linux - Newbie 2 10-04-2013 03:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 08:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration