原文地址 :https://www.cnblogs.com/i-am-lvjiazhen/p/6148703.html
從SVN上更新工程之后運(yùn)行工程提示錯(cuò)誤:
Thesandbox is not in sync with thePodfile.lock.Run'pod install'or update yourCocoaPodsinstallation.`
平時(shí)只要在終端輸入pod install就好,但是今天卻出錯(cuò)了,提示[!] Unable to find a specification for `FMDB`

然后我在終端輸入pod search fmdb,結(jié)果竟然提示:[!] Unable to find a pod with name, author, summary, or description matching `fmdb`

接著我就輸入pod setup手動(dòng)安裝,先出現(xiàn)Setting up CocoaPods master repo,但是它又提示錯(cuò)誤:
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git [...] -- [...]'
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git [...] -- [...]'
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git [...] -- [...]'
$ /usr/bin/git -C /Users/lv/.cocoapods/repos/master pull --ff-only

真的是無(wú)語(yǔ)了,然后在github上找到了答案.
先移除掉本地的master,在終端輸入pod repo remove master

然后轉(zhuǎn)到路徑下,在終端輸入cd?~/.cocoapods/repos
再把github上的spec下載下來(lái),替換路徑~/.cocoapods/repos目錄下的master
接著在終端輸入命令:git clone --depth 1 https://github.com/CocoaPods/Specs.git master,等待下載完畢

OK,現(xiàn)在再執(zhí)行pod install --no-repo-update就能夠正確更新這些第三方庫(kù)了.

但是再次輸入pod search fmdb依然是提示找不到,是因?yàn)橹皃od search的時(shí)候生成了search_index.json,把它刪除掉即可輸入命令:rm ~/Library/Caches/CocoaPods/search_index.json回車(chē)
然后再次輸入pod search fmdb會(huì)提示
Creating search index for spec repo 'master'..
然后等待即可,最終會(huì)出現(xiàn)相關(guān)的第三方庫(kù),并顯示
Creating search index for spec repo 'master'.. Done!
