Friday, 11 October 2019

How to install Meld on Ubuntu

Meld is popular cross-platform visual diff and merge tool. It can compare files and directories.

Clone Meld repository (use HTTPS URI, not the SSH-based one unless you've set up SSH key for that repo):

$ git clone https://gitlab.gnome.org/GNOME/meld.git

Check the status of master and release branches. When I built and run the app from master, I got this error:

$ meld
Meld requires GtkSourceView 4 4.0.0 or higher.




Then I found the following comment here:
> If Meld is complaining about GtkSourceView 4, you're using master, not 3.20.1.

This means I should have checked out the release branch for the desired version:

$ cd meld/
$ git checkout meld-3-20

When I was running the installer:

$ python3 setup.py install --prefix=/usr

...I was getting errors related to missing packages:

unable to execute 'intltool-update': No such file or directory
error: command 'intltool-update' failed with exit status 1

unable to execute 'xmllint': No such file or directory
error: command 'xmllint' failed with exit status 1

unable to execute 'glib-compile-resources': No such file or directory
error: command 'glib-compile-resources' failed with exit status 1

I installed the required packages (the package needed for xmllint is libxml2-utils):

$ sudo apt update
$ sudo apt upgrade
$ sudo apt install intltool 
$ sudo apt install xmllint
E: Unable to locate package xmllint
$ sudo apt install libxml2-utils
$ glib-compile-resources --help
Command 'glib-compile-resources' not found, but can be installed with:
sudo apt install libglib2.0-dev-bin
$ sudo apt install libglib2.0-dev-bin

...and run again installer:

$ python3 setup.py install --prefix=/usr

...which now complained about permissions:

creating /usr/lib/python3/dist-packages/meld
error: could not create '/usr/lib/python3/dist-packages/meld': Permission denied

Meld was finally installed with sudo user:

$ sudo python3 setup.py install --prefix=/usr
...
running install_egg_info
Writing /usr/lib/python3/dist-packages/meld-3.21.0.egg-info

When I run it first time I got this error:

$ meld
Meld requires pygobject 3.30.0 or higher.




To install the latest version of PyGObject:

$ pip3 install PyGObject 

Installing PyGObject complained couple of times about missing packages:

No package 'glib-2.0' found
Try installing it with: 'sudo apt install libglib2.0-dev'

No package 'gobject-introspection-1.0' found
Try installing it with: 'sudo apt install libgirepository1.0-dev'

No package 'cairo' found
Try installing it with: 'sudo apt install libcairo2-dev'

Installing PyGObject was successful once I installed all missing packages:

$ sudo apt install libglib2.0-dev
$ sudo apt install libgirepository1.0-dev
$ sudo apt install libcairo2-dev
$ pip3 install pycairo

I rebuilt the app and run it again:

$ sudo python3 setup.py install --prefix=/usr
$ meld

This time it opened with no issues:


References:

1 comment:

micheal pan said...

BE SMART AND BECOME RICH IN LESS THAN 3DAYS....It all depends on how fast 
you can be to get the new PROGRAMMED blank ATM card that is capable of
hacking into any ATM machine,anywhere in the world. I got to know about 
this BLANK ATM CARD when I was searching for job online about a month 
ago..It has really changed my life for good and now I can say I'm rich and 
I can never be poor again. The least money I get in a day with it is about 
$50,000.(fifty thousand USD) Every now and then I keeping pumping money 
into my account. Though is illegal,there is no risk of being caught 
,because it has been programmed in such a way that it is not traceable,it 
also has a technique that makes it impossible for the CCTVs to detect 
you..For details on how to get yours today, email the hackers on : (
atmmachinehackers1@gmail.com ). Tell your 
loved once too, and start to live large. That's the simple testimony of how 
my life changed for good...Love you all ...the email address again is ;
atmmachinehackers1@gmail.com