xcrun:错误:无效的活动开发者路径,zsh 更新后出现问题 [英] xcrun: error: invalid active developer path, problem after zsh update for flutter

查看:27
本文介绍了xcrun:错误:无效的活动开发者路径,zsh 更新后出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将我的 shell 更新为 zsh,当我输入 flutter --version 时,我得到了这个:

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'''

我该怎么办?我不是这些方面的专家 XD.

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

亲切的问候,

推荐答案

似乎没有设置命令行工具路径.如果你有 XCode 然后设置你需要的路径:

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

  1. 打开 XCode
  2. 打开首选项()
  3. 转到位置标签
  4. 对于命令行工具",选择当前版本

这篇关于xcrun:错误:无效的活动开发者路径,zsh 更新后出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆