While trying to compile a software, apt-get threw an error saying it couldn't locate the package libpyside-dev. I searched that package on the net and it's found on https://packages.debian.org/sid/libpyside-dev. I don't know what repository I should add to /etc/apt/sources.list in order to be able to install this package via apt-get.

Where is the sources.list entry written on that page?


  1. My apt-cache policy output is here.

  2. My Debian version (cat /etc/debian_version) is: buster/sid

  3. Adding deb https://deb.debian.org/debian/ sid main contrib non-free seems to solve the issue (along with other problematic packages) but I'm not sure if this is the correct way or not.

  • IF one of your configured repos can see it, apt-cache madison packagename should tell you what version(s) are available, and what URL(s) they come from. – ivanivan Apr 10 '18 at 16:34
  • Adding Sid is the correct thing to do, but you need to pin the repositories too (see my updated answer). – Stephen Kitt Apr 11 '18 at 8:13

There is no sources.list entry for the package because it’s hosted in the default repositories in Debian. You should be able to run

sudo apt install libpyside-dev

and get the appropriate version for your distribution.

If you’re using Buster, you won’t be able to install libpyside-dev currently unless you also add unstable to your repositories, because the package was removed from Buster (Qt4 is being removed); see the Debian wiki for details. In particular, you should pin your repositories so that packages from Buster are given priority over packages from Sid; add the following to /etc/apt/preferences:

Package: *
Pin: release a=testing
Pin-Priority: 900

Package: *
Pin: release a=unstable
Pin-Priority: 800
| improve this answer | |
  • I removed the deb https://deb.debian.org/debian/ sid main contrib non-free line from my /etc/apt/sources.list and uninstalled that package, run apt-get update to be sure that I'm back to square one. Now I can not install the package (getting the same error) as expected. Editing /etc/apt/preferences as you stated did not help solving the problem. Changing the line deb http://ftp.uk.debian.org/debian/ testing main contrib non-free to deb http://ftp.uk.debian.org/debian/ unstable main contrib non-free solved the problem. Your answer contains causuality so it has to be accepted. Thanks – ceremcem Apr 11 '18 at 21:33
  • 1
    No, no, no, you need to add the unstable repository (also known as Sid), not replace testing by unstable. Pinning becomes relevant when you have both repositories configured. – Stephen Kitt Apr 12 '18 at 7:47
  • Okay, now it worked as you'd expected. Thank you again! – ceremcem Apr 12 '18 at 22:00

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.