這篇文章主要介紹CocoaPods中出現(xiàn)LoadError - cannot load such file -- nanaimo錯(cuò)誤怎么辦,文中介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們一定要看完!
創(chuàng)新互聯(lián)2013年開創(chuàng)至今,是專業(yè)互聯(lián)網(wǎng)技術(shù)服務(wù)公司,擁有項(xiàng)目成都網(wǎng)站制作、成都網(wǎng)站設(shè)計(jì)網(wǎng)站策劃,項(xiàng)目實(shí)施與項(xiàng)目整合能力。我們以讓每一個(gè)夢想脫穎而出為使命,1280元循化做網(wǎng)站,已為上家服務(wù),為循化各地企業(yè)和個(gè)人服務(wù),聯(lián)系電話:028-86922220
CocoaPods 出現(xiàn)LoadError - cannot load such file -- nanaimo錯(cuò)誤解決辦法
如果經(jīng)常使用 CocoaPods 進(jìn)行個(gè)人類庫的提交和更新,那么肯定會遇到這樣的一個(gè)錯(cuò)誤。如題:LoadError - cannot load such file -- nanaimo,翻譯過來就是 LoadError - 無法加載此類文件 - nanaimo。該錯(cuò)誤產(chǎn)生的時(shí)機(jī)一般是在驗(yàn)證 .podspec 文件的時(shí)候。具體的錯(cuò)誤呈現(xiàn)形式是這樣的:
benpaobaodeiMac-2:WZYUnlimitedScrollView bpb$ pod lib lint -> WZYUnlimitedScrollView ――― MARKDOWN TEMPLATE ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― ### Command ``` /usr/local/bin/pod lib lint ``` ### Report * What did you do? * What did you expect to happen? * What happened instead? ### Stack ``` CocoaPods : 1.2.0.beta.1 Ruby : ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16] RubyGems : 2.0.14.1 Host : Mac OS X 10.12.1 (16B2555) Xcode : 8.2.1 (8C1002) Git : git version 2.10.1 (Apple Git-78) Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib Repositories : master - https://github.com/CocoaPods/Specs.git @ 3d3d5f5d2fbb80e043adfd3ad3357a10845cf349 ``` ### Plugins ``` cocoapods-deintegrate : 1.0.1 cocoapods-plugins : 1.0.0 cocoapods-search : 1.0.0 cocoapods-stats : 1.0.0 cocoapods-trunk : 1.1.1 cocoapods-try : 1.1.0 ``` ### Error ``` LoadError - cannot load such file -- nanaimo /Library/Ruby/Gems/2.0.0/gems/xcodeproj-1.4.1/lib/xcodeproj/project.rb:353:in `block in save' /Library/Ruby/Gems/2.0.0/gems/xcodeproj-1.4.1/lib/xcodeproj/project.rb:353:in `open' /Library/Ruby/Gems/2.0.0/gems/xcodeproj-1.4.1/lib/xcodeproj/project.rb:353:in `save' /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0.beta.1/lib/cocoapods/validator.rb:412:in `create_app_project' /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0.beta.1/lib/cocoapods/validator.rb:300:in `block in perform_extensive_analysis' /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0.beta.1/lib/cocoapods/validator.rb:295:in `each' /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0.beta.1/lib/cocoapods/validator.rb:295:in `perform_extensive_analysis' /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0.beta.1/lib/cocoapods/validator.rb:79:in `validate' /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0.beta.1/lib/cocoapods/command/lib/lint.rb:62:in `block in run' /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0.beta.1/lib/cocoapods/command/lib/lint.rb:50:in `each' /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0.beta.1/lib/cocoapods/command/lib/lint.rb:50:in `run' /Library/Ruby/Gems/2.0.0/gems/claide-1.0.1/lib/claide/command.rb:334:in `run' /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0.beta.1/lib/cocoapods/command.rb:50:in `run' /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0.beta.1/bin/pod:55:in `<top (required)>' /usr/local/bin/pod:23:in `load' /usr/local/bin/pod:23:in `<main>' ``` ――― TEMPLATE END ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― [!] Oh no, an error occurred. Search for existing GitHub issues similar to yours: https://github.com/CocoaPods/CocoaPods/search?q=cannot+load+such+file+--+nanaimo&type=Issues If none exists, create a ticket, with the template displayed above, on: https://github.com/CocoaPods/CocoaPods/issues/new Be sure to first read the contributing guide for details on how to properly submit a ticket: https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md Don't forget to anonymize any private data! Looking for related issues on cocoapods/cocoapods... - LoadError - cannot load such file -- nanaimo https://github.com/CocoaPods/CocoaPods/issues/6281 [closed] [12 comments] 2 days ago - help! cannot load such file -- nanaimo https://github.com/CocoaPods/CocoaPods/issues/6312 [closed] [6 comments] 6 weeks ago - LoadError - cannot load such file -- nanaimo https://github.com/CocoaPods/CocoaPods/issues/6214 [closed] [30 comments] 4 weeks ago and 10 more at: https://github.com/cocoapods/cocoapods/search?q=cannot%20load%20such%20file%20--%20nanaimo&type=Issues&utf8=?
上述錯(cuò)誤,可以有兩種方式進(jìn)行解決。大家可以分別嘗試,總有一種適合你。
方式一,重新安裝 CocoaPods 的類庫。
先清空 CocoaPods 的緩存:
$ sudo rm -rf ~/.cocoapods/repos/master $ sudo rm -fr ~/Library/Caches/CocoaPods/
再重新安裝 CocoaPods 的類庫:
$ pod setup
注意,細(xì)心的童鞋可能發(fā)現(xiàn)。上面兩行清楚緩存的語句不太一樣。分別是 rm -rf 和 rm -fr,它們其實(shí)是沒有區(qū)別的,表示強(qiáng)制(f:不提示)刪除文件和目錄(r:刪除)
但方式一可能用起來不會那么順暢,該錯(cuò)誤產(chǎn)生的大多數(shù)原因還是應(yīng)該用方式二來解決。
方式二,對 nanaimo 進(jìn)行刪除并重新加載
$ sudo gem uninstall nanaimo $ sudo gem install nanaimo
運(yùn)行上面兩行代碼的結(jié)果:
benpaobaodeiMac-2:WZYUnlimitedScrollView bpb$ sudo gem uninstall nanaimo Password: Select gem to uninstall: 1. nanaimo-0.2.2 2. nanaimo-0.2.3 3. All versions > 3 Successfully uninstalled nanaimo-0.2.2 You have requested to uninstall the gem: nanaimo-0.2.3 xcodeproj-1.4.1 depends on nanaimo (~> 0.2.0) If you remove this gem, these dependencies will not be met. Continue with Uninstall? [yN] y Successfully uninstalled nanaimo-0.2.3 benpaobaodeiMac-2:WZYUnlimitedScrollView bpb$ sudo gem install nanaimo Fetching: nanaimo-0.2.3.gem (100%) Successfully installed nanaimo-0.2.3 Parsing documentation for nanaimo-0.2.3 Installing ri documentation for nanaimo-0.2.3 1 gem installed
以上是“CocoaPods中出現(xiàn)LoadError - cannot load such file -- nanaimo錯(cuò)誤怎么辦”這篇文章的所有內(nèi)容,感謝各位的閱讀!希望分享的內(nèi)容對大家有幫助,更多相關(guān)知識,歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道!
網(wǎng)站題目:CocoaPods中出現(xiàn)LoadError-cannotloadsuchfile--nanaimo錯(cuò)誤怎么辦
分享地址:http://www.rwnh.cn/article22/igjjcc.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)頁設(shè)計(jì)公司、App開發(fā)、服務(wù)器托管、搜索引擎優(yōu)化、App設(shè)計(jì)、Google
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)