20161209pod search 'fmdb'提示[!] Unable to find a pod with name, author, summary, or description matching `fmdb`


從SVN上更新工程之后運行工程提示錯誤:

The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.`
平時只要在終端輸入pod install就好,但是今天卻出錯了,提示[!] Unable to find a specification for `FMDB`


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

接着我就輸入pod setup手動安裝,先出現Setting up CocoaPods master repo,但是它又提示錯誤:

fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
  $ /usr/bin/git -C /Users/lv/.cocoapods/repos/master pull --ff-only

真的是無語了,然后在github上找到了答案.

先移除掉本地的master,在終端輸入pod repo remove master

 

然后轉到路徑下,在終端輸入cd ~/.cocoapods/repos

再把github上的spec下載下來,替換路徑~/.cocoapods/repos目錄下的master

接着在終端輸入命令:git clone --depth 1 https://github.com/CocoaPods/Specs.git master,等待下載完畢

OK,現在再執行pod install --no-repo-update就能夠正確更新這些第三方庫了.

 

但是再次輸入pod search fmdb依然是提示找不到,是因為之前pod search的時候生成了search_index.json,把它刪除掉即可輸入命令:rm ~/Library/Caches/CocoaPods/search_index.json回車

然后再次輸入pod search fmdb會提示

Creating search index for spec repo 'master'..

然后等待即可,最終會出現相關的第三方庫,並顯示

Creating search index for spec repo 'master'.. Done!

 

整個過程參考了以下資源,感謝🙏

http://blog.cocoachina.com/article/29127

http://www.jianshu.com/p/799ff45805f2

http://stackoverflow.com/questions/21022638/pod-install-is-staying-on-setting-up-cocoapods-master-repo

 

 

 

 




免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM