1. 导入三方库执行Pod install时报错
――― MARKDOWN TEMPLATE
### Command
/usr/local/bin/pod install
### 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.6.7
Host : Mac OS X 10.12.5 (16F73)
Xcode : 8.3.3 (8E3004b)
Git : git version 2.11.0 (Apple Git-81)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 033bfb8a9065f07e830ddc4009cbe574abea024f
### Plugins
cocoapods-deintegrate : 1.0.1
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-stats : 1.0.0
cocoapods-trunk : 1.2.0
cocoapods-try : 1.1.0
### Podfile
ruby
target 'Talk' do
pod 'RongCloudIM/IMLib','~2.8.3'
pod 'RongCloudIM/IMKit','2.8.3'
end
### Error
ArgumentError - Illformed requirement `"~2.8.3"`
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.2.1/lib/cocoapods-core/requirement.rb:63:in `parse'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.2.1/lib/cocoapods-core/requirement.rb:88:in `block in initialize'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.2.1/lib/cocoapods-core/requirement.rb:88:in `map!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.2.1/lib/cocoapods-core/requirement.rb:88:in `initialize'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.2.1/lib/cocoapods-core/requirement.rb:34:in `new'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.2.1/lib/cocoapods-core/requirement.rb:34:in `create'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.2.1/lib/cocoapods-core/dependency.rb:116:in `initialize'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.2.1/lib/cocoapods-core/podfile/target_definition.rb:750:in `new'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.2.1/lib/cocoapods-core/podfile/target_definition.rb:750:in `block in pod_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.2.1/lib/cocoapods-core/podfile/target_definition.rb:746:in `map'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.2.1/lib/cocoapods-core/podfile/target_definition.rb:746:in `pod_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.2.1/lib/cocoapods-core/podfile/target_definition.rb:95:in `non_inherited_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.2.1/lib/cocoapods-core/podfile/target_definition.rb:73:in `dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.2.1/lib/cocoapods-core/podfile.rb:90:in `map'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.2.1/lib/cocoapods-core/podfile.rb:90:in `dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.1/lib/cocoapods/installer/analyzer.rb:821:in `sources'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.1/lib/cocoapods/installer.rb:143:in `resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.1/lib/cocoapods/installer.rb:110:in `install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.1/lib/cocoapods/command/install.rb:41:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.1/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:22:in `load'
/usr/local/bin/pod:22:in `<main>'
――― TEMPLATE END
[!] Oh no, an error occurred.
Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=Illformed+requirement+%60%22%7E2.8.3%22%60&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...
Found no similar issues. To create a new issue, please visit:
https://github.com/cocoapods/cocoapods/issues/new
解决方法:
$ sudo rm -rf ~/.cocoapods/repos/master
$ pod setup