How to install packages from sid in Debian 6 Squeeze

Sometimes you need to install specific package from sid in Debian. There might be different reasons for this, for example, you need to install gcc-4.5 and g++-4.5 because you need to compile special software and it requires some extra gcc features.

At the current moment, gcc-4.5 is not included in stable release of Debian 6, so I guess it might be a good example to start from. First, you need to locate sid repository for the package and for that you can use Debian package search: debian qa page

Now, by entering there gcc-4.5 and pressing “Go” button you will find out page for unstable repository: Click on any of subitems of package and pickup it’s architecture, for example, amd64. Here is the page we got:

As you can see on the last page, it says that you can use the following mirror to get this package from sid:

deb sid main

Edit your file /etc/apt/sources.list and add the mirror above. Close editor and save changes and update your apt database:

sudo apt-get update

Now you can install gcc-4.5 and g++-4.5 using the following command:

sudo apt-get install gcc-4.5 g++-4.5

After everything is installed, edit again your /etc/apt/sources.list and comment-out or remove “deb sid main” and update your apt:

sudo apt-get update

You’re done.

Leave a Reply

Your email address will not be published. Required fields are marked *

Identify yourself * Time limit is exhausted. Please reload CAPTCHA.