1

I want to install the Wing IDE for python. When I executed it, dpkg showed me some qt packages that were not installed. I installed a few of them via Synaptic Package Manager, but the rest cannot be found. The problem now is I cannot install -f, install or remove any other package. All include in the following:

root@debian32:/home/saman/Downloads# apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
 libqt4-network : Depends: libqtcore4 (= 4:4.8.6+git64-g5dc8b2b+dfsg-3) but it is not installed
 libqt4-sql : Depends: libqtcore4 (= 4:4.8.6+git64-g5dc8b2b+dfsg-3) but it is not installed
 libqt4-sql-mysql : Depends: libqtcore4 (= 4:4.8.6+git64-g5dc8b2b+dfsg-3) but it is not installed
 libqt4-xml : Depends: libqtcore4 (= 4:4.8.6+git64-g5dc8b2b+dfsg-3) but it is not installed
 libqtcore4-perl : Depends: libqtcore4 (>= 4:4.8) but it is not installed
                   Depends: libqtgui4 (>= 4:4.8) but it is not installed
 libqtdbus4 : Depends: libqtcore4 (= 4:4.8.6+git64-g5dc8b2b+dfsg-3) but it is not installed
 libqtgui4-perl : Depends: libqtcore4 (>= 4:4.8) but it is not installed
                  Depends: libqtgui4 (>= 4:4.8) but it is not installed
 libsmokeqtcore4-3 : Depends: libqtcore4 (>= 4:4.8.0) but it is not installed
 libsmokeqtgui4-3 : Depends: libqtcore4 (>= 4:4.7.0~beta1) but it is not installed
                    Depends: libqtgui4 (>= 4:4.8.5) but it is not installed
 libsmokeqtnetwork4-3 : Depends: libqtcore4 (>= 4:4.7.0~beta1) but it is not installed
 wingide5 : Depends: libqtcore4 (>= 4.6.2) but it is not installed
            Depends: libqtgui4 (>= 4.6.2) but it is not installed
            Depends: libqt4-svg (>= 4.6.2) but it is not installed
            Depends: libqt4-webkit (>= 4.6.2) but it is not installed
            Depends: libqt4-script (>= 4:4.5.3) but it is not installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies

This really looks like a huge problem to me now, how can I fix this?

# apt-cache policy libqtcore4
libqtcore4:
  Installed: (none)
  Candidate: 4:4.8.6+git64-g5dc8b2b+dfsg-3
  Version table:
     4:4.8.6+git64-g5dc8b2b+dfsg-3 0
        500 http://ftp.tr.debian.org/debian/ stable/main i386 Packages
        100 /var/lib/dpkg/status




# apt-get install libqtcore4
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 libqtcore4-perl : Depends: libqtgui4 (>= 4:4.8) but it is not going to be installed
 libqtgui4-perl : Depends: libqtgui4 (>= 4:4.8) but it is not going to be installed
 libsmokeqtgui4-3 : Depends: libqtgui4 (>= 4:4.8.5) but it is not going to be installed
 ninja-ide : Depends: python-pyinotify but it is not going to be installed
             Depends: python-qt4 but it is not going to be installed
 wingide5 : Depends: libqtgui4 (>= 4.6.2) but it is not going to be installed
            Depends: libqt4-svg (>= 4.6.2) but it is not going to be installed
            Depends: libqt4-webkit (>= 4.6.2) but it is not going to be installed
            Depends: libqt4-script (>= 4:4.5.3) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).



root@debian32:/usr/share/eclipse/dropins# apt-get install libqtgui4
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 libqt4-network : Depends: libqtcore4 (= 4:4.8.6+git64-g5dc8b2b+dfsg-3) but it is not going to be installed
 libqt4-sql : Depends: libqtcore4 (= 4:4.8.6+git64-g5dc8b2b+dfsg-3) but it is not going to be installed
 libqt4-sql-mysql : Depends: libqtcore4 (= 4:4.8.6+git64-g5dc8b2b+dfsg-3) but it is not going to be installed
 libqt4-xml : Depends: libqtcore4 (= 4:4.8.6+git64-g5dc8b2b+dfsg-3) but it is not going to be installed
 libqtcore4-perl : Depends: libqtcore4 (>= 4:4.8) but it is not going to be installed
 libqtdbus4 : Depends: libqtcore4 (= 4:4.8.6+git64-g5dc8b2b+dfsg-3) but it is not going to be installed
 libqtgui4 : Depends: libqtcore4 (= 4:4.8.6+git64-g5dc8b2b+dfsg-3) but it is not going to be installed
 libqtgui4-perl : Depends: libqtcore4 (>= 4:4.8) but it is not going to be installed
 libsmokeqtcore4-3 : Depends: libqtcore4 (>= 4:4.8.0) but it is not going to be installed
 libsmokeqtgui4-3 : Depends: libqtcore4 (>= 4:4.7.0~beta1) but it is not going to be installed
 libsmokeqtnetwork4-3 : Depends: libqtcore4 (>= 4:4.7.0~beta1) but it is not going to be installed
 ninja-ide : Depends: python-pyinotify but it is not going to be installed
             Depends: python-qt4 but it is not going to be installed
 wingide5 : Depends: libqtcore4 (>= 4.6.2) but it is not going to be installed
            Depends: libqt4-svg (>= 4.6.2) but it is not going to be installed
            Depends: libqt4-webkit (>= 4.6.2) but it is not going to be installed
            Depends: libqt4-script (>= 4:4.5.3) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).




root@debian32:/usr/share/eclipse/dropins# apt-cache policy libqtgui4
libqtgui4:
  Installed: (none)
  Candidate: 4:4.8.6+git64-g5dc8b2b+dfsg-3
  Version table:
     4:4.8.6+git64-g5dc8b2b+dfsg-3 0
        500 http://ftp.tr.debian.org/debian/ stable/main i386 Packages
        100 /var/lib/dpkg/status
  • What does apt-cache policy libqtcore4 say? What about apt-get install libqtcore4? Please edit your question with the results. – Stephen Kitt May 25 '15 at 8:23
  • please have a look at the updated code above – Saman May 25 '15 at 8:43
  • Can you do the same for libqtgui4? – Stephen Kitt May 25 '15 at 8:51
  • please have a look at the changes above – Saman May 25 '15 at 9:24
  • 1
    See answers to unix.stackexchange.com/q/121180/4671, with suggestions of useful debugging information to provide. – Faheem Mitha May 25 '15 at 10:20
1

It looks like you have broken dependencies to the extent that APT is unable to resolve conflicts. You may need to temporarily remove some packages or install unwanted packages.

It may help to temporarily disable non-official package sources. Edit /etc/apt/sources.list or /etc/apt/sources.list.d/* to comment out Wingide and other non-official package sources (add a # to the beginning of the corresponding lines). Do keep all official Debian sources. Then run apt-get update and try apt-get -f install again.

If that doesn't work, try removing some non-official packages. If you start down this route, keep notes as to what packages you've removed but want to reinstall. If you have aptitude installed, you can use it to search for packages from non-official sources:

apt-cache policy $(aptitude search -F %p '!~Odebian ~i')

With aptitude, you can also launch it without arguments in a terminal and use its interface to try to resolve conflicts interactively. If you don't have aptitude at this point, it may be a pain to install it. You can download packages manually and install them with dpkg -i FILENAME.deb but this requires chasing dependencies manually.

Since you got into this situation by installing wingide, try removing it.

If you make progress, run apt-get -f install again.

Once you manage to get apt-get -f install to run and report no errors, reenable the non-official sources. Try using aptitude or apt-get instead of Synaptic; these days, apt-get is better at dependency resolution than Aptitude which is better than Synaptic, though even with Synaptic you shouldn't end up with a broken system like you did: unless you ran dpkg manually or used --force options, this is a bug in the package management tools, possibly triggered by oddities in non-official packages.

0

After I tried many options of aptitude and the ways friends suggested in their posts, I came across a incredible option of aptitude:

   -f
       Try hard to fix the dependencies of broken packages, even if it means ignoring the actions requested on the command line.

       This corresponds to the configuration item Aptitude::CmdLine::Fix-Broken.

Using this option, I could only remove one of the unment dependencies, and that led to the removal of all other conflicts:

# aptitude -fy remove "one of unmet dependency package names"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.