Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error Message "Xcode alone is not sufficient on Sierra"

I'd like to install openCV to vectorize image, but there's a series error message regarding Xcode and Ruby.

First, I use terminal to install openCV, brew install opencv.

Then, I got error message indicating that the system doesn't like my ruby version.

/usr/local/Homebrew/Library/Homebrew/brew.rb:12:in `<main>':  Homebrew must be run under Ruby 2.3! You're running 2.0.0. (RuntimeError) 

So, I want to upgrade my ruby. I followed several update strategy from this post. First ruby upgrade trial: brew link --overwrite ruby & brew unlink ruby && brew link ruby and get

Error: No such keg: /usr/local/Cellar/ruby 

Then second ruby upgrade trial: brew upgrade ruby and see the following error message.

Error: Xcode alone is not sufficient on Sierra. Install the Command Line Tools: xcode-select --install  

This error message means I need to install Xcode which I already install. So, I check my Xcode status with code-select -p and get /Applications/Xcode.app/Contents/Developer which means I am fine.

I saw a comment regarding where you install python could be a big issue. Quote from the source:

If you see /usr/local/bin/python3 then you are correctly using the Homebrew version of Python. If the output is instead /usr/bin/python3 then you are incorrectly using the system version of Python.

I check which python3 and get

/Users/******/anaconda3/bin/python3 

Could this be the problem? How can I change system version to local?

like image 746
Ying Avatar asked Nov 23 '17 16:11

Ying


2 Answers

Let me explain this myself so people won't make the same mistakes.

When I saw the last line of the error message

Error: Xcode alone is not sufficient on Sierra. Install the Command Line Tools: xcode-select --install  

My thought was: I already have Xcode why the system ask me to "reinstall" it. However, thanks for @SamiKuhmonen @ Beartech @patrick kuang suggestion, I search a page (in Mandarin). xcode-select --install does not reinstall the whole Xcode. It means install some missing command line tools which is required by installing Ruby.

like image 96
Ying Avatar answered Sep 18 '22 13:09

Ying


Trying to install k8s package via brew , I just got the same issue a while ago saying in the terminal :

Error: Xcode alone is not sufficient on Sierra.

Install the Command

Line Tools: xcode-select --install

You need to download *.dmg file; named Command Line Tools (macOS x.x.x) for XCode N . Search on it here : https://developer.apple.com/download/more/ . You must have developer account. enter image description here

Then, congrats! 🎉

update for 2019

macOS Mojave 10.14.5

Use Xcode10.2 for macOS 10.14

enter image description here

like image 26
Abdennour TOUMI Avatar answered Sep 21 '22 13:09

Abdennour TOUMI