Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

xcrun: error: invalid active developer path, problem after zsh update for flutter

I updated my shell to zsh and when I type flutter --version I get this:

'''xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools),   
missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Failed to find the latest git commit date: VersionCheckError: Command exited
with code 1: git -c log.showSignature=false log -n 1 --pretty=format:%ad
--date=iso
Standard out: 
Standard error: xcrun: error: invalid active developer path
(/Library/Developer/CommandLineTools), missing xcrun at:
/Library/Developer/CommandLineTools/usr/bin/xcrun

Returning 1970-01-01 01:00:00.000 instead.
Flutter 0.0.0-unknown • channel unknown • unknown source
Framework • revision  () • 1970-01-01 01:00:00.000
Engine • revision b8752bbfff
Tools • Dart 2.10.2'''

WHAT SHOULD I DO? I'm not an expert in these things XD.

Kind regards,

like image 590
giannik28 Avatar asked Nov 28 '22 02:11

giannik28


2 Answers

The error messages seem to be about Xcode CLI tools? If so, try these commands to reset it:

xcode-select --install
sudo xcode-select -s /Library/Developer/CommandLineTools/
like image 123
HappyFace Avatar answered Dec 05 '22 13:12

HappyFace


It looks like the Command Line tools path is not set. If you have XCode then to setup the path you need to:

  1. Open XCode
  2. Open Preferences (,)
  3. Go to Locations tab
  4. For “Command Line Tools” select the current version screenshot showing preference
like image 41
Faisal Afroz Avatar answered Dec 05 '22 15:12

Faisal Afroz