Wednesday, November 23, 2011

Compile and install latest version of Digikam on Ubuntu 11.10

This process initially gave me a lot of trouble, but it really is pretty simple.  Here are the steps requried to build and install the latest version of Digikam (2.5.0 is the latest version available as of December 8, 2011) on Ubuntu 11.10 (Oneiric Ocelot).  I used a fresh install of 32-bit Ubuntu to test this process.

All of these steps will be done from a terminal, so start off by launching a terminal with <ctrl + alt> T.

  1. Install Git (sudo apt-get install git).
  2. Download the source code as follows:
    • From your home directory, run git clone git://anongit.kde.org/digikam-software-compilation digikam-software-compilation
    • That will create a folder with some files inside.  Move into the new folder with cd digikam-software-compilation/
    • Execute perl download-repos to download the source code.
  3. Install cmake (sudo apt-get install cmake).
  4. Install the dependencies for DigiKam (sudo apt-get build-dep digikam).  This will install all the dependencies for the packaged version of DigiKam, which shouldn't be much different from the latest version we just downloaded.
  5. Create a subdirectory named "build" (mkdir build).
  6. Move into the build directory (cd build).
  7. Configure the build paramaters using cmake (cmake -DCMAKE_BUILD_TYPE=debugfull -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` ..) NOTE!!  kde4-config --prefix is NOT surrounded by apostrophes - you can generate that character using SHIFT + ~ on most keyboards.  Also, don't forget the ".." at the end.  This should complete successfully.  If not, let me know what problem you ran into!
  8. Build it (make -j 4).  The "-j 4" tells the compiler to use 4 threads, to take advantage of multiple CPUs.  If you don't have more than 1 processing core, just leave that out.
  9. Install it (sudo make install -j 4).
  10. Run it! ALT+F2, then type in digikam.
Let me know what problems you encounter, if any!

NOTE!! If you want to update your version of Digikam after following the steps above, this process is even easier, assuming you didn't delete any of the downloaded code:

  1. Delete all of the files in the build directory you previously created (navigate into the build directory, and execute rm * -rf.  CAUTION!  Don't use this anywhere OTHER than the build directory unless you know what you're doing - it's a dangerous command.
  2. Run perl gits pull from the "digikam-software-compilation" folder.  This will compare your files with the latest versions from the repository.
  3. Follow steps 6-10 above, and your software will be updated to the latest available version!

4 comments:

  1. Thank You. It works! Now I can enjoy latest Digikam!

    ReplyDelete
  2. Thank you! It works perfectly!

    ReplyDelete
  3. If you need help with this program, I found a lot of information dedicated to it. Follow the link.

    ReplyDelete