Installation problem with BREW on Mac OsX

Hi,

I had a running mrtrix version. After uninstalling it, and trying to reinstall:

I receive the following error using during installation:

Treanus-MBP:~ stefan$ brew tap MRtrix3/mrtrix3
==> Tapping mrtrix3/mrtrix3
Cloning into ‘/usr/local/Homebrew/Library/Taps/mrtrix3/homebrew-mrtrix3’…
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 5 (delta 0), reused 4 (delta 0), pack-reused 0
Unpacking objects: 100% (5/5), done.
Error: Invalid formula: /usr/local/Homebrew/Library/Taps/mrtrix3/homebrew-mrtrix3/mrtrix3.rb
mrtrix3: /usr/local/Homebrew/Library/Taps/mrtrix3/homebrew-mrtrix3/mrtrix3.rb:40: syntax error, unexpected tIDENTIFIER, expecting keyword_end
revision 0 option “stable”, "Install latest ta…
^
Error: Cannot tap mrtrix3/mrtrix3: invalid syntax in tap!

Any help?

Hi Stefan,

Thanks for reporting. Should be fixed now.

Cheers,
Max

Hi Max, I have this when I try to install, please help:

uqhvo1$ brew tap MRtrix3/mrtrix3
Updating Homebrew…
==> Tapping mrtrix3/mrtrix3
Cloning into ‘/usr/local/Homebrew/Library/Taps/mrtrix3/homebrew-mrtrix3’…
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 5 (delta 0), reused 3 (delta 0), pack-reused 0
Unpacking objects: 100% (5/5), done.
Error: Invalid formula: /usr/local/Homebrew/Library/Taps/mrtrix3/homebrew-mrtrix3/mrtrix3.rb
mrtrix3: /usr/local/Homebrew/Library/Taps/mrtrix3/homebrew-mrtrix3/mrtrix3.rb:40: syntax error, unexpected tIDENTIFIER, expecting keyword_end
revision 0 option “test”, “Run tests after installation.”
^
Error: Cannot tap mrtrix3/mrtrix3: invalid syntax in tap!

Hi,

I forgot to update the update script on the computer that updates the formula. Should work now.

Currently, the master branch does not compile on macOS. You might want to wait until this pull request is merged.

Hi Max,
any idea how long this will take?
Thanks in advance,
Stefan.

Hi @Stefan_Sunaert,

The above pull request has just been merged, so it should be fixed after updating your install!

Cheers,
Thijs

Hi, thank you. The mrtrix tap works now. However, installing was an issue. I got this:

uqhvo1$ brew install mrtrix3
Updating Homebrew…
==> Installing mrtrix3 from mrtrix3/mrtrix3
==> Installing dependencies for mrtrix3/mrtrix3/mrtrix3: readline, sqlite, gdbm, python
==> Installing mrtrix3/mrtrix3/mrtrix3 dependency: readline
==> Downloading https://homebrew.bintray.com/bottles/readline-7.0.3_1.sierra.bot
######################################################################## 100.0%
==> Pouring readline-7.0.3_1.sierra.bottle.tar.gz
==> Using the sandbox
Warning: The post-install step did not complete successfully
You can try again using brew postinstall readline
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local,
because macOS provides the BSD libedit library, which shadows libreadline.
In order to prevent conflicts when programs look for libreadline we are
defaulting this GNU Readline installation to keg-only…

For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/readline/lib
CPPFLAGS: -I/usr/local/opt/readline/include

==> Summary
:beer: /usr/local/Cellar/readline/7.0.3_1: 46 files, 1.5MB
==> Installing mrtrix3/mrtrix3/mrtrix3 dependency: sqlite
==> Downloading https://homebrew.bintray.com/bottles/sqlite-3.19.2.sierra.bottle
######################################################################## 100.0%
==> Pouring sqlite-3.19.2.sierra.bottle.tar.gz
Warning: The post-install step did not complete successfully
You can try again using brew postinstall sqlite
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local,
because macOS provides an older sqlite3.

If you need to have this software first in your PATH run:
echo ‘export PATH="/usr/local/opt/sqlite/bin:$PATH"’ >> ~/.bash_profile

For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/sqlite/lib
CPPFLAGS: -I/usr/local/opt/sqlite/include
For pkg-config to find this software you may need to set:
PKG_CONFIG_PATH: /usr/local/opt/sqlite/lib/pkgconfig

==> Summary
:beer: /usr/local/Cellar/sqlite/3.19.2: 12 files, 2.9MB
==> Installing mrtrix3/mrtrix3/mrtrix3 dependency: gdbm
==> Downloading https://homebrew.bintray.com/bottles/gdbm-1.13.sierra.bottle.tar
######################################################################## 100.0%
==> Pouring gdbm-1.13.sierra.bottle.tar.gz
Warning: The post-install step did not complete successfully
You can try again using brew postinstall gdbm
==> Summary
:beer: /usr/local/Cellar/gdbm/1.13: 19 files, 554.4KB
==> Installing mrtrix3/mrtrix3/mrtrix3 dependency: python
Warning: Building python from source:
The bottle needs the Apple Command Line Tools to be installed.
You can install them, if desired, with:
xcode-select --install

==> Downloading https://www.python.org/ftp/python/2.7.13/Python-2.7.13.tar.xz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/python/2.7.13 --enable-ipv6 --dataroo
==> make
==> make install PYTHONAPPSDIR=/usr/local/Cellar/python/2.7.13
==> make frameworkinstallextras PYTHONAPPSDIR=/usr/local/Cellar/python/2.7.13/sh
==> Downloading https://files.pythonhosted.org/packages/26/d1/dc7fe14ce4a3ff3fae
######################################################################## 100.0%
==> Downloading https://files.pythonhosted.org/packages/11/b6/abcb525026a4be042b
######################################################################## 100.0%
==> Downloading https://files.pythonhosted.org/packages/c9/1d/bd19e691fd4cfe908c
######################################################################## 100.0%
Error: parent directory is world writable but not sticky
Please report this bug:
http://docs.brew.sh/Troubleshooting.html
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tmpdir.rb:92:in mktmpdir' /usr/local/Homebrew/Library/Homebrew/utils/fork.rb:6:insafe_fork’
/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:658:in build' /usr/local/Homebrew/Library/Homebrew/formula_installer.rb:312:ininstall’
/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:529:in install_dependency' /usr/local/Homebrew/Library/Homebrew/formula_installer.rb:496:inblock in install_dependencies’
/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:496:in each' /usr/local/Homebrew/Library/Homebrew/formula_installer.rb:496:ininstall_dependencies’
/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:245:in install' /usr/local/Homebrew/Library/Homebrew/cmd/install.rb:322:ininstall_formula’
/usr/local/Homebrew/Library/Homebrew/cmd/install.rb:207:in block in install' /usr/local/Homebrew/Library/Homebrew/cmd/install.rb:205:ineach’
/usr/local/Homebrew/Library/Homebrew/cmd/install.rb:205:in install' /usr/local/Homebrew/Library/Homebrew/brew.rb:92:in

I think you have an issue with your homebrew: You might want to fix that first. For instance: https://github.com/Homebrew/legacy-homebrew/issues/29212

Have a look at this:

Cheers,
Max

Some problems installing here. I’ve updated & upgraded brew, but it seems to another issue:

I’m on High Sierra 10.13.2

brew install mrtrix3
Warning: Calling 'depends_on :python' is deprecated!
Use 'depends_on "python"' instead.
/usr/local/Homebrew/Library/Taps/mrtrix3/homebrew-mrtrix3/mrtrix3.rb:56:in `<class:Mrtrix3>'
Please report this to the mrtrix3/mrtrix3 tap!

==> Installing mrtrix3 from mrtrix3/mrtrix3
Warning: Calling 'depends_on :python' is deprecated!
Use 'depends_on "python"' instead.
/usr/local/Homebrew/Library/Taps/mrtrix3/homebrew-mrtrix3/mrtrix3.rb:56:in `<class:Mrtrix3>'
Please report this to the mrtrix3/mrtrix3 tap!

Error: undefined method `parent' for nil:NilClass
Please report this bug:
  https://docs.brew.sh/Troubleshooting.html
/usr/local/Homebrew/Library/Taps/mrtrix3/homebrew-mrtrix3/mrtrix3.rb:14:in `block in <class:Qt5Requirement>'
/usr/local/Homebrew/Library/Homebrew/requirement.rb:80:in `instance_eval'
/usr/local/Homebrew/Library/Homebrew/requirement.rb:80:in `modify_build_environment'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/set.rb:306:in `each_key'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/set.rb:306:in `each'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/delegate.rb:341:in `block in delegating_block'
/usr/local/Homebrew/Library/Homebrew/build.rb:84:in `install'
/usr/local/Homebrew/Library/Homebrew/build.rb:189:in `<main>'

Thank you for reporting this! I have fixed the deprecation warnings but not the part of the code that caused the exception. I was able to reproduce the error up to an hour ago but now I can’t anymore. Would you mind trying it again?

brew update
brew install mrtrix3

For reference:
My current version of homebrew is 1.5.1-9-gea0af7d. The changes in homebrew a few hours ago seem unrelated. In any case, I went back to yesterday’s homebrew version 6b8502d1e1c03a0d2eeb106f8480c542dc7f7d16 and the version of the MRtrix3 formula that failed to install (19edd7f94e2090e225776f29989b74f902691831) but also that seems to work now. When I got the error, installing mrtrix3 with --debug and --verbose flags should have triggered homebrew’s debugger but it also failed to do that and bailed out as in the error message above. I suspect something must have changed in how homebrew handles exceptions but I am a bit at a loss why it is working now… :confused: