How to install a single package from Debian sid?

Solution 1:

You can also try downloading the source packages from the sid repository, and build them on your squeeze system. You might run into trouble if there are a lot of dependencies, or if the package depends on a version of a library that is not available in squeeze.

If this works, then you don't need to maintain another distribution in a separate folder, as you would with the bootstrapped approach.

Solution 2:

What you REALLY want is to learn about apt-pinning. http://jaqque.sbih.org/kplug/apt-pinning.html

Solution 3:

This package is available in Debian Backports, which will make your life a lot easier. These are generally packages pulled from testing or unstable (sid), and "backported" to the current stable release.

Add this line to your sources.list

deb http://backports.debian.org/debian-backports squeeze-backports main

then run:

apt-get update && apt-get -t squeeze-backports install ibus-sunpinyin

Solution 4:

The easy way is to set preferences so that the system uses stable for most packages but falls back to testing or unstable for missing packages.

Here are the steps:

  1. Add this to /etc/apt/sources.list:

     deb http://deb.debian.org/debian buster main
     deb http://deb.debian.org/debian testing main non-free contrib
     deb http://deb.debian.org/debian unstable main non-free contrib
    
  2. Write this to /etc/apt/preferences (or create the file)

     Package: *
     Pin: release a=stable
     Pin-Priority: 700
    
     Package: *
     Pin: release a=testing
     Pin-Priority: 650
    
     Package: *
     Pin: release a=unstable
     Pin-Priority: 600
    
  3. Run apt-get update

  4. Install the package you want (e.g. apt-get install ibus-sunpinyin)

PS: You can force the installation of an unstable package with apt-get install <package>/unstable