SoFunction
Updated on 2025-04-08

LoadError appears in CocoaPods - cannot load such file -- nanomo error solution

LoadError appears in CocoaPods - cannot load such file -- nanomo error solution

If you use CocoaPods frequently to commit and update personal libraries, you will definitely encounter such an error. As the title: LoadError - cannot load such file -- nanaimo, translated as LoadError - This type of file cannot be loaded - nanaimo. The time for this error is usually when verifying the .podspec file. The specific error presentation form is as follows:

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..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//Versions/2.0/usr/lib 
Repositories : master - /CocoaPods/ @ 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/:353:in `block in save' 
/Library/Ruby/Gems/2.0.0/gems/xcodeproj-1.4.1/lib/xcodeproj/:353:in `open' 
/Library/Ruby/Gems/2.0.0/gems/xcodeproj-1.4.1/lib/xcodeproj/:353:in `save' 
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2..1/lib/cocoapods/:412:in `create_app_project' 
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2..1/lib/cocoapods/:300:in `block in perform_extensive_analysis' 
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2..1/lib/cocoapods/:295:in `each' 
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2..1/lib/cocoapods/:295:in `perform_extensive_analysis' 
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2..1/lib/cocoapods/:79:in `validate' 
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2..1/lib/cocoapods/command/lib/:62:in `block in run' 
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2..1/lib/cocoapods/command/lib/:50:in `each' 
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2..1/lib/cocoapods/command/lib/:50:in `run' 
/Library/Ruby/Gems/2.0.0/gems/claide-1.0.1/lib/claide/:334:in `run' 
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2..1/lib/cocoapods/:50:in `run' 
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2..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: 
/CocoaPods/CocoaPods/search?q=cannot+load+such+file+--+nanaimo&type=Issues 
 
If none exists, create a ticket, with the template displayed above, on: 
/CocoaPods/CocoaPods/issues/new 
 
Be sure to first read the contributing guide for details on how to properly submit a ticket: 
/CocoaPods/CocoaPods/blob/master/ 
 
Don't forget to anonymize any private data! 
 
Looking for related issues on cocoapods/cocoapods... 
 - LoadError - cannot load such file -- nanaimo 
  /CocoaPods/CocoaPods/issues/6281 [closed] [12 comments] 
  2 days ago 
 
 - help!  cannot load such file -- nanaimo 
  /CocoaPods/CocoaPods/issues/6312 [closed] [6 comments] 
  6 weeks ago 
 
 - LoadError - cannot load such file -- nanaimo 
  /CocoaPods/CocoaPods/issues/6214 [closed] [30 comments] 
  4 weeks ago 
 
and 10 more at: 
/cocoapods/cocoapods/search?q=cannot%20load%20such%20file%20--%20nanaimo&type=Issues&utf8=✓ 

There are two ways to solve the above error. You can try it separately, there is always one that suits you.

Method 1: Reinstall the CocoaPods class library.

First clear the cache of CocoaPods:

$ sudo rm -rf ~/.cocoapods/repos/master 
$ sudo rm -fr ~/Library/Caches/CocoaPods/ 

Then reinstall the CocoaPods class library:

$ pod setup 

Note that careful children's shoes may be found. The above two lines clearly cached statements are different. They are rm -rf and rm -fr, they are actually indistinguishable, indicating that (f: no prompt) delete files and directories (r: delete)

But Method 1 may not be so smooth to use, and most of the reasons for this error should be solved by Method 2.

Method 2: Delete and reload nanaimo

$ sudo gem uninstall nanaimo 
$ sudo gem install nanaimo 

The result of running the above two lines of code:

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. (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 

Thank you for reading, I hope it can help you. Thank you for your support for this site!