Page 1 of 2

I can't use apt-get cause I've have held broken package

Posted: Mon Aug 15, 2016 12:14 pm
by Malman35
I recently tried to install GTK3 usibg apt-get and I got an error message saying I've held broken proken packages. Here is the commands I ran

Code: Select all

pi@malman ~ $ sudo apt-get update
Hit http://archive.raspberrypi.org jessie InRelease
Hit http://archive.raspberrypi.org jessie/main Sources
Hit http://archive.raspberrypi.org jessie/ui Sources
Hit http://archive.raspberrypi.org jessie/main armhf Packages
Hit http://archive.raspberrypi.org jessie/ui armhf Packages
Ign http://archive.raspberrypi.org jessie/main Translation-en_GB
Ign http://archive.raspberrypi.org jessie/main Translation-en
Ign http://archive.raspberrypi.org jessie/ui Translation-en_GB
Ign http://archive.raspberrypi.org jessie/ui Translation-en
Reading package lists... Done
pi@malman ~ $ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
pi@malman ~ $ sudo apt-get install libgtk-3-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:
 libgtk-3-dev : Depends: libgdk-pixbuf2.0-dev (>= 2.27.1) but it is not installable
                Depends: libpango1.0-dev (>= 1.36.7) but it is not going to be installed
                Depends: libatk1.0-dev (>= 2.7.5) but it is not installable
                Depends: libatk-bridge2.0-dev but it is not installable
                Depends: libcairo2-dev (>= 1.10.0) but it is not going to be installed
                Depends: libxinerama-dev but it is not installable
                Depends: libxi-dev but it is not installable
                Depends: libxrandr-dev but it is not installable
                Depends: libxcursor-dev but it is not installable
                Depends: libxcomposite-dev but it is not installable
                Depends: libwayland-dev (>= 1.4.0) but it is not installable
E: Unable to correct problems, you have held broken packages.
pi@malman ~ $
Ive tried running aptitude but that didn't work.

Code: Select all

pi@malman ~ $ sudo aptitude -f install libgtk-3-dev
The following NEW packages will be installed:            libcairo-script-interpreter2{a}
  libcairo2-dev{ab} libgtk-3-dev{b}                      libpango1.0-dev{ab} libpixman-1-dev{a}
0 packages upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 2,620 kB of archives. After unpacking 15.7 MB will be used.
The following packages have unmet dependencies:         libpango1.0-dev : Depends: libfontconfig1-dev (>= 2.10.91) which is a virtual package.                                          Depends: libharfbuzz-dev (>= 0.9.9) which is a virtual package.                                               Depends: libxft-dev which is a virtual package.                                                               Depends: libxrender-dev which is a virtual package.                                         libcairo2-dev : Depends: libcairo2 (= 1.14.0-2.1rpi1rpi1g) but 1.14.0-2.1+deb8u1 is installed.
                 Depends: libcairo-gobject2 (= 1.14.0-2.1rpi1rpi1g) but 1.14.0-2.1+deb8u1 is installed.
                 Depends: libfontconfig1-dev (>= 2.2.95) which is a virtual package.
                 Depends: libxrender-dev (>= 0.6) which is a virtual package.
                 Depends: libxcb-shm0-dev which is a virtual package.
 libgtk-3-dev : Depends: libgdk-pixbuf2.0-dev (>= 2.27.1) which is a virtual package.
                Depends: libatk1.0-dev (>= 2.7.5) which is a virtual package.
                Depends: libatk-bridge2.0-dev which is a virtual package.
                Depends: libxinerama-dev which is a virtual package.
                Depends: libxi-dev which is a virtual package.
                Depends: libxrandr-dev which is a virtual package.
                Depends: libxcursor-dev which is a virtual package.
                Depends: libxcomposite-dev which is a virtual package.
                Depends: libwayland-dev (>= 1.4.0) which is a virtual package.
The following actions will resolve these dependencies:

     Keep the following packages at their current versi1)     libcairo2-dev [Not Installed]                   2)     libgtk-3-dev [Not Installed]                    3)     libpango1.0-dev [Not Installed]                 


Accept this solution? [Y/n/q/?] y
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.

pi@malman ~ $
I've tried several other things that I read about online but nothing seems to be working. How can I fix this?

Re: I can't use apt-get cause I've have held broken package

Posted: Sat Aug 20, 2016 2:25 am
by Malman35
Could I have some help here. I know that i could just do a fresh install but i would like to try and fix it if possible. Any suggestions would be appreciated.

Re: I can't use apt-get cause I've have held broken package

Posted: Sat Aug 20, 2016 7:36 am
by Bellisarius
Next command I would run is

sudo apt-get check

Re: I can't use apt-get cause I've have held broken package

Posted: Sat Aug 20, 2016 7:39 am
by Bellisarius
BTW, if you do get it working, make a snapshot of your SD card ;-)

Re: I can't use apt-get cause I've have held broken package

Posted: Sat Aug 20, 2016 9:52 am
by Malman35
Bellisarius wrote:Next command I would run is

sudo apt-get check
I didn't work. :cry:

Code: Select all

pi@malman ~ $ sudo apt-get update
Hit http://archive.raspberrypi.org jessie InRelease       
Hit http://archive.raspberrypi.org jessie/main Sources    
Hit http://archive.raspberrypi.org jessie/ui Sources
Hit http://archive.raspberrypi.org jessie/main armhf Packages
Hit http://archive.raspberrypi.org jessie/ui armhf Packages
Ign http://archive.raspberrypi.org jessie/main Translation-en_GB               
Ign http://archive.raspberrypi.org jessie/main Translation-en                  
Ign http://archive.raspberrypi.org jessie/ui Translation-en_GB                 
Ign http://archive.raspberrypi.org jessie/ui Translation-en                    
Reading package lists... Done                                                  
pi@malman ~ $ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
pi@malman ~ $ sudo apt-get check
Reading package lists... Done
Building dependency tree       
Reading state information... Done
pi@malman ~ $ sudo apt-get install libgtk-3-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:
 libgtk-3-dev : Depends: libgdk-pixbuf2.0-dev (>= 2.27.1) but it is not installable
                Depends: libpango1.0-dev (>= 1.36.7) but it is not going to be installed
                Depends: libatk1.0-dev (>= 2.7.5) but it is not installable
                Depends: libatk-bridge2.0-dev but it is not installable
                Depends: libcairo2-dev (>= 1.10.0) but it is not going to be installed
                Depends: libxinerama-dev but it is not installable
                Depends: libxi-dev but it is not installable
                Depends: libxrandr-dev but it is not installable
                Depends: libxcursor-dev but it is not installable
                Depends: libxcomposite-dev but it is not installable
                Depends: libwayland-dev (>= 1.4.0) but it is not installable
E: Unable to correct problems, you have held broken packages.
pi@malman ~ $ 
Still getting the same problem. I also tried clean and autoclean but they didn't shed any light on the problem nor did they fix the problem.

Re: I can't use apt-get cause I've have held broken package

Posted: Sat Aug 20, 2016 9:58 am
by ShiftPlusOne
Well, this helped spot a problem on our end, thanks.

Out of curiosity, what does 'apt-cache policy' say?

Re: I can't use apt-get cause I've have held broken package

Posted: Sat Aug 20, 2016 10:20 am
by Malman35
ShiftPlusOne wrote:Well, this helped spot a problem on our end, thanks.

Out of curiosity, what does 'apt-cache policy' say?

Code: Select all

pi@malman ~ $ apt-cache policy 
Package files:
 100 /var/lib/dpkg/status
     release a=now
 500 http://archive.raspberrypi.org/debian/ jessie/ui armhf Packages
     release o=Raspberry Pi Foundation,a=stable,n=jessie,l=Raspberry Pi Foundation,c=ui
     origin archive.raspberrypi.org
 500 http://archive.raspberrypi.org/debian/ jessie/main armhf Packages
     release o=Raspberry Pi Foundation,a=stable,n=jessie,l=Raspberry Pi Foundation,c=main
     origin archive.raspberrypi.org
Pinned packages:
pi@malman ~ $ 

Re: I can't use apt-get cause I've have held broken package

Posted: Sat Aug 20, 2016 10:29 am
by ShiftPlusOne
You seem to be missing the raspbian.org repo.

Code: Select all

pi@raspberrypi:~/dev $ cat /etc/apt/sources.list
deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi

Re: I can't use apt-get cause I've have held broken package

Posted: Sat Aug 20, 2016 10:50 am
by Malman35
ShiftPlusOne wrote:You seem to be missing the raspbian.org repo.

Code: Select all

pi@raspberrypi:~/dev $ cat /etc/apt/sources.list
deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi
Woah. Uh that file doesn't exist. Either that or I made a stupid mistake.

Code: Select all

pi@malman ~ $ cat /etc/apt/sources.list
cat: /etc/apt/sources.list: No such file or directory
Here is the contents of /etc/apt/

Code: Select all

pi@malman /dev $ cd /etc/apt/
pi@malman /etc/apt $ ls
apt.conf.d     sources.list.d  trusted.gpg~
preferences.d  trusted.gpg     trusted.gpg.d
and cause the name is similar I though I should let you know what was in sources.list.d

Code: Select all

pi@malman /etc/apt $ cd sources.list.d/
pi@malman /etc/apt/sources.list.d $ ls
raspi.list

Re: I can't use apt-get cause I've have held broken package

Posted: Sat Aug 20, 2016 11:12 am
by ShiftPlusOne
add the file and run apt-get update again

Re: I can't use apt-get cause I've have held broken package

Posted: Sat Aug 20, 2016 12:17 pm
by Malman35
ShiftPlusOne wrote:add the file and run apt-get update again
Ugghhh! Why is it still not working. :cry:
I ran

Code: Select all

sudo nano /etc/apt/sources.list
then did did CTRL O to writeout then exited nano. I did ls and it showed up.

Code: Select all

pi@malman /etc/apt $ ls
apt.conf.d     sources.list    trusted.gpg   trusted.gpg.d
preferences.d  sources.list.d  trusted.gpg~
I then ran apt-get update and upgrade

Code: Select all

pi@malman /etc/apt $ sudo apt-get update
Hit http://archive.raspberrypi.org jessie InRelease
Hit http://archive.raspberrypi.org jessie/main Sources
Hit http://archive.raspberrypi.org jessie/ui Sources
Hit http://archive.raspberrypi.org jessie/main armhf Packages
Hit http://archive.raspberrypi.org jessie/ui armhf Packages
Ign http://archive.raspberrypi.org jessie/main Translation-en_GB               
Ign http://archive.raspberrypi.org jessie/main Translation-en                  
Ign http://archive.raspberrypi.org jessie/ui Translation-en_GB                 
Ign http://archive.raspberrypi.org jessie/ui Translation-en                    
Reading package lists... Done                                                  
pi@malman /etc/apt $ cd
pi@malman ~ $ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Then I tried to install gtk3 like I originally wanted to do. Same old problem.

Code: Select all

pi@malman ~ $ sudo apt-get install libgtk-3-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:
 libgtk-3-dev : Depends: libgdk-pixbuf2.0-dev (>= 2.27.1) but it is not installable
                Depends: libpango1.0-dev (>= 1.36.7) but it is not going to be installed
                Depends: libatk1.0-dev (>= 2.7.5) but it is not installable
                Depends: libatk-bridge2.0-dev but it is not installable
                Depends: libcairo2-dev (>= 1.10.0) but it is not going to be installed
                Depends: libxinerama-dev but it is not installable
                Depends: libxi-dev but it is not installable
                Depends: libxrandr-dev but it is not installable
                Depends: libxcursor-dev but it is not installable
                Depends: libxcomposite-dev but it is not installable
                Depends: libwayland-dev (>= 1.4.0) but it is not installable
E: Unable to correct problems, you have held broken packages.
Oh BTW that cat command you said to run now just gives me nothing

Code: Select all

pi@malman ~ $ cat /etc/apt/sources.list
pi@malman ~ $ 
Thanks for your time. ;)

Re: I can't use apt-get cause I've have held broken package

Posted: Sat Aug 20, 2016 12:24 pm
by ShiftPlusOne
it looks like you deleted raspi.list

Re: I can't use apt-get cause I've have held broken package

Posted: Sat Aug 20, 2016 12:31 pm
by Malman35
ShiftPlusOne wrote:it looks like you deleted raspi.list
I donn't remeber ever doing anything with apt-get. Hmm I messed it up somehow though. :oops:
Sooo is it fixable? I realize that it would be easiest to just start over from a new image and I am planing on doing that once I get my Rpi 3 (I can't wait till it arrives :D ). It should arrive in a few weeks but until then I would like to get this fixed without having to start from a new image.

Re: I can't use apt-get cause I've have held broken package

Posted: Sat Aug 20, 2016 12:36 pm
by ShiftPlusOne
Make sure you have these:

Code: Select all

pi@raspberrypi:~ $ cat /etc/apt/sources.list.d/raspi.list 
deb http://archive.raspberrypi.org/debian/ jessie main ui
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspberrypi.org/debian/ jessie main ui
pi@raspberrypi:~ $ cat /etc/apt/sources.list
deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi

Re: I can't use apt-get cause I've have held broken package

Posted: Sat Aug 20, 2016 12:55 pm
by Malman35
ShiftPlusOne wrote:Make sure you have these:

Code: Select all

pi@raspberrypi:~ $ cat /etc/apt/sources.list.d/raspi.list 
deb http://archive.raspberrypi.org/debian/ jessie main ui
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspberrypi.org/debian/ jessie main ui
pi@raspberrypi:~ $ cat /etc/apt/sources.list
deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi
Awesome! It's working! In /etc/apt/sources.list.d/raspi.list the third line was uncommented and /etc/apt/sources.list was obviously empty so I switched both files to look like what you said and it works now! Thank you so much for your help!

Re: I can't use apt-get cause I've have held broken package

Posted: Sat Dec 10, 2016 3:48 pm
by vaidasm
Hello,

i have very similar problem, but I did not delete any file and my raspi.list and sources.list files looks like normal - the same as in upper comments. When I am installing openframeworks (tried few releases: v0.8.4, v0.9.3, v0.9.7) with few raspbian versions (2016-09-23-raspbian-jessie, 2016-11-25-raspbian-jessie) with no luck - always the same problem: libgtk-3-dev:
libgtk-3-dev : Depends: libwayland-dev (>= 1.4.0) but it is not going to be installed.

And I have tried all solutions from different forum, but nothing helped... Any thoughts?

Thank You in advance.

Re: I can't use apt-get cause I've have held broken package

Posted: Sat Dec 10, 2016 8:26 pm
by ShiftPlusOne
vaidasm wrote:Hello,

i have very similar problem, but I did not delete any file and my raspi.list and sources.list files looks like normal - the same as in upper comments. When I am installing openframeworks (tried few releases: v0.8.4, v0.9.3, v0.9.7) with few raspbian versions (2016-09-23-raspbian-jessie, 2016-11-25-raspbian-jessie) with no luck - always the same problem: libgtk-3-dev:
libgtk-3-dev : Depends: libwayland-dev (>= 1.4.0) but it is not going to be installed.

And I have tried all solutions from different forum, but nothing helped... Any thoughts?

Thank You in advance.
It would have been better to start a new thread, given that this isn't the same issue.

Are you using dist-upgrade or just upgrade? When sending a bug report, please provide all the information.

Re: I can't use apt-get cause I've have held broken package

Posted: Sun Dec 11, 2016 5:54 am
by vaidasm
Hello,

thank you for the answer. I'm using simple upgrade. I am not expert in this kind of stuff, but somewhere around 3 years ago I was playing with RPI B+ and openFrameworks, it worked like a charm. Now I got new rpi3 for playing and decided to try the same old program which I wrote 3 years ago (rpi camera, opengl shaders and etc.), but with new openFramework version and new raspbian I can not even install it :). So, I just wanted to do it in easiest way - read step by step tutorial - http://openframeworks.cc/setup/raspberr ... g-started/. But after install_dependencies my rpi realises, that there are missing few packages :). And I did not find the way to fix it - so I'll try dist-upgrade (first time hear about this :) ).

Re: I can't use apt-get cause I've have held broken package

Posted: Sun Dec 11, 2016 6:30 am
by vaidasm
After dist-upgrade the same situation:

Code: Select all

The following packages have unmet dependencies:
libegl1-mesa-dev: Depends: libwayland-dev (>=1.2.0) but it is not going to be installed
libgtk-3-dev: Depends: libwayland-dev (>=1.4.0) but it is not going to be installed
E:Unable to correct problems, you have held broken packages.

Re: I can't use apt-get cause I've have held broken package

Posted: Sun Dec 11, 2016 12:34 pm
by ShiftPlusOne
Thanks, I will take a look at it tomorrow. Looks like there may be a missing -dev package.

Re: I can't use apt-get cause I've have held broken package

Posted: Sun Dec 11, 2016 10:42 pm
by benmason
Same problem for me today trying to install openframeworks

The following packages have unmet dependencies:
libegl1-mesa-dev : Depends: libwayland-dev (>= 1.2.0) but it is not going to be installed
libgtk-3-dev : Depends: libwayland-dev (>= 1.4.0) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
error installing dependencies, there could be an error with your internet connection

Re: I can't use apt-get cause I've have held broken package

Posted: Mon Dec 12, 2016 7:00 am
by vaidasm
The only quick workaround (not solution) is to remove libgtk${GTK_VERSION}-dev, libegl1-mesa-dev, libgles1-mesa-dev and libgles2-mesa-dev from the install_dependencies.sh script, as sudgested sy1vain in OpenFrameworks forum. Yesterday I did it and OpenFrameworks compiled, but I do not know what will happen when i will use openFrameworks libraries, maybe some of them will be malfunctioning... Some OpenFrameworks examples are not working, maybe of this library removal (maybe not) :).

Re: I can't use apt-get cause I've have held broken package

Posted: Mon Dec 12, 2016 6:13 pm
by vaidasm
ShiftPlusOne wrote:Thanks, I will take a look at it tomorrow. Looks like there may be a missing -dev package.
ShiftPlusOne,

maybe You looked at it? :)

Re: I can't use apt-get cause I've have held broken package

Posted: Mon Dec 12, 2016 6:20 pm
by ShiftPlusOne
vaidasm wrote:
ShiftPlusOne wrote:Thanks, I will take a look at it tomorrow. Looks like there may be a missing -dev package.
ShiftPlusOne,

maybe You looked at it? :)
Is it not resolved?

Re: I can't use apt-get cause I've have held broken package

Posted: Mon Dec 12, 2016 6:52 pm
by vaidasm
I have removed those dependencies, but I don't think it is the right way of solving this problem... I don't know if in the future there will be more problems because of removing these packages...