Tuesday, March 31, 2009

Building git from Source on Ubuntu 8.10 Hardy Heron

VMWare supports Hardy Heron as a guest operating system in Fusion 2, so that's what I use for Linux work.  The Hardy Heron version of git is 1.5.6.3 though, and today's version is 1.6.2.  Here is what I did to build git 1.6.2 from source.  It is a mix of command line and GUI tools

  1. Using the Synaptic Package Manager, mark git-core for installation and verify that zlib1g, zlib1g-dev, libexpat1, libexpat1-dev, and curlInstall git-core from the Synaptic Package Manager.
  2. Open a terminal window, make the directory that you want to hold the git tree (I used ~/work), change to that directory, and invoke git clone git://git.kernel.org/pub/scm/git/git.git
  3. Using the Synaptic Package Manager, remove git-core and install if necessary tk, libcurl4-openssl-dev, zlib1g, zlib1g-dev, libexpat1, libexpat1-dev, and curl.
  4. In the terminal window, change to the directory where you cloned git.
  5. make prefix=/usr/local all
  6. sudo make prefix=/usr/local install