10

Homebrew has a formula for moreutils and GNU parallel.

GNU Parallel conflicts with Moreutils since it also has a binary called parallel, which is just less useful. However I'd still like to install both formulae at the same time. How can I do that?

Ideally, I'd install GNU Parallel as gparallel – akin to the naming of the Coreutils binaries – to avoid these conflicts, but I don't see a way to specify that in the formula itself, since prefix is just the Homebrew prefix.

def install                                                                                                                               
    system "./configure", "--prefix=#{prefix}"                                                                                              
    system "make install"                                                                                                                   
end

Any way to get the best of both worlds?

slhck
  • 223,558
  • 70
  • 607
  • 592
  • Are you aware that certain features of GNU Parallel depends on the program being called `parallel`? – Ole Tange Feb 03 '13 at 19:17
  • 1
    No, I wasn't. Could you explain what these are? (Also, why is there a configuration option that lets you change this so easily?) – slhck Feb 03 '13 at 19:21

3 Answers3

10

You have to install a third-party version of the formula:

brew install slhck/moreutils/moreutils --without-parallel

Then:

brew install parallel
slhck
  • 223,558
  • 70
  • 607
  • 592
Daniel Patru
  • 224
  • 3
  • 5
  • 4
    _brew_ still complained `Error: Cannot install parallel because conflicting formulae are installed`. The second command should be `brew install parallel --force`. – Frozen Flame Sep 17 '15 at 03:52
  • 1
    This no longer works in OSX High Sierra, see [here](https://superuser.com/questions/1289636/running-brew-install-moreutils-without-parallels-fails) –  Jan 28 '18 at 02:38
7

In homebrew 2.0 options have been removed

The way to get GNU parallels working now is

brew unlink moreutils
brew install parallel
brew link --overwrite moreutils
brew unlink parallel
brew link --overwrite parallel
csanchez
  • 294
  • 2
  • 6
0

Do you use all of the tools in moreutils, or just sponge, which is the most general purpose one? If so, you can get sponge in a brew package by itself:

brew uninstall moreutils
brew install sponge

sponge by itself has no conflicts with another package, so you should be able to use that alongside parallel.

nofinator
  • 101
  • 2