68

To install meld on Mac OSX I try to run:

brew install meld

but I got the following error:

Error: No available formula for meld

What is the right way to install meld?

1
  • 3
    you probably ought to switch out the accepted answer... Jan 15 '14 at 23:10
7

When this question was asked, it was not possible using Homebrew. They didn't support it yet.

There are alternative solutions to installing meld on OS X:

Use a different package manager, like Fink, which is mentioned in meld's installation manual, or MacPorts, mentioned in the issue in Homebrew's issue tracker.

You can probably also compile from source, but need to get the dependencies yourself. Installing one of the other package managers might be easier than that.

6
  • 8
    it is now possible, see github.com/mxcl/homebrew/blob/master/Library/Formula/meld.rb
    – meduz
    Jan 30 '13 at 8:58
  • 1
    @meduz Changed the answer. Since I mention alternatives that used to work when this question was new, I decided against deleting the answer, as it might help those with the same issue with different software.
    – Daniel Beck
    Jan 30 '13 at 9:40
  • 3
    as of today, the correct answer is below: superuser.com/a/1177575/404225 Mar 3 '17 at 20:53
  • This answer is no longer correct. The OP should unaccept it.
    – Merchako
    Jan 25 '18 at 10:56
  • @Merchako Could you clarify why it's not correct? The first paragraph implies that it's (now) possible using Homebrew. Are the specific alternatives I provide no longer correct?
    – Daniel Beck
    Jan 25 '18 at 11:21
123

Homebrew

You can now install Meld with Homebrew! On macOS, run:

$ brew install --cask meld

Other Homebrew Commands

I've changed the syntax of this answer over time to be more fluent. The following commands are equivalent and also work for at least macOS Sierra and High Sierra:

$ brew install --cask homebrew/cask/meld
$ brew install homebrew/cask/meld

You should not run the older $ brew install homebrew/gui/meld because it's deprecated by Homebrew.

8
  • 3
    upvoted! only 37 votes to go :P Mar 3 '17 at 20:54
  • The second step should be brew install caskroom/cask/meld. Check the brew warning when trying to run brew install homebrew/gui/meld: Warning: Use caskroom/cask/meld instead of deprecated homebrew/gui/meld Jul 11 '17 at 7:18
  • They both seem to work fine for me. Is there a reason to prefer the new way?
    – Merchako
    Jul 12 '17 at 12:21
  • 1
    FYI: $ brew cask install meld works for me on macOS Catalina v10.15.2 as of today 29 Jan 2020.
    – Yuci
    Jan 29 '20 at 11:28
  • 1
    @CiprianTomoiagă No error, it is working fine. Just to be sure, I opened it just now :-)
    – Yuci
    Mar 13 '20 at 10:00
40

As pointed out by @meduz in the comment above, meld now compiles file in brew (haven't tested yet), please try it first, since my original answer is much older.

Today is already possible install it using Homebrew:

brew install meld

I got a issue with pygtk, when I execute meld it says:

Couldn't bind the translation domain. Some translations won't work.
Cannot import: pygtk
No module named pygtk

I already have pygtk installed from lion, and needed to export it to work:

export PYTHONPATH=/usr/local/lib/python2.7/site-packages/

Add the above line to your ~/.profile to set PYTHONPATH automatically when you open a terminal window.

8
  • 1
    it compiles fine on the current version of homebrew, could you please edit your answer?
    – meduz
    Jan 30 '13 at 9:00
  • 5
    Note you will have to install XQuartz (from MacOS Forge) before installing Meld. Feb 18 '13 at 1:16
  • 1
    Note this is a lengthy install, took about 14 minutes on my (Ivy Bridge) machine.
    – Steven Lu
    May 25 '13 at 23:42
  • 2
    Note, for me, this still resulted in an error, which was addressed in this post on SuperUser: superuser.com/questions/455511/…
    – Brad Parks
    Sep 13 '13 at 17:24
  • In 2015 with Meld 3.14.0, XQuartz was not required for install. GTK+ appears to be running on the native X server? I'm not sure, but I know I don't have XQuartz installed.
    – Johann
    Aug 19 '15 at 20:49
17

On OSX El Captain you have just to run:

$ brew install homebrew/gui/meld

3
  • 3
    This is the most up-to-date answer.
    – Eric Dand
    Jul 13 '16 at 20:53
  • 1
    currently this fails with Warning: Use caskroom/cask/meld instead of deprecated homebrew/gui/meld Mar 3 '17 at 20:51
  • 2
    @jotadepicas It does. Instead you can just use brew install caskroom/cask/meld and it works (note: I already had xquartz installed). Apr 16 '17 at 21:04
6

I believe that the current correct brew commands are

brew install Caskroom/cask/xquartz
brew install homebrew/x11/meld

However after running those commands I ended with the following, which I know that I have overcome on other installations on different macs in the past.

Couldn't bind the translation domain. Some translations won't work.
'module' object has no attribute 'bindtextdomain'
/usr/local/lib/python2.7/site-packages/gtk-2.0/gtk/__init__.py:57: GtkWarning: could not open display
  warnings.warn(str(e), _gtk.Warning)
/usr/local/Cellar/meld/1.8.6/libexec/bin/meld:155: GtkWarning: gtk_icon_theme_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
  gtk.icon_theme_get_default().append_search_path(meld.paths.icon_dir())
Traceback (most recent call last):
  File "/usr/local/Cellar/meld/1.8.6/libexec/bin/meld", line 155, in <module>
    gtk.icon_theme_get_default().append_search_path(meld.paths.icon_dir())
AttributeError: 'NoneType' object has no attribute 'append_search_path'

But this time I decided it wasn't worth my time since I couldn't remember the exact remedy.

Instead I found a simple DMG installer and script from Alex Kras to launch the Meld application installed by the DMG installer. The instructions are on his site. Note, though, that this DMG-installed version doesn't respond well to to the git mergetool input

3
  • 1
    I actually ended up abandoning the DMG version and went with the brew install. I could not get the DMG version to correctly understand git mergetool's output
    – Kirby
    May 5 '15 at 22:09
  • Same problem as Kirby :(
    – BrunoJCM
    Jul 28 '15 at 13:21
  • On masOs Siera it just works w/o problem, $> brew install Caskroom/cask/meld ==> brew cask install Caskroom/cask/meld ==> Downloading github.com/yousseb/meld/releases/download/osx-9/meldmerge.dmg ######################################################################## 100.0% ==> Verifying checksum for Cask meld ==> Moving App 'Meld.app' to '/Applications/Meld.app' 🍺 meld was successfully installed!
    – arty
    Feb 9 '17 at 16:00
6

Try this

brew install homebrew/x11/meld

or this

brew tap homebrew/x11
brew install meld

Meld is in Homebrew's X11 repository. Running brew tap homebrew/x11 allows Homebrew to see Meld in that repository. (2015 answer)

4
  • Once installed how does one use meld? Oct 22 '15 at 14:46
  • 1
    @evolutionxbox, just type meld in your terminal
    – Roy
    Jan 15 '16 at 20:28
  • @Roy makes sense. Not sure why I never tried it Jan 15 '16 at 22:44
  • 2
    brew install homebrew/gui/meld worked for me. Looks like the package was moved? Jun 8 '16 at 20:33
3

Don't install it using Brew. Do it this way instead. https://yousseb.github.io/meld/

Top reasons behind using this fork over Macports or Homebrew builds: Retina support (check the screenshot!) Latest 3.x series No hassle install (drag/drop like any other app) Integrates with OSX menu

1
  • @mwfearnley Ok. I moved my comment to the answer. Cheers.
    – smileBot
    Nov 6 '16 at 13:48
2

As the formula for Homebrew disappeared i want to mention an alternative. There's this build as OS X application which is simple to install. It was last built in December '14 and requires some tweaks if you want to use it from the command line. I have not yet tried to figure out how.

1
  • Thank you, this works. The homebrew business didn't work for me :-/, just complains about missing imports. Do you know how to make that app available from bash commad line? Feb 20 '16 at 17:25
2

It's been moved to Caskroom/cask, so run:

brew install Caskroom/cask/meld
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.