Thursday, August 21, 2008

Debian Backporting

It is easy to install packages on Debian. All you have to do is "apt-get install package". But what if we would like to install a newer version package? For example, git-core version on Debian stable is 1.4.4. It is too old and does not have basic commands such as git config, init,... etc. We may install git from Debian Backports. It is a easier way than building from source for most people.

  1. add the backport mirrors to /etc/apt/sources.list
    deb etch-backports main non-free
    deb-src etch-backports main non-free
  2. import archive's key into apt
    # apt-get install debian-backports-keyring
    (or # wget -O - | apt-key add -)
  3. resynchronize the package index files from their sources
    # apt-get update
  4. remove previously installed git
    # apt-get remove git-core
  5. install git from
    # apt-get -t etch-backports install git-core
    (or # aptitude -t etch-backports install "git-core")
  6. finish
    # git --version
    git version
We have git installed. Then, happily coding. :P
For more information, take a look at Debian Backports wiki.

No comments: