pod|pod install报错(ArgumentError - Malformed version number string)
最近使用CocoaPods的时候,在 pod install的时候出现错误:ArgumentError - Malformed version number string,详细信息如下:
相关版本信息如下:
CocoaPods : 1.5.2
Ruby : ruby 2.3.3p222 (2016-11-21 revision 56859) [universal.x86_64-darwin17]
RubyGems : 2.7.7
Host : Mac OS X 10.13.4 (17E202)
Xcode : 9.3 (9E145)
Git : git version 2.15.1 (Apple Git-101)
错误信息如下:
### Error
ArgumentError - Malformed version number string
/Library/Ruby/Site/2.3.0/rubygems/version.rb:209:in `initialize'
/Library/Ruby/Site/2.3.0/rubygems/version.rb:200:in `new'
/Library/Ruby/Site/2.3.0/rubygems/version.rb:200:in `new'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.2/lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb:123:in `embedded_content_settings'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.2/lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb:68:in `generate'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.2/lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb:39:in `save_as'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.2/lib/cocoapods/installer/xcode/pods_project_generator/target_installer.rb:112:in `update_changed_file'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.2/lib/cocoapods/installer/xcode/pods_project_generator/aggregate_target_installer.rb:96:in `block in create_xcconfig_file'
.......
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.2/lib/cocoapods/command.rb:52:in `run'
【pod|pod install报错(ArgumentError - Malformed version number string)】/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.2/bin/pod:55:in `'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `'
```
网上找了方法,在github上看到有人出现类似情况,链接:
Malformed version number string · Issue #7765 · CocoaPods/CocoaPods · GitHub
有网友回复如下:
文章图片
文章图片
前面报错信息里面有提示: Ruby : ruby 2.3.3p222 (2016-11-21 revision 56859),
我使用RVM 安装ruby 2.4.1,安装完后,再运行 pod install,问题解决,如下:
文章图片
安装步骤就不详写了,网上一搜很多的。
附上别人写的两个链接供参考:
RVM安装:cocopods卸载、安装、重装等问题解决
CocoaPods安装:iOS安装CocoaPods详细过程
推荐阅读
- Android|Android install 多个设备时指定设备
- oracle|oracle java jdk install
- 接口|axios接口报错-参数类型错误解决
- gem|gem & pod 记录
- 工程中屏蔽CocoaPods里的警告
- 打开Anaconda|打开Anaconda Navigator 时报错 error 5 拒绝访问
- 运行报错Cannot|运行报错Cannot find module '@babel/compat-data/corejs3-shipped-proposals’
- 故障分析 | MongoDB 5.0 报错 Illegal instruction 解决
- 个人日记|K8s中Pod生命周期和重启策略
- 被mybatis-generator-gui-0.6.1报错坑到的那些事(二)