-1

For example: sudo apt-get install gedit returns this.

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:
     gedit : Depends: gedit-common (>= 3.10) but it is not going to be installed
             Depends: gedit-common (< 3.11) but it is not going to be installed
     libqt4-declarative : Depends: libqtcore4 (= 4:4.8.6+git64-g5dc8b2b+dfsg-3~ubuntu6.1) but 4:4.8.1-0ubuntu4.9 is to
be installed
     libqt4-network : Depends: libqtcore4 (= 4:4.8.6+git64-g5dc8b2b+dfsg-3~ubuntu6.1) but 4:4.8.1-0ubuntu4.9 is to
be installed
     libqt4-script : Depends: libqtcore4 (= 4:4.8.6+git64-g5dc8b2b+dfsg-3~ubuntu6.1) but 4:4.8.1-0ubuntu4.9 is to
be installed
     libqt4-scripttools:i386 : Depends: libqt4-script:i386 (= 4:4.8.6+git64-g5dc8b2b+dfsg-3~ubuntu6.1) but it is not going to be
installed
                               Depends: libqtcore4:i386 (= 4:4.8.6+git64-g5dc8b2b+dfsg-3~ubuntu6.1) but 4:4.8.1-0ubuntu4 is to be
installed
                               Depends: libqtgui4:i386 (= 4:4.8.6+git64-g5dc8b2b+dfsg-3~ubuntu6.1) but it is not going to be
installed
                               Depends: libstdc++6:i386 (>= 4.1.1) but it is not going to be installed
     libqt4-sql : Depends: libqtcore4 (= 4:4.8.6+git64-g5dc8b2b+dfsg-3~ubuntu6.1) but 4:4.8.1-0ubuntu4.9 is to
be installed
     libqt4-sql-mysql : Depends: libqtcore4 (= 4:4.8.6+git64-g5dc8b2b+dfsg-3~ubuntu6.1) but 4:4.8.1-0ubuntu4.9 is to
be installed
     libqt4-xml : Depends: libqtcore4 (= 4:4.8.6+git64-g5dc8b2b+dfsg-3~ubuntu6.1) but 4:4.8.1-0ubuntu4.9 is to
be installed
     libqt4-xmlpatterns : Depends: libqtcore4 (= 4:4.8.6+git64-g5dc8b2b+dfsg-3~ubuntu6.1) but 4:4.8.1-0ubuntu4.9 is to
be installed
     libqt4-xmlpatterns:i386 : Depends: libqt4-network:i386 (= 4:4.8.6+git64-g5dc8b2b+dfsg-3~ubuntu6.1) but it is not going to be
installed
                               Depends: libqtcore4:i386 (= 4:4.8.6+git64-g5dc8b2b+dfsg-3~ubuntu6.1) but 4:4.8.1-0ubuntu4 is to be
installed
                               Depends: libstdc++6:i386 (>= 4.1.1) but it is not going to be installed
     libqtcore4 : Breaks: libqtcore4:i386 (!= 4:4.8.1-0ubuntu4.9) but 4:4.8.1-0ubuntu4 is to be installed
     libqtcore4:i386 : Depends: libglib2.0-0:i386 (>= 2.22.0) but it is not going to be installed
                       Depends: libstdc++6:i386 (>= 4.6) but it is not going to be installed
                       Breaks: libqtcore4 (!= 4:4.8.1-0ubuntu4) but 4:4.8.1-0ubuntu4.9 is to be installed
     libqtdbus4 : Depends: libqtcore4 (= 4:4.8.6+git64-g5dc8b2b+dfsg-3~ubuntu6.1) but 4:4.8.1-0ubuntu4.9 is to
be installed
     libqtgui4 : Depends: libqtcore4 (= 4:4.8.6+git64-g5dc8b2b+dfsg-3~ubuntu6.1) but 4:4.8.1-0ubuntu4.9 is to
be installed
     qtcore4-l10n : Breaks: libqtcore4 (< 4:4.8.5+dfsg-1~) but 4:4.8.1-0ubuntu4.9 is to be installed
                    Breaks: libqtcore4:i386 (< 4:4.8.5+dfsg-1~) but 4:4.8.1-0ubuntu4 is to be installed
    E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

I have tried "apt-get -f install", "apt-get update", "apt-get upgrade", "apt-get dist-update" and many more. It seems to be an issue with "libqtcore4". I've tried to use dpkg to install it with a .deb file. I have emptied all caches possible and tried to install it from the software center. Please help, I'd like to use apt-get again. Thanks in advance!

Here's apt-cache policy:

$ apt-cache policy libqtcore4
libqtcore4:
  Installed: 4:4.8.1-0ubuntu4.9
  Candidate: 4:4.8.6+git64-g5dc8b2b+dfsg-3~ubuntu6.1
  Version table:
     4:4.8.6+git64-g5dc8b2b+dfsg-3~ubuntu6.1 0
        500 http://se.archive.ubuntu.com/ubuntu/ vivid-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ vivid-security/main amd64 Packages
     4:4.8.6+git64-g5dc8b2b+dfsg-3~ubuntu6 0
        500 http://se.archive.ubuntu.com/ubuntu/ vivid/main amd64 Packages
 *** 4:4.8.1-0ubuntu4.9 0
        100 /var/lib/dpkg/status
6
  • Do apt-cache libqtcore4 and add the output to your post as an edit.
    – Thomas Ward
    Oct 1, 2015 at 15:59
  • It says it's an invalid operation 'E: Invalid operation libctcore4'
    – 075
    Oct 1, 2015 at 16:04
  • My apologies, use apt-cache policy libqtcore4, I mistyped.
    – Thomas Ward
    Oct 1, 2015 at 16:05
  • Alright, I've corrected it now. I hope this will help you! .)
    – 075
    Oct 1, 2015 at 16:14
  • Edit your question and add the output of gedit gedit-common
    – A.B.
    Oct 1, 2015 at 16:39

1 Answer 1

0

You are not using the latest available libqtcore4. Every one of the packages that's broken above is depending on a much newer version of the thing as it exists in the Vivid repositories, which is why you have so many things broken.

Either use the one in the Ubuntu repositories, or don't use anything that depends on it. There's no reason to be using the older libraries, because it breaks QT Core when everything depends on 4.8.6 and not 4.8.1

3
  • Thanks! But how do I install 4.8.6?
    – 075
    Oct 1, 2015 at 16:35
  • @075 sudo apt-get install libqtcore4=4:4.8.6+git64-g5dc8b2b+dfsg-3~ubuntu6.1 will force it to be the version we want. Future updates are via sudo apt-get update; sudo apt-get upgrade most likely going forward.
    – Thomas Ward
    Oct 1, 2015 at 16:36
  • Thanks! This fixed it for me.
    – 075
    Oct 1, 2015 at 16:43

Not the answer you're looking for? Browse other questions tagged .