How to Install Kdiff3 on Ubuntu

Kdiff3 is the most used diff/merge tool. It has been there for many years, but it does not come listed in some of the software repositories for Ubuntu (Some versions ).

Following are the list of commands that we will use:
[code language=”bash”]
wget -Okdiff3.tar.gz https://sourceforge.net/projects/kdiff3/files/latest/download
tar -xzf kdiff3.tar.gz
sudo apt-get install libqt4-dev
cd kdiff3-[replace the untarred dir name]
qmake kdiff3.pro
make
sudo make install
[/code]

That’s it, now you can open it from terminal with the following command.
[code language=”bash”]
kdiff3
[/code]

Following is detailed step by step process for the same. In case above procedure didn’t work try downloading the older stable version (in my case it was 0.9.96 when I installed).

To install kdiff3 on any versions of Ubuntu where you can’t find it in Synaptic Package Manager, just follow the instructions below:

  1. Download the Kdiff3 tar file from the Sourceforge repositories here.
  2. Then extract the tar file using the following command.

    [code language=”bash”]$ tar -xzf kdiff3-0.9.98.tar.gz[/code]

  3. Now we need to make sure we have QT4 installed, before configuring kdiff3. Enter the following comand at the terminal to install qt4.
    [code language=”bash”]$ sudo apt-get install libqt4-dev[/code]

    installing-kidff3

  4. Now go into the src-QT4 inside previously extracted and follow below command to compile it and install
    installing-kidff3-1

    [code language=”bash”]$ cd kdiff3-0.9.98/src-QT4
    $ qmake kdiff3.pro
    $ make
    $ make install[/code]
    installing-kidff3-2

  5. Now you should be able to use kdiff3 by just typing it at the command line (terminal):
    [code language=”bash”]$ kdiff3[/code]
    installing-kidff3-3

2 Comments

Add a Comment

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