After my HTPC system upgrade from Ubuntu 13.10 to 14.04 I can't seem to install Kodi.

I run

sudo apt-add-repository ppa:team-xbmc/ppa
sudo apt-get update
sudo apt-get install kodi kodi-bin

And get:

The following packages have unmet dependencies:
 kodi-bin : Depends: libsdl2-2.0-0 (>= 2.0.0) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

I had a few PPA's insatalled on old stystem and removed them all from sources list. I also ppa-purge the ream-xbmc's ppa and re added it. Some other ppa's I removed from sources list, as ppa-purgeing them failed. The old system had XBMC running without issues. The upgrade was smooth, and had no errors.

I see some other people had same problem, but solved by manually installing a deb. This makes me think my apt is very confused, and I would rather not break my setup further.

This system was installed using an older version of this guide. I additionally installed Gnome for occasional web browsing.

How do I go about debugging this package problem? What would make my system not know about libsdl2-dev? Did I find a bug in the team-xbmc ppa?

Some more info:

$ apt-cache policy libsdl2-dev
  Installed: (none)
  Candidate: 2.0.2+dfsg1-3ubuntu1.1
  Version table:
     2.0.2+dfsg1-3ubuntu1.1 0
        500 http://za.archive.ubuntu.com/ubuntu/ trusty-updates/universe amd64 Packages
     2.0.2+dfsg1-3ubuntu1 0
        500 http://za.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages

$ dpkg -S /usr/lib/x86_64-linux-gnu/libSDL*
libsdl1.2debian:amd64: /usr/lib/x86_64-linux-gnu/libSDL-1.2.so.0
libsdl1.2debian:amd64: /usr/lib/x86_64-linux-gnu/libSDL-1.2.so.0.11.4
libsdl-image1.2:amd64: /usr/lib/x86_64-linux-gnu/libSDL_image-1.2.so.0
libsdl-image1.2:amd64: /usr/lib/x86_64-linux-gnu/libSDL_image-1.2.so.0.8.4
  • The package is available for Trusty. Force the install with sudo apt-get install libsdl2-2.0-0 – A.B. Jun 28 '15 at 19:51
  • @A.B. That gives me next dependency problem The following packages have unmet dependencies: libsdl2-2.0-0 : Depends: libwayland-egl1-mesa (>= 10.0.2) or libwayland-egl1 I actually want to fix the root cause of this package problem. Why do I have to force install anything? – Diederik Jun 28 '15 at 20:04
  • ck. what version of libwayland-egl1-mesa is installed, maybe you have the lts version? apt-cache policy libwayland-egl1-mesa* & ck. what mesa you are using, 14.04 orig. or one of the lts versions. – doug Jun 28 '15 at 23:10
  • @doug paste.ubuntu.com/11791594 doesn't look like I have any libwayland installed. – Diederik Jun 29 '15 at 5:26
  • What release/flavor are you actually running? Ubuntu or Ubuntu-Gnome would require some version of libwayland-egl1-mesa to be installed – doug Jun 29 '15 at 12:38

I think I found the problem, as Kodi is now installing correctly:
First I found all the packages that were still hanging around from saucy by running

dpkg --list | grep saucy

One by one I removed them all using apt-get remove <packagename>. (I suspect these were old packages that were installed via some weird ppa when I installed gnome.)

After removing all the saucy packages, I ran apt-get autoremove to cleanup the rest of the packages. Then I ran into what seems to be a libgl1-mesa-dri bug.

dpkg: error processing archive /var/cache/apt/archives/libgl1-mesa-dri_10.1.3-0ubuntu0.4_amd64.deb (--unpack):
 trying to overwrite shared '/etc/drirc', which is different from other instances of package libgl1-mesa-dri:amd64

Luckily simple workaround of sudo mv /etc/drirc /etc/drirc.bak2 fixed that and I could install Kodi again withouth further trouble.


Try running this

sudo apt-get install -f
sudo dpkg --configure -a
sudo apt-get clean
sudo apt-get update

This should clean up any broken packages. Then you should try this again

sudo apt-get install kodi kodi-bin

Hope this helps

  • I ran those commands, but still get same error. It didn't look like there were any broken packages. – Diederik Jun 28 '15 at 19:47
  • And why twice sudo apt-get update? – A.B. Jun 28 '15 at 19:49
  • hmm thats strange I dont know at the moment ill keep thinking on it tho @Diedrik and i didnt notice that i put 2 apt-get update sorry I'm tired. – popcorn9499 Jun 28 '15 at 19:52

I had the same problem after upgrading from 15.04 to 15.10. The solution I found here: Ubuntu Forums: broken package libsdl2

  1. See what packages are not in the cleanly installed state (I had a lot!):

    dpkg -l|sed -nr '/^.[^in]/s/^(.{78}).*/\1/p'
  2. Add back the missing PPA, in my case the one from Kodi.

  3. Bring every program up to the current levels and install the latest kernel:

    sudo apt-get dist-upgrade
  4. After that, Kodi could be installed again in my case; Then either continue to use the PPA or use ppa-purge on it.

  5. In the future purge all PPAs before upgrading Ubuntu releases!

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.