10

I am using charts library and trying to run the demo. Before running I have to install the dependencies using Carthage. I goto project folder location and type in terminal:

carthage update

I got the below error:-

Carthage requires git 2.3.0 or later.

How to install Carthage decencies and run the above said demo.

enter image description here

pkc456
  • 8,350
  • 38
  • 53
  • 109

4 Answers4

26

Select Command Line Tools to the latest version of Xcode.

Xcode -> Preferences -> Locations -> Command Line Tools

Open Preferences shortcut : Command + comma + ,

Lal Krishna
  • 15,485
  • 6
  • 64
  • 84
4

Not sure if this will help, but I ran into the same issue and found out that xcodebuild is using a different Xcode that I installed.

so you can probably double check which Xcode you are using: xcode-select --print-path

Here is the original post that helped me solving this issue: Change Carthage Swift version

pkamb
  • 33,281
  • 23
  • 160
  • 191
NanDotWang
  • 41
  • 3
4

It seems like you have used another Xcode version since last time. You should set command line tool again by running the following in terminal:

sudo xcode-select -s <path to Xcode>/Contents/Developer 

for example:

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer 
Mojtaba Hosseini
  • 95,414
  • 31
  • 268
  • 278
1

It seems you have to install new version of git.

brew install git

It could say "Target /usr/local/bin/git already exists. You may want to remove it". I didn't want to remove it and decided only to overwrite:

brew link --overwrite git

It helped me with the same issue. I hope it will help to someone else.

Eridana
  • 2,418
  • 23
  • 26
  • after updating OSX i needed mailcore2, use carthage - ok installed carthage, now it says you need git, ok trying to install git - it says you need homebrew, are you kidding me? you need 10 things to get mailcore2? rediculous. – Boris Gafurov Apr 24 '17 at 17:50