1. 程式人生 > >https://github.com/CocoaPods/CocoaPods/search?q=No+such+file+or+directory報錯解決方案

https://github.com/CocoaPods/CocoaPods/search?q=No+such+file+or+directory報錯解決方案

  1. ――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――  
  2. ### Command  
  3. ```  
  4. /Users/rwx-mac/.rvm/rubies/ruby-2.0.0-p643/bin/pod install  
  5. ```  
  6. ### Report  
  7. * What did you do?  
  8. * What did you expect to happen?  
  9. * What happened instead?  
  10. ### Stack  
  11. ```  
  12.    CocoaPods : 0.38.2  
  13.         Ruby : ruby 2.0.0p643 (2015-02-25 revision 49749) [x86_64-darwin14.4.0]  
  14.     RubyGems : 2.4.8  
  15.         Host : Mac OS X 10.10.4 (14E46)  
  16.        Xcode : 6.4 (6E35b)  
  17.          Git : git version 2.3.2 (Apple Git-55)  
  18. Ruby lib dir : /Users/rwx-mac/.rvm/rubies/ruby-2.0.0-p643/lib  
  19. Repositories : master - https://github.com/CocoaPods/Specs.git @ c046e39ccd7ec9743d07040e77f63b5d0442286e  
  20. ```  
  21. ### Plugins  
  22. ```  
  23. cocoapods-plugins : 0.4.2  
  24. cocoapods-stats   : 0.5.3  
  25. cocoapods-trunk   : 0.6.1  
  26. cocoapods-try     : 0.4.5  
  27. ```  
  28. ### Podfile  
  29. ```ruby  
  30. platform :ios, '7.0' #手機的系統  
  31. pod 'AMap3DMap' #3D 地圖 SDK   
  32. #pod 'AMap2DMap' #2D 地圖 SDK (2D 和 3D 不能同時使用用)   
  33. pod 'AMapSearch' #搜尋服務 SDK  
  34. pod "AFNetworking", "~>
     2.0"  
  35. ```  
  36. ### Error  
  37. ```  
  38. Errno::ENOENT - No such file or directory - /Users/rwx-mac/Desktop/He/HeAmap/Pods/AMapSearch/AMapSearchKit.framework/Resources  
  39. /Users/rwx-mac/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/fileutils.rb:906:in `stat'  
  40. /Users/rwx-mac/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/fileutils.rb:906:in `symbolic_modes_to_i'  
  41. /Users/rwx-mac/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/fileutils.rb:927:in `fu_mode'  
  42. /Users/rwx-mac/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/fileutils.rb:1001:in `block (2 levels) in chmod_R'  
  43. /Users/rwx-mac/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/fileutils.rb:1466:in `preorder_traverse'  
  44. /Users/rwx-mac/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/fileutils.rb:999:in `block in chmod_R'  
  45. /Users/rwx-mac/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/fileutils.rb:998:in `each'  
  46. /Users/rwx-mac/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/fileutils.rb:998:in `chmod_R'  
  47. /Users/rwx-mac/.rvm/gems/ruby-2.0.0-p643@global/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:117:in `block in prepare'  
  48. /Users/rwx-mac/.rvm/gems/ruby-2.0.0-p643@global/gems/cocoapods-0.38.2/lib/cocoapods/user_interface.rb:140:in `message'  
  49. /Users/rwx-mac/.rvm/gems/ruby-2.0.0-p643@global/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:116:in `prepare'  
  50. /Users/rwx-mac/.rvm/gems/ruby-2.0.0-p643@global/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:103:in `install!'  
  51. /Users/rwx-mac/.rvm/gems/ruby-2.0.0-p643@global/gems/cocoapods-0.38.2/lib/cocoapods/command/project.rb:71:in `run_install_with_update'  
  52. /Users/rwx-mac/.rvm/gems/ruby-2.0.0-p643@global/gems/cocoapods-0.38.2/lib/cocoapods/command/project.rb:101:in `run'  
  53. /Users/rwx-mac/.rvm/gems/ruby-2.0.0-p643@global/gems/claide-0.9.1/lib/claide/command.rb:312:in `run'  
  54. /Users/rwx-mac/.rvm/gems/ruby-2.0.0-p643@global/gems/cocoapods-0.38.2/lib/cocoapods/command.rb:48:in `run'  
  55. /Users/rwx-mac/.rvm/gems/ruby-2.0.0-p643@global/gems/cocoapods-0.38.2/bin/pod:44:in `<top (required)>'  
  56. /Users/rwx-mac/.rvm/rubies/ruby-2.0.0-p643/bin/pod:23:in `load'  
  57. /Users/rwx-mac/.rvm/rubies/ruby-2.0.0-p643/bin/pod:23:in `<main>'  
  58. ```  
  59. ――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――  
  60. [!] Oh no, an error occurred.  
  61. Search for existing GitHub issues similar to yours:  
  62. https://github.com/CocoaPods/CocoaPods/search?q=No+such+file+or+directory+-+%2FUsers%2Frwx-mac%2FDesktop%2FHe%2FHeAmap%2FPods%2FAMapSearch%2FAMapSearchKit.framework%2FResources&type=Issues
  63. If none exists, create a ticket, with the template displayed above, on:  
  64. https://github.com/CocoaPods/CocoaPods/issues/new  
  65. Be sure to first read the contributing guide for details on how to properly submit a ticket:  
  66. https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md  
  67. Don't forget to anonymize any private data!  
        昨天在使用CocoaPods時,報了這個錯誤,百思不得解,後來網上搜索,才發現這個問題應該是高德地圖跟cocoapods 版本相容的問題 。當CocoaPods 版本是0.38.2的時候,就找不到高德地圖在GitHub上面的倉庫地址。
         那我們解決這個問題的方案就是,把當前CocoaPods版本降為0.38.1就好了,或者其它版本 在終端中輸入:                              sudo gem uninstall cocoapods   (解除安裝當前的CocoaPods)

                             sudo gem install cocoapods -v 0.38.1  (安裝0.38.1版本的CocoaPods)