Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

R and julia won't start after upgrade (perhaps gcc 5.1, Xcode 6.3.2, or Command Line Tools 6.3) #39929

Closed
bmwilly opened this issue May 20, 2015 · 3 comments

Comments

@bmwilly
Copy link

bmwilly commented May 20, 2015

When opening a new terminal:

Warning: error initializing module LinAlg:
ErrorException("error compiling __init__: error compiling check_blas: error compiling openblas_get_config: could not load module libopenblas: dlopen(libopenblas.dylib, 1): Library not loaded: /usr/local/lib/gcc/4.9/libgfortran.3.dylib
  Referenced from: /usr/local/opt/openblas-julia/lib/libopenblas.dylib
  Reason: image not found")
~ $

When trying to star R:

~ $ r
dyld: Library not loaded: /usr/local/lib/gcc/4.9/libgfortran.3.dylib
  Referenced from: /usr/local/Cellar/r/3.2.0/R.framework/Versions/3.2/Resources/lib/libR.dylib
  Reason: image not found
Trace/BPT trap: 5

I have both gcc and gcc49 installed. Interestingly, the file /usr/local/lib/gcc/5/libgfortran.3.dylib exists but /usr/local/lib/gcc/4.9/libgfortran.3.dylib does not.

I tried brew reinstall $(brew deps gcc) and brew reinstall $(brew deps r) with no luck.

I also tried removing gcc and R and brew install --build-from-source r with no luck.

Output of brew doctor:

~ $ brew dr
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!

Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.

Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:

  /Users/bwilliams/anaconda/bin/curl-config
  /Users/bwilliams/anaconda/bin/freetype-config
  /Users/bwilliams/anaconda/bin/libdynd-config
  /Users/bwilliams/anaconda/bin/libpng-config
  /Users/bwilliams/anaconda/bin/libpng15-config
  /Users/bwilliams/anaconda/bin/llvm-config
  /Users/bwilliams/anaconda/bin/python-config
  /Users/bwilliams/anaconda/bin/python2-config
  /Users/bwilliams/anaconda/bin/python2.7-config
  /Users/bwilliams/anaconda/bin/xml2-config
  /Users/bwilliams/anaconda/bin/xslt-config

Output of brew config

~ $ brew config
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew.git
HEAD: ae8827439e7664d4cad7d66e5c78ea86da21b777
Last commit: 2 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: 8-core 64-bit haswell
OS X: 10.10.3-x86_64
Xcode: 6.3.2
CLT: 6.3.2.0.1.1431401888
Clang: 6.1 build 602
X11: 2.7.7 => /opt/X11
System Ruby: 2.0.0-p481
Perl: /usr/bin/perl
Python: /Users/bwilliams/anaconda/bin/python => /Users/bwilliams/anaconda/bin/python2.7
Ruby: /Users/bwilliams/.rvm/rubies/ruby-2.2.2/bin/ruby
Java: 1.8.0_25
@mistydemeo
Copy link
Member

The gcc formula in the main repository was recently (yesterday) bumped to version 5. The gcc49 formula can provide these libraries, but it doesn't install fortran by defualt. Try brew reinstall gcc49 --with-fortran - does that fix it?

@bmwilly
Copy link
Author

bmwilly commented May 20, 2015

Yes! Thank you @mistydemeo for your quick and helpful response.

@bmwilly bmwilly closed this as completed May 20, 2015
@dvdplm
Copy link

dvdplm commented Nov 15, 2015

If anyone coming through here with similar issues, I had gfortran installed and it apparently conflicts with the gcc install that now contains fortran. To fix: brew remove gfortran and brew reinstall gcc --with-fortran.

@Homebrew Homebrew locked and limited conversation to collaborators Jun 7, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants