Failed to extract git version from ' git --version ' xcrun: error: invalid active developer path

2018 11 05
最近 升級了一下電腦系統(tǒng) macOSMojave 10.14.1
順便升級了一下 Xcode Version 10.1 (10B61)
哭了 使用 cocosPods 集成時(shí) 報(bào)錯(cuò)

Mac:~ mac$ pod -version
Traceback (most recent call last):
    5: from /usr/local/bin/pod:23:in `<main>'
    4: from /usr/local/bin/pod:23:in `load'
    3: from /Users/mac/.rvm/gems/ruby-2.5.1@global/gems/cocoapods-1.5.3/bin/pod:55:in `<top (required)>'
    2: from /Users/mac/.rvm/rubies/ruby-2.5.1/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/command.rb:49:in `run'
    1: from /Users/mac/.rvm/rubies/ruby-2.5.1/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/command.rb:130:in `verify_minimum_git_version!'
/Users/mac/.rvm/rubies/ruby-2.5.1/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/command.rb:118:in `git_version': Failed to extract git version from `git --version` ("xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun\n") (RuntimeError)
分析:
Failed to extract git version from ' git --version ' xcrun: error: invalid active developer path

未能從 git—version 中提取 git 版本: 錯(cuò)誤: 無效的活動(dòng)開發(fā)路徑;簡單來說就是Git工具不好使了。

通常做法就是打開 terminal 執(zhí)行 xcode-select --install

但由于我是 macOS 升級 所以這樣是不行的,需要到 Git 官網(wǎng)下載 Git 才可以:

https://git-scm.com/download/mac

下載完成后手動(dòng)安裝 git 這樣就可以解決了 !

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容