LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   E: Unable to correct problems, you have held broken packages (https://www.linuxquestions.org/questions/debian-26/e-unable-to-correct-problems-you-have-held-broken-packages-4175490139/)

fargris 01-04-2014 12:23 PM

E: Unable to correct problems, you have held broken packages
 
I have some massive probllems with my system, which seems to be immune to the usual cures. This is what I have done so far:

Code:

# apt-get clean                 
# apt-get autoclean             
Reading package lists... Done
Building dependency tree     
Reading state information... Done
# apt-get update               
Hit http://ftp.uk.debian.org jessie InRelease
Hit http://security.debian.org wheezy/updates InRelease           
Hit http://ftp.uk.debian.org jessie/main amd64 Packages/DiffIndex
Get:1 ftp://ftp.uk.debian.org wheezy InRelease             
Ign ftp://ftp.uk.debian.org wheezy InRelease
Hit http://ftp.uk.debian.org jessie/non-free amd64 Packages/DiffIndex
Hit http://security.debian.org wheezy/updates/main amd64 Packages
Hit http://ftp.uk.debian.org jessie/contrib amd64 Packages/DiffIndex
Get:2 ftp://ftp.uk.debian.org wheezy/updates InRelease
Hit http://ftp.uk.debian.org jessie/main i386 Packages/DiffIndex
Ign ftp://ftp.uk.debian.org wheezy/updates InRelease           
Hit http://ftp.uk.debian.org jessie/non-free i386 Packages/DiffIndex
Hit http://ftp.uk.debian.org jessie/contrib i386 Packages/DiffIndex
Hit http://ftp.uk.debian.org jessie/contrib Translation-en/DiffIndex
Hit http://ftp.uk.debian.org jessie/main Translation-en/DiffIndex
Hit http://ftp.uk.debian.org jessie/non-free Translation-en/DiffIndex
Hit http://security.debian.org wheezy/updates/contrib amd64 Packages
Hit http://security.debian.org wheezy/updates/non-free amd64 Packages
Hit http://security.debian.org wheezy/updates/main i386 Packages
Hit http://security.debian.org wheezy/updates/contrib i386 Packages
Hit http://security.debian.org wheezy/updates/non-free i386 Packages
Hit http://security.debian.org wheezy/updates/contrib Translation-en
Hit http://security.debian.org wheezy/updates/main Translation-en
Hit http://security.debian.org wheezy/updates/non-free Translation-en
Hit ftp://ftp.uk.debian.org wheezy-updates InRelease
Hit ftp://ftp.uk.debian.org wheezy Release.gpg
Get:3 ftp://ftp.uk.debian.org wheezy/updates Release.gpg
Ign ftp://ftp.uk.debian.org wheezy/updates Release.gpg
Hit ftp://ftp.uk.debian.org wheezy-updates/main Sources
Hit ftp://ftp.uk.debian.org wheezy-updates/contrib Sources
Hit ftp://ftp.uk.debian.org wheezy-updates/non-free Sources
Hit ftp://ftp.uk.debian.org wheezy-updates/main amd64 Packages/DiffIndex
Hit ftp://ftp.uk.debian.org wheezy-updates/contrib amd64 Packages
Hit ftp://ftp.uk.debian.org wheezy-updates/non-free amd64 Packages
Hit ftp://ftp.uk.debian.org wheezy-updates/main i386 Packages/DiffIndex
Hit ftp://ftp.uk.debian.org wheezy-updates/contrib i386 Packages
Hit ftp://ftp.uk.debian.org wheezy-updates/non-free i386 Packages
Hit ftp://ftp.uk.debian.org wheezy-updates/contrib Translation-en
Hit ftp://ftp.uk.debian.org wheezy-updates/main Translation-en/DiffIndex
Hit ftp://ftp.uk.debian.org wheezy-updates/non-free Translation-en
Hit ftp://ftp.uk.debian.org wheezy Release
Get:4 ftp://ftp.uk.debian.org wheezy/updates Release
Ign ftp://ftp.uk.debian.org wheezy/updates Release
Hit ftp://ftp.uk.debian.org wheezy/main Sources
Hit ftp://ftp.uk.debian.org wheezy/non-free Sources
Hit ftp://ftp.uk.debian.org wheezy/contrib Sources
Hit ftp://ftp.uk.debian.org wheezy/main amd64 Packages
Hit ftp://ftp.uk.debian.org wheezy/non-free amd64 Packages
Hit ftp://ftp.uk.debian.org wheezy/contrib amd64 Packages
Hit ftp://ftp.uk.debian.org wheezy/main i386 Packages
Hit ftp://ftp.uk.debian.org wheezy/non-free i386 Packages
Hit ftp://ftp.uk.debian.org wheezy/contrib i386 Packages
Hit ftp://ftp.uk.debian.org wheezy/contrib Translation-en
Hit ftp://ftp.uk.debian.org wheezy/main Translation-en
Hit ftp://ftp.uk.debian.org wheezy/non-free Translation-en
Get:5 ftp://ftp.uk.debian.org wheezy/updates/main Sources
Get:6 ftp://ftp.uk.debian.org wheezy/updates/contrib Sources
Get:7 ftp://ftp.uk.debian.org wheezy/updates/non-free Sources
Get:8 ftp://ftp.uk.debian.org wheezy/updates/main Sources
Get:9 ftp://ftp.uk.debian.org wheezy/updates/contrib Sources
Get:10 ftp://ftp.uk.debian.org wheezy/updates/non-free Sources
Get:11 ftp://ftp.uk.debian.org wheezy/updates/main Sources
Get:12 ftp://ftp.uk.debian.org wheezy/updates/contrib Sources
Get:13 ftp://ftp.uk.debian.org wheezy/updates/non-free Sources
Get:14 ftp://ftp.uk.debian.org wheezy/updates/main Sources
Get:15 ftp://ftp.uk.debian.org wheezy/updates/contrib Sources
Get:16 ftp://ftp.uk.debian.org wheezy/updates/non-free Sources
Get:17 ftp://ftp.uk.debian.org wheezy/updates/main Sources
Err ftp://ftp.uk.debian.org wheezy/updates/main Sources
  Unable to fetch file, server said 'Failed to open file.  ' [IP: 83.142.228.128 21]
Get:18 ftp://ftp.uk.debian.org wheezy/updates/contrib Sources
Err ftp://ftp.uk.debian.org wheezy/updates/contrib Sources
  Unable to fetch file, server said 'Failed to open file.  ' [IP: 83.142.228.128 21]
Get:19 ftp://ftp.uk.debian.org wheezy/updates/non-free Sources
Err ftp://ftp.uk.debian.org wheezy/updates/non-free Sources
  Unable to fetch file, server said 'Failed to open file.  ' [IP: 83.142.228.128 21]
W: Failed to fetch ftp://ftp.uk.debian.org/debian/dists/wheezy/updates/main/source/Sources  Unable to fetch file, server said 'Failed to open file.  ' [IP: 83.142.228.128 21]

W: Failed to fetch ftp://ftp.uk.debian.org/debian/dists/wheezy/updates/contrib/source/Sources  Unable to fetch file, server said 'Failed to open file.  ' [IP: 83.142.228.128 21]

W: Failed to fetch ftp://ftp.uk.debian.org/debian/dists/wheezy/updates/non-free/source/Sources  Unable to fetch file, server said 'Failed to open file.  ' [IP: 83.142.228.128 21]

E: Some index files failed to download. They have been ignored, or old ones used instead.
# 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.
# apt-get dist-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.

But when I try to install libpango1.0-dev or libpango1.0-dev:i386:

Code:

# apt-get install libpango1.0-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:
 libpango1.0-dev : Depends: libpango1.0-0 (= 1.30.0-1) but 1.36.0-1+b1 is to be installed
                  Depends: gir1.2-pango-1.0 (= 1.30.0-1) but 1.36.0-1+b1 is to be installed
                  Depends: libglib2.0-dev (>= 2.31.0) but it is not going to be installed
                  Depends: libfreetype6-dev but it is not going to be installed
                  Depends: libxrender-dev but it is not going to be installed
                  Depends: libxft-dev but it is not going to be installed
                  Depends: libfontconfig1-dev but it is not going to be installed
                  Depends: libcairo2-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

The update fails for the last few files - is that the problem? And how can I fix that?

widget 01-04-2014 02:32 PM

Have you run, as root;
Code:

apt-get -f install
Have you tried a different mirror for your packages.

Please post results of;
Code:

cat /etc/sources.list
Can see from what you posted that you have repos for wheezy and jessie in there. This is not a good idea at all. If you want to run testing packages do it on a testing installation.

Wheezy is Stable. Amoung other things, this means that there are no new packages or package versions added (generally) except for security upgrades of existing packages.

Testing (Jessie) is where Debian 8 is being built. That means that the packages are aimed at the future. While there is little or no difference in packages for a short while after the release of a new Debian Stable and the birth of a new Debian Testing, the difference grows wider with time.

Testing is considered by Debian to be somewhat unstable. Mixing testing packages with Debian Stable will produce, in the long run, an OS that is very unstable.

There is such a thing as the wheezy-backports repo where some packages from the testing repos are backported to Wheezy. That is not considered by Debian to be a great idea if you are interested in stability but at least there has been some attempt made to make the packages compatible with Wheezy.

Packages migrated from Sid to Jessie are hopefully functional in Jessie. They are supposed to be functional enough not to cause Jessie to fail to boot to the desktop.

I am typing this from my Sid installation. My usual preference is Debian testing. I accept the fact that they may be, at times partially broken or maybe even just broken.

I have an install, on a different drive of Wheezy set up for security and used for business purposes on the web. I do not use even the backports repo for my Wheezy install. It is supposed to be a nice, boring, rock solid Debian installation. It is.

I have, in both Sid and Testing the experimental repo enabled. Don't use it much but it comes in handy occasionally. I have no problem using Sid packages, occasionally, in Testing. They are not very far apart.

How far apart they are is questionable and variable to some extent but I like to think of it as about 3 weeks. In the case of Wheezy and Testing you are talking about a difference of several months.

Wheezy should be using kernel 3.2. Jessie is using 3.11. Packages are created for use with a kernel. There is a big difference there.

fargris 01-05-2014 02:18 AM

Hi widget,

I have run apt-get -f install as well:

Code:

# apt-get -f install
Reading package lists... Done
Building dependency tree     
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 23 not upgraded.
# apt-get install libpango1.0-dev:i386 
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:
 libpango1.0-dev:i386 : Depends: libpango1.0-0:i386 (= 1.30.0-1) but it is not going to be installed
                        Depends: gir1.2-pango-1.0:i386 (= 1.30.0-1) but it is not going to be installed
                        Depends: libglib2.0-dev:i386 (>= 2.31.0) but it is not going to be installed
                        Depends: libfreetype6-dev:i386 but it is not going to be installed
                        Depends: libx11-dev:i386 but it is not going to be installed
                        Depends: libxrender-dev:i386 but it is not going to be installed
                        Depends: libxft-dev:i386 but it is not going to be installed
                        Depends: libfontconfig1-dev:i386 but it is not going to be installed
                        Depends: libcairo2-dev:i386 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

From my source list:

Code:

# cat /etc/apt/sources.list
#

# deb cdrom:[Debian GNU/Linux 7.2.0 _Wheezy_ - Official amd64 NETINST Binary-1 20131012-14:04]/ wheezy main

# deb cdrom:[Debian GNU/Linux 7.2.0 _Wheezy_ - Official amd64 NETINST Binary-1 20131012-14:04]/ wheezy main

deb ftp://ftp.uk.debian.org/debian/ wheezy main non-free contrib
deb-src ftp://ftp.uk.debian.org/debian/ wheezy main non-free contrib

deb http://ftp.uk.debian.org/debian/ jessie main non-free contrib

#deb http://security.debian.org/ wheezy/updates main contrib non-free
#deb-src ftp://ftp.uk.debian.org/debian/ wheezy/updates main contrib non-free

# wheezy-updates, previously known as 'volatile'
deb ftp://ftp.uk.debian.org/debian/ wheezy-updates main contrib non-free
deb-src ftp://ftp.uk.debian.org/debian/ wheezy-updates main contrib non-free

As you can see, I have disabled the ones pointing to wheezy/updates because they were causing update to fail.

What I really can't see is why there is any talk about 'held broken packages'; I can see nothing broken in synaptic, and dpkg -l doesn't list anything that is being held.

Another thing - this all started when I tried to install virtualbox from the repository, which seemed to be broken; at first I tried to make it work, but ran into something like this 'held broken' problem - I believe it mentioned the package I am now trying to reinstall with no luck, which I removed. Part of my problem is probably that I don't know what 'held broken' means at all, and I can't seem to find any real explanation of it.

Things were working fine even after I had added jessie, and anyway, it would really be uncomfortable to start all over at this point - it is a system I have to use for work, and reinstalling would cut out a whole day, at least.

descendant_command 01-05-2014 02:32 AM

You are mixing stable and testing, which is why it is broken.
According to the warranty, you get to keep all the pieces.

fargris 01-05-2014 02:55 AM

descendant_command: It may be that you are right - however, I know several persons who use a similar setup without this particular problem, so there seems to be at least a chance that you are wrong.

Also, if I may give a bit of advice: your comment is stated in a mocking tone, which considering that you are talking to a person with a potentially serious problem on his hands, is like kicking someone who is lying down. It may be that you feel a need to bolster your self-esteem this way, but all it has done is lower my respect for you, which I suspect is not really what you were after. You could learn a good deal from widget, who is saying the same as you, more or less, but in a much more constructive and friendly way, which I am sure most people are willing to take in.

descendant_command 01-05-2014 03:05 AM

Yeah, probably should have added that smiley ... :)

If you intend on persevering with it (for the moment - the effort involved will wear thin after a few more "broken held package" sessions) use apt-cache policy and/or packages.debian.org to check out those dependency chains and see why they are "not going to be installed".

In some limited cases, with specific packages without a bunch of dependencies, testing versions can indeed be installed successfully in stable.
Having both repo's in your sources turns your install into a hand grenade.
It is much better to run testing (or sid).
Good luck.

fargris 01-05-2014 03:29 AM

Apology accepted :-)

Now, if you tell me that it is likely to be unhealthy, I'll have to consider getting to a clean installation. Do you know if there is a way to either upgrade to a clean testing install, or downgrade to stable, without doing a complete reinstall?

My concrete problem at the moment is that I need to use a Cisco VPN client, which to complicate things a bit, is 32 bit on my 64 bit system. It has everything it needs, except:


Code:

# ldd /opt/cisco/anyconnect/bin/vpnui                 
        linux-gate.so.1 (0xf77ca000)
        libvpnapi.so => /opt/cisco/anyconnect/lib/libvpnapi.so (0xf7630000)
        libvpncommoncrypt.so => /opt/cisco/anyconnect/lib/libvpncommoncrypt.so (0xf75ba000)
        libvpncommon.so => /opt/cisco/anyconnect/lib/libvpncommon.so (0xf7452000)
        libatk-1.0.so.0 => /usr/lib/i386-linux-gnu/libatk-1.0.so.0 (0xf7402000)
        libdl.so.2 => /lib/i386-linux-gnu/i686/cmov/libdl.so.2 (0xf73fd000)
        libgdk_pixbuf-2.0.so.0 => /usr/lib/i386-linux-gnu/libgdk_pixbuf-2.0.so.0 (0xf73db000)
        libgdk-x11-2.0.so.0 => /usr/lib/i386-linux-gnu/libgdk-x11-2.0.so.0 (0xf732d000)
        libglib-2.0.so.0 => /lib/i386-linux-gnu/libglib-2.0.so.0 (0xf7229000)
        libgmodule-2.0.so.0 => /usr/lib/i386-linux-gnu/libgmodule-2.0.so.0 (0xf7224000)
        libgobject-2.0.so.0 => /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 (0xf71d3000)
        libgtk-x11-2.0.so.0 => /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0 (0xf6d65000)
        libpango-1.0.so.0 => /usr/lib/i386-linux-gnu/libpango-1.0.so.0 (0xf6d19000)
        libpangox-1.0.so.0 => not found
        libpangoxft-1.0.so.0 => not found
        ...

- libpangox and libpangoxft, both of which are in libpango1.0-dev:i386, which fails to install. I feel fairly confident that once they are in, I can connect as usual (it worked before, after all). I would consider getting the source and building it outside debian's package system, if needed, but I'll have to find the relevant source code first, of course, plus it may need other things etc, so it would be a lot less hassle to find a work-around to the 'held broken' problem.

widget 01-05-2014 05:12 AM

I have no idea where you work or with whom. No one in there right mind is running a Debian system on that sources.list. Just not going to happen.

So you have
Quote:

disabled the ones pointing to wheezy/updates because they were causing update to fail
What you have disabled is not wheezy updates. What your have disabled is security updates. Now there is a great idea. And they are what is causing you to have failed upgrades.

How do you fix this problem.

First learn a little bit about the package management system.

Reinstall. I am really sorry you feel this is an inconvenience. You should have thought about that before completely dicking your sources.list up.

I hope you are installed on 2 partitions (/ and /home). That way reinstalling is easier.

Security updates are put out by the Debian Security team. Their ONLY purpose is to patch exploitable vulnerabilities in packages on YOUR system. You do not, particularly on any box that has any value outside social media and porn, disable security updates.

DO NOT, no matter what idiots you may have run into say, mix the stable repos with repos for testing or Sid. This is what is wrong with your system. You broke it.

To be honest you could get a list of all installed packages and there version number. You could then remove the ones that do not belong on there. You should be able to do this in about a week if you work at it for 10 to 12 hours a day. You could then maybe get the correct versions back in. I suspect this will be educational and end up a waste of time. Reinstalling can easily be done in a couple hours.

Pull your data off the install. You can leave any files that explain the way to screw up your sources.list. You do not need them.

If you NEED to run testing that is fine. Use a Wheezy netinstall image with nothing but the base install. Upgrade it to testing before finishing your install.

The smart thing to do is install Wheezy, learn to use it, learn how the system works before "improving" it.

Debian has fine documentation including manuals for system maintainers. If you do not understand everything they are talking about you may want to stop and think about simply mixing crap into your sources.list.

There were people back in the 70s that thought putting large engines in Chevy Vegas was a really cool thing to do. Kind of like putting a truck engine on a go cart but that was the idea. Go fast. Too bad there were not enough brakes on the front end of a Vega for that sort of thing.

This is pretty comparible to what you are doing. It is simply the silly fooling around with things you have no comprehension of because you have discovered Linux and you can finally control your OS. I understand that. You can also completely screw your system. This is part of the freedom of Linux. I like it. I hope you do.

Don't be doing this kind of thing on a system that you need to have function. Jessie is pretty stable. Certainly more stable than what you have.

Wheezy is stable. It is also reliable. Install it and give it a try.

descendant_command 01-05-2014 06:03 AM

Quote:

Originally Posted by fargris (Post 5092187)
Apology accepted :-)

Now, if you tell me that it is likely to be unhealthy, I'll have to consider getting to a clean installation. Do you know if there is a way to either upgrade to a clean testing install, or downgrade to stable, without doing a complete reinstall?

Depends a lot on what you have installed from testing.
This should help with that
Code:

aptitude search "?narrow(?installed,?not(?archive(stable)))"
It's generally a lot easier going forward than backwards.
Quote:

libpango1.0-dev:i386, which fails to install.
Check the version numbers of the dependencies that are "not going to be installed" to see if they are actually available to your system. Try installing them individually to see what it complains about.

Try aptitude - it is quite a bit smarter than apt-get at finding solutions to dependency issues.
The ncurses interface can be partitularly helpful when trying to figure out what the sticking point is.

saivinoba 01-05-2014 10:03 AM

Quote:

Originally Posted by fargris (Post 5092168)
descendant_command: It may be that you are right - however, I know several persons who use a similar setup without this particular problem, so there seems to be at least a chance that you are wrong.

That's because those who have such a setup do so using a technique called 'apt-pinning'. You can google and find more info about how to maintain stable/testing/sid together. It's not without its quirks though.

As per Debian handbook and FAQs we can go from stable to testing and testing to sid(unstable) but the reverse order is not supported. So you can,
a) take necessary backup and reinstall stable release or
b) go fully 'testing' (currently jessie).

To change to full testing you can remove all references to stable (wheezy) release and keep only testing (jessie) repos in you /etc/apt/sources.list. Then do
Code:

apt-get clean
apt-get update
apt-get upgrade
apt-get dist-upgrade

Also note, sometimes when things do not seem to work like your problem, just keeping quiet (literally ;-) for sometime and retrying apt-get update->apt-get upgrade->apt-get dist-upgrade afterwards helps. It may be that necessary fixes have not been uploaded/synced.


All times are GMT -5. The time now is 03:45 PM.