How to install a single package from Debian sid?

8

1

Take ibus-sunpinyin for example, which isn't existed in the squeeze release. I'm not going to switch the whole system to the sid branch, so, I want to download the single package from sid repository and install it like:

# Add the sid repository
sudo mv /tmp/sid.list /etc/apt/sources.list.d/

# Error: can't install because version conflicts of libc6:
#     sudo apt-get install ibus-sunpinyin

# This is ok but it will upgrade a lot of mess from sid branch:
#     sudo apt-get upgrade ibus-sunpinyin

# So, instead of apt-get install/upgrade, let me download & install the single package.
# However, this errored again because of version conflicts of libc6:
#      apt-get install --download-only ibus-sunpinyin

## THEN, WHAT CAN I DO? ##

# Remove the sid repository.
sudo mv /etc/apt/sources.list.d/sid.list /tmp

# Install the single package.
sudo dpkg -i ./ibus-sunpinyin-x.x.x.deb

Xiè Jìléi

Posted 2011-08-23T01:20:35.327

Reputation: 14 766

To download a single package: you can apt-get download ... (for apt-get 0.8.11+), or aptitude download .... However, I'm also failed to sudo dpkg -i ibus-sunpinyin-x.x.x.deb due to sid dependencies. – Xiè Jìléi – 2011-08-23T06:04:24.933

Answers

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.

Neil

Posted 2011-08-23T01:20:35.327

Reputation: 412

1

apt-pinning is the proper way to do this, TBH. http://jaqque.sbih.org/kplug/apt-pinning.html

– Rob – 2011-09-14T16:46:13.740

9

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

Rob

Posted 2011-08-23T01:20:35.327

Reputation: 2 152

You need this if the package you want has no backport. Otherwise I would wager backports generally function better. – d-_-b – 2014-01-03T01:40:04.637

1Yeah. Backports are a much safer bet. Apt-pinning will not always work and will sometimes pull way more than you want (nobody will want to help if you pull libc6 from sid!) – Rob – 2014-01-09T14:07:45.583

4

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

Chad Feller

Posted 2011-08-23T01:20:35.327

Reputation: 399

0

One way to work around this is to use cdebootstrap to install a basic sid system, then use chroot to run the program you need within the new system.

cdebootstrap installs a new debian system from whichever distribution you want in a directory. Then, chroot lets you run programs in that other distribution without rebooting or anything.

You can also use mount --bind to let the chrooted system access your home folder, /proc, etc.

From within the chrooted system, apt-get will install from the sid repository.

For a more detailed explanation, see https://wiki.ubuntu.com/DebootstrapChroot.

Neil

Posted 2011-08-23T01:20:35.327

Reputation: 412