Monday, March 25, 2013

How to compile DigiKam 3.1 on Ubuntu 12.04

Title of my previous post How to install the latest digiKam version on Ubuntu was a little misleading, because the instructions were for digiKam version 2.9 (which was in fact the latest when I started to investigate how to compile it on my Ubuntu) but in the meantime versions 3.0 and soon after 3.1 were officially published by developers. Therefore my post was outdated as soon as it was published. Because of that I promised “I will also try to compile new version and post instructions as soon as possible”. Promise is a promise, so here are instructions how to compile digiKam 3.1 on Ubuntu 12.04.

update: If you want to compile digiKam 3.2 on Ubuntu, I have a new post with instructions here.
update: If you are scanning old dia slides, please check my evaluation of Reflecta DigitDia 5000.


Commands should be typed or copy/pasted in the Terminal, if you do not know how, see my previous post. As already mentioned if you have already installed an older version of digiKam you must remove it first with:
sudo apt-get remove digikam
or if you followed my instructions how to compile version 2.9 (you can also use "dpkg –l | grep digi" to check the name to remove):
sudo apt-get remove digikam2.9
Commands are basically the same as described in previous post, therefore I will only list them without long explanations:
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get update
sudo apt-get upgrade
cd Downloads
Next comand all in one line:
wget http://download.kde.org/stable/digikam/digikam-3.1.0.tar.bz2
tar jxvf digikam-3.1.0.tar.bz2
cd digikam-3.1.0/
mkdir build
cd build
sudo apt-get install gcc cpp make cmake checkinstall
sudo apt-get install kdelibs5
Update: this line was missing:
sudo apt-get install libgpod4-nogtk
sudo apt-get build-dep digikam kipi-plugins
Next comand all in one line:
cmake -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` ..
Next comand all in one line:
sudo checkinstall --pkgname=digiKam3.1 --install=no make install
Check result of previous command to find your <deb-name> for next command:
sudo dpkg -i --force-overwrite <deb-name>
That's all, start digiKam from Dash Home and enjoy!

I somehow expected the same steps could be used to compile digiKam on Ubuntu 12.10 and on Debian distributions. Well, as captain Alberto Bertorelli from Allo' Allo' would have said "what a mistaka to maka". I installed both distrubutions and tried, but I had errors. If I solve the puzzle (read, find out how to compile without errors) I will publish it, but this time I am not making any promises.

After all I've had enough of installing Linux and compiling digiKam, it is time to start using digiKam on my scanned dia-slides.

16 comments:

  1. Installed digikam 3.1 on Ubuntu 12.10 and it works perfectly! Thanks so much for writing these instructions.

    ReplyDelete
  2. Excellent! Thanks for figuring this all out and documenting it!

    ReplyDelete
  3. Hi, it breaks after
    sudo apt-get build-dep digikam kipi-plugins
    with
    E: Unable to find a source package for digikam

    I am sure this is a no-brainer but since I am a Linux newbie I have to ask "where do i go from here"?

    thx

    ReplyDelete
    Replies
    1. had the same message, my problem:I don't use KDE, so I went to kubuntu-ppa Backports. worked for me with following comands :
      sudo add-apt-repository ppa:kubuntu-ppa/backports
      sudo apt-get update
      sudo apt-get install digikam

      hope it helped

      Delete
    2. Hi !

      Hmmmmm, are you using Ubintu 12.04 or some other distibution ?

      LP, Mirc M

      Delete
    3. Hi, I am using Ubuntu 12.10.
      BTW, backports worked. It uninstalled Skype, but I re-installed afterwards.
      many thanks

      Delete
  4. Let me try this again, maybe I'll get it right.

    Followed all instructions, checked Digikam and it is still version 2.8. Rebooted and it is still 2.8.

    Using Ubuntu 12.10 and Gnome

    ReplyDelete
    Replies
    1. Did you first remove old version with
      sudo apt-get remove digikam

      LP, Mirc M

      Delete
  5. Success! Tried it again. Entered each line one by one entering each individually it took a long time to build on my newish fast desktop but now it is the new version. Thanks.

    ReplyDelete
    Replies
    1. Nice :)

      I suppose I must write a note in the post, that each commands must be entered one at a time ...

      LP, Mirc M

      Delete
  6. I was using Digikam 2.8 downloaded from the Ubuntu software center with Ubuntu 12.10 and after upgrading Ubuntu to 13.04, digikam 3.1 was installed automatically but I could not launch it. (It creashed every time at start up).

    I followed the steps here with Ubuntu 13.04 and it worked ! Thanks a lot ! you are wonderful!

    Jonathan
    www.collectifpolaire.org

    ReplyDelete
  7. I have followed all the steps but when i run sudo apt-get build-dep digikam kipi-plugins I get this error,

    /opt/digikam/digikam-3.2.0/build$ sudo apt-get build-dep digikam kipi-plugins
    Leyendo lista de paquetes... Hecho
    Creando árbol de dependencias
    Leyendo la información de estado... Hecho
    Los siguientes paquetes tienen dependencias incumplidas:
    libcvaux-dev : Depende: libopencv-core-dev pero no va a instalarse
    Depende: libopencv-imgproc-dev pero no va a instalarse
    Depende: libopencv-features2d-dev pero no va a instalarse
    Depende: libopencv-calib3d-dev pero no va a instalarse
    Depende: libopencv-objdetect-dev pero no va a instalarse
    Depende: libopencv-legacy-dev pero no va a instalarse
    Depende: libopencv-video-dev pero no va a instalarse
    Depende: libopencv-contrib-dev pero no va a instalarse
    libexiv2-dev : Depende: libexiv2-11 (= 0.22-2) pero 0.22-oneiric~ppa2 va a ser instalado
    libgphoto2-2-dev : Depende: libgphoto2-2 (= 2.4.13-1ubuntu1.2) pero 2.4.13-oneiric~ppa2 va a ser instalado
    libopencv-dev : Depende: libopencv-core-dev (= 2.3.1-7) pero no va a instalarse
    Depende: libopencv-ml-dev (= 2.3.1-7) pero no va a instalarse
    Depende: libopencv-imgproc-dev (= 2.3.1-7) pero no va a instalarse
    Depende: libopencv-video-dev (= 2.3.1-7) pero no va a instalarse
    Depende: libopencv-objdetect-dev (= 2.3.1-7) pero no va a instalarse
    Depende: libopencv-gpu-dev (= 2.3.1-7) pero no va a instalarse
    Depende: libopencv-highgui-dev (= 2.3.1-7) pero no va a instalarse
    Depende: libopencv-calib3d-dev (= 2.3.1-7) pero no va a instalarse
    Depende: libopencv-flann-dev (= 2.3.1-7) pero no va a instalarse
    Depende: libopencv-features2d-dev (= 2.3.1-7) pero no va a instalarse
    Depende: libopencv-legacy-dev (= 2.3.1-7) pero no va a instalarse
    Depende: libopencv-contrib-dev (= 2.3.1-7) pero no va a instalarse
    E: No se pudieron satisfacer las dependencias de construcción de digikam.

    I have ubuntu 12.04. How can I fix this ?

    ReplyDelete
    Replies
    1. Hi !

      Sorry, I do not understand spanish.
      Can you install english language and try again.

      Sincerely, Mirc M

      Delete
  8. Thanks for your effort.

    The install worked for 3.1 on my previous system but since then I reinstalled ubuntu 12.04 and now when I try to install 3.2, after the line cmake -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` .. I get the message

    -- libkdcraw library found.................. NO
    and
    -- libkipi library found.................... NO


    Both libkdcraw and libkipi are installed though. I installed them and reinstalled them through synaptic and also removed them completely and saw them being installed by the commands you have above.

    Obviously, for some reason CMake can't see them.........

    Any ideas?

    ReplyDelete
    Replies
    1. Problem "solved". I had to do this



      Enable the repository:

      # sudo add-apt-repository ppa:kubuntu-ppa/backports

      Update the package index:

      # sudo apt-get update

      Install digikam-data deb package:

      # sudo apt-get install digikam-data

      and then back to -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` ..

      in order for the correct libraries to be installed.

      It seems that 3.2 needs some new versions of libraries (such as libkdcraw22 instead of libkdcraw) for it to work and ubuntu reps are not providing it. On the contrary kubuntu provides the latest (obviously) libraries.

      Delete