0
I am trying to install Homebrew with this commands:
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
# Add Homebrews binary path to the front of the $PATH
echo 'export PATH=/usr/local/bin:$PATH' >> ~/.bash_profile
source ~/.bash_profile
And everything seems to work, but when I verify it with
brew doctor
I get this error:
Error: No such file or directory - /Library/Developer/CommandLineTools/usr/bin/clang
I have been researching into it, and it looks a problem that appeared in OSX 10.10, that I am not using. What can the problem be?
Incidentally I was trying to make Ruby on rails work with clang instead of gcc (since it wasn't working with the latter), so the issue appeared after the reinstall. Is there some configuration that I can use to switch back to gcc?
Edit 1:
When I run
xcodebuild -find clang
I get
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
When I run
which clang
I get
/usr/bin/clang
Running
locate clang | egrep clang$
I get
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang
/System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/science/mpich/files/mpich-clang
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/science/mpich/files/mpich-devel-clang
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/science/openmpi/files/openmpi-clang
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/science/openmpi/files/openmpi-devel-clang
/usr/bin/clang
/usr/local/Library/ENV/4.3/clang
Then I tried to go to the developer site and download the Xcode Command Line Tools and reinstall it. Then the installation went through.
So, I continued with:
brew update
brew install rbenv ruby-build rbenv-gem-rehash
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
source ~/.bash_profile
rbenv install 2.1.2
rbenv rehash
rbenv global 2.1.2
gem install bundler
And the last command gave this output:
ERROR: Loading command: install (LoadError)
cannot load such file -- zlib
ERROR: While executing gem ... (NoMethodError)
undefined method `invoke_with_build_args' for nil:NilClass
That I assume meaning that zlib is not installed on the system.
I tried to figure out a way to install it, but homebrew doesn't find it. Any idea?
Do you have xCode installed and working? Does brew give any more errors, or only the one line that's in your question? – agtoever – 2014-08-17T19:00:37.157
Yes, xcode is installed. and that is the only line – MaPi – 2014-08-17T19:20:32.503
What's the output of 'xcodebuild -find clang' and 'which clang' and 'locate clang | egrep clang$'? Do you have the Xcode Command Line Tools installed (if not: install them)? Actually only the latter is needed for brew (not the entire Xcode)... – agtoever – 2014-08-17T19:33:19.740
I updated my post – MaPi – 2014-08-18T06:28:18.550
Ruby can't find zlib. Do you have RVM installed? Try installing zlib using RVM. See this SO question: http://stackoverflow.com/questions/16821033/cannot-load-such-file-zlib
– agtoever – 2014-08-18T07:21:40.153