Homebrew install issue - xcode

I have installed xcode
xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
After this I did brew update
brew update
Already up-to-date.
Then brew doctor gave the following error
brew doctor
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: No developer tools installed.
Install the Command Line Tools:
xcode-select --install
Error: Invalid formula: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/llnode.rb
undefined method `>=' for nil:NilClass
Error: Cannot tap homebrew/core: invalid syntax in tap!
Error: Failure while executing: /usr/local/bin/brew tap homebrew/core -q
I have already re-installed homebrew but it did not help.
Pasting my brew config
brew config
HOMEBREW_VERSION: 1.2.2
ORIGIN: https://github.com/Homebrew/brew
HEAD: 54e01d76db34a3a649c79b189873bfd0a52dbc9f
Last commit: 8 days ago
Core tap: N/A
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local/Homebrew
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: quad-core 64-bit broadwell
Homebrew Ruby: 2.0.0-p648
Clang: N/A
Git: 2.11.0 => /Library/Developer/CommandLineTools/usr/bin/git
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
Java: 1.8.0_131
macOS: 10.12.4-x86_64
Xcode: N/A
CLT: N/A
X11: N/A

The issue was because of wrong xcode installation.
I reinstalled xcode and homebrew again and it worked fine.
Don't know why xcode error was not there while using it .

Related

Fixing homebrew on Mac OSX 10.13.2

Just wondering if anyone can help fix homebrew for me. It was working a minute ago...
I am trying to install new packages using Homebrew on my 2 Macbooks. Both are running High Sierra, which I suspect might be the problem due to Apple borking root permissions...
Anyway, my issue goes a little something like this:
❯❯❯ brew install git
Error: git 2.14.2 is already installed
To upgrade to 2.15.1, run `brew upgrade git`
Okay. Lets upgrade Git.
❯❯❯ brew upgrade git
==> Upgrading 1 outdated package, with result:
git 2.15.1
==> Upgrading git
==> Downloading https://homebrew.bintray.com/bottles/git-2.15.1.high_sierra.bottle.tar.gz
Error: curl is not executable
Warning: Bottle installation failed: building from source.
==> Downloading https://www.kernel.org/pub/software/scm/git/git-2.15.1.tar.xz
Error: curl is not executable
Strange. I use curl daily...
❯❯❯ curl
curl: try 'curl --help' or 'curl --manual' for more information
❯❯❯ which curl
/usr/bin/curl
❯❯❯ ls -al /usr/bin/curl
-rwxr-xr-x 1 root wheel 185104 Dec 1 15:45 /usr/bin/curl
So it exists and looks executable. Maybe the homebrew links got messed up? I will re-install curl using brew
❯❯❯ brew install curl
==> Downloading https://homebrew.bintray.com/bottles/curl-7.57.0.high_sierra.bottle.tar.gz
Error: curl is not executable
Warning: Bottle installation failed: building from source.
==> Downloading https://curl.haxx.se/download/curl-7.57.0.tar.bz2
Error: curl is not executable
So basically homebrew is not working for me. On TWO different machines running the same Mac OS version 10.13.2
NOTE: This is not limited in any way to installing git. The problem started trying to install minikube.
UPDATE
I checked my setup via brew config and noticed that although I DO have curl installed, homebrew does not see it: Curl: N/A
HOMEBREW_VERSION: 1.4.1
ORIGIN: https://github.com/Homebrew/brew
HEAD: b4d43e950fd45c24e48d6ebfd3013357abcd21a9
Last commit: 10 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 809322678d0fb7ab034348f86f0e452eff203b49
Core tap last commit: 73 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_VISUAL: nano
CPU: octa-core 64-bit haswell
Homebrew Ruby: 2.3.3 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/bin/ruby
Clang: 9.0 build 900
Git: 2.14.3 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Curl: N/A
Perl: /usr/bin/perl
Python: /usr/local/opt/python/libexec/bin/python => /usr/local/Cellar/python/2.7.14/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
Java: 1.8.0_31
macOS: 10.13.2-x86_64
Xcode: 9.2
CLT: 9.2.0.0.1.1510905681
X11: 2.7.9 => /opt/X11
The OS already has curl installed, but homebrew does not see it.
I cannot install curl using homebrew (see above).
So now the problem becomes "How do I fix homebrew so it sees curl"?
I was running into the same issue yesterday. For me it was caused by a file called curl left over from a botched command in the same directory where I was running brew. Deleting that file resolved the issue.
I had same problem and I have no idea how but I fixed it. First I uninstalled any brew-version of curl that was installed. Then, when that didn't work, I navigated to \bin\usr\curl to make sure it was still there. I then ran curl in terminal (just literally `curl' and then which curl to make sure it was using right one), and then reran brew and it seemed to work. I think what happens is that for some reason in new Mac files sometimes don't appear locally until you open them for the first time when using iCloud. Its happened before with other dependencies, where I had to navigate to file and physically open it before it would be locally downloaded and be recognized as a dependency. Not sure if Mac does same thing with curl. If so, quite dumb.
I had this same issue, also on Mac OS High Sierra. I ended up running brew uninstall curl. This gave me an error, but then when I installed Homebrew curl again, it worked and I could install git and others.
if you have tried everything and nothing helps, if you're facing permissions issues - try to re-install the Homebrew:
uninstall:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
and then install it again:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
helped in my case

Brew cannot link postgresql OSX Yosemite

The steps I followed:
brew install postgresql
Installed it but couldn't link it
Error: An unexpected error occurred during the `brew link` step
The formula built, but is not symlinked into /usr/local
No such file or directory - /usr/local/Cellar/postgresql/9.3.3/include/informix
Error: No such file or directory - /usr/local/Cellar/postgresql/9.3.3/include/informix
(ve)Hermans-MacBook-Air: hermanstander$ brew config
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew
HEAD: e04275e113a52ad1e26e2973f6d29b508ca702be
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit haswell
OS X: 10.10-x86_64
Xcode: 5.1.1
CLT: 6.0.0.0.1.1406926514
Clang: 5.1 build 503
X11: N/A
System Ruby: 2.0.0-481
Perl: /usr/bin/perl
Python: /Users/hermanstander/apps/foo/foo_app/ve/bin/python
Ruby: /usr/bin/rub
Based on a hint here that old symlinks can confuse brew link, please try brew prune; brew link postgresql and see if that resolves your issue.
9.3.3 is an old version of postgresql and I don't see the Homebrew revision you're using in the Homebrew git history? If you have brew updated recently, there is some discussion of this issue here. It's not obvious what's causing the issue (unless it's dead symlinks, discussed above) but it looks like cd /usr/local/Cellar/postgresql; cp -r 9.3.5 9.3.3 will allow brew link postgresql to work, though that's kludgey.
If you haven't updated recently, please brew rm postgresql; brew update and try again. You should be installing 9.3.5.
(I don't suppose it's causing trouble here but, incidentally, running Homebrew with an active Python virtualenv is not supported.)

"No available formula for gcc46" while installing Ruby 1.9.3 on OS X with RVM:

I have Homebrew installed, I'm trying to install RVM with:
rvm install 1.9.3-head
and I get this error:
Installing required packages:gcc46
Error running 'requirements_osx_brew_libs_install gcc46',
please read /Users/mike/.rvm/log/1384918134_ruby-1.9.3-head/package_install_gcc46.log
Requirements installation failed with status: 1
brew doctor says I'm ready to brew.
In the log I see:
Error: Download failed: ftp://gcc.gnu.org/pub/gcc/infrastructure/gmp-4.3.2.tar.bz2
Ruby 1.9.3+ supports compiling with Clang (which you do have) instead of GCC, so make RVM compile with Clang instead:
rvm install 1.9.3 --with-gcc=clang
When I upgraded to mavericks from mountain lion it somehow started ignoring my dev-tools (like gcc, etc.) try
xcode-select --install
also see here
When upgraded to OSX 10.12 and installing ruby 2.3.1 these steps fixed the issue.
brew install homebrew/versions/gcc46
if there are any linking issues related to any lib please follow the instructions for example
brew link --overwrite libtool
brew link --overwrite libgpg-error
Once the installation of gcc46 is successful you could
rvm install 2.3.1

SVN 1.8.4 libserf-1.1.3.0.dylib

After I updated SVN version on my mac using homebrew I'm getting following error:
dyld: Library not loaded: /usr/local/lib/libserf-1.1.3.0.dylib
Referenced from: /Applications/Xcode.app/Contents/Developer/usr/bin/svn
Reason: image not found
Trace/BPT trap: 5
I have no idea what libserf-1.1.3.0.dylib is and where it should be!
Any thought?
[UPDATE 01]
I tried installing serf using following:
brew install serf
and got the following error:
Error: No available formula for serf
also I checked svn dependncies on homebrew by doing brew deps svn there is no serf:
autoconf
automake
libtool
pkg-config
scons
sqlite
Got it working.
If you want the latest svn uninstall and then build from source
brew remove svn
brew install --build-from-source svn
If you want an older version (I needed 1.6.17) then follow the direction here, but replace the line that says brew install with the install command from above (don't forget to remove svn first though)
If anyone has httpd installed with brew these commands worked for me:
brew unlink httpd
brew install svn
brew link httpd
Hope this helps!

homebrew failing to install closure-compiler

It seem that my system is failing to install closure-compiler. This is whats happening with computer:
$ brew install closure-compiler
==> Checking out http://closure-compiler.googlecode.com/svn/trunk/
dyld: Library not loaded: /usr/local/lib/libsqlite3.0.8.6.dylib
Referenced from: /usr/local/bin/svn
Reason: image not found
Error: Failure while executing: svn checkout -q --force http://closure-compiler.googlecode.com/svn/trunk / /Library/Caches/Homebrew/closure-compiler--svn -r 2388
I faced a similar problem after upgrading the homebrew installed svn.
I solved it by brew rm svn serf neon and then brew install svn as suggested in https://github.com/mxcl/homebrew/issues/17172
Remember to reopen your terminal after that.

Resources