ฉันเพิ่งอัพเกรดจาก Yosemite เป็น El Capitan (และจำลองปัญหาการอัพเกรดจาก El Capitan เป็น Sierra) และเมื่อฉันพยายามพิมพ์ตัวอย่างgit statusภายในเทอร์มินัลฉันได้รับข้อผิดพลาดต่อไปนี้:
xcrun: error: invalid active developer path
(/Library/Developer/CommandLineTools), missing xcrun at:
/Library/Developer/CommandLineTools/usr/bin/xcrun
ฉันไม่ได้ติดตั้ง Xcode ไม่เคยทำ ใครมีทางออก?
which gitตอบกลับไปยัง/usr/bin/gitและ "ไฟล์which git" ถึง/usr/bin/git: Mach-O 64-bit executable x86_64
xcode-select --switch path/to/Xcode.appเพื่อระบุ Xcode ที่คุณต้องการใช้สำหรับเครื่องมือผู้พัฒนาบรรทัดคำสั่ง (หรือดูman xcode-select) "วันที่ 10.11.5 วิธีการแก้ไข?
