美文网首页
cococpods报错:ArgumentError - Malf

cococpods报错:ArgumentError - Malf

作者: kuckyson | 来源:发表于2019-08-20 13:56 被阅读0次
    ### 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:innew'
    /Library/Ruby/Site/2.3.0/rubygems/version.rb:200:in new' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.4.0/lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb:119:inembedded_content_settings'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.4.0/lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb:64:in generate' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.4.0/lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb:39:insave_as'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.4.0/lib/cocoapods/installer/xcode/pods_project_generator/target_installer.rb:114:in update_changed_file' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.4.0/lib/cocoapods/installer/xcode/pods_project_generator/aggregate_target_installer.rb:87:inblock in create_xcconfig_file'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.4.0/lib/cocoapods/installer/xcode/pods_project_generator/aggregate_target_installer.rb:84:in each' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.4.0/lib/cocoapods/installer/xcode/pods_project_generator/aggregate_target_installer.rb:84:increate_xcconfig_file'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.4.0/lib/cocoapods/installer/xcode/pods_project_generator/aggregate_target_installer.rb:18:in block in install!' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.4.0/lib/cocoapods/user_interface.rb:142:inmessage'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.4.0/lib/cocoapods/installer/xcode/pods_project_generator/aggregate_target_installer.rb:14:in install!' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.4.0/lib/cocoapods/installer/xcode/pods_project_generator.rb:175:inblock (2 levels) in install_libraries'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.4.0/lib/cocoapods/installer/xcode/pods_project_generator.rb:173:in each' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.4.0/lib/cocoapods/installer/xcode/pods_project_generator.rb:173:inblock in install_libraries'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.4.0/lib/cocoapods/user_interface.rb:142:in message' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.4.0/lib/cocoapods/installer/xcode/pods_project_generator.rb:167:ininstall_libraries'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.4.0/lib/cocoapods/installer/xcode/pods_project_generator.rb:65:in generate!' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.4.0/lib/cocoapods/installer.rb:184:inblock in generate_pods_project'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.4.0/lib/cocoapods/user_interface.rb:64:in section' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.4.0/lib/cocoapods/installer.rb:183:ingenerate_pods_project'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.4.0/lib/cocoapods/installer.rb:119:in install!' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.4.0/lib/cocoapods/command/install.rb:41:inrun'
    /Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:334:in run' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.4.0/lib/cocoapods/command.rb:52:inrun'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.4.0/bin/pod:55:in <top (required)>' /usr/local/bin/pod:23:inload'
    /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=Malformed+version+number+string+&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...
    Could not access the GitHub API, you may have better luck via the website.
    https://github.com/cocoapods/cocoapods/search?q=Malformed%20version%20number%20string%20&type=Issues&utf8=✓
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.4.0/lib/cocoapods/user_interface/inspector_reporter.rb:74:in `inspector_could_not_create_report': undefined method `name' for #<Net::OpenTimeout: Net::OpenTimeout> (NoMethodError)
        from /Library/Ruby/Gems/2.3.0/gems/gh_inspector-1.1.3/lib/gh_inspector/sidekick.rb:30:in `rescue in search'
        from /Library/Ruby/Gems/2.3.0/gems/gh_inspector-1.1.3/lib/gh_inspector/sidekick.rb:27:in `search'
        from /Library/Ruby/Gems/2.3.0/gems/gh_inspector-1.1.3/lib/gh_inspector/inspector.rb:68:in `search_query'
        from /Library/Ruby/Gems/2.3.0/gems/gh_inspector-1.1.3/lib/gh_inspector/inspector.rb:62:in `search_exception'
        from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.4.0/lib/cocoapods/user_interface/error_report.rb:119:in `search_for_exceptions'
        from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.4.0/lib/cocoapods/command.rb:67:in `report_error'
        from /Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:396:in `handle_exception'
        from /Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:337:in `rescue in run'
        from /Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:324:in `run'
        from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.4.0/lib/cocoapods/command.rb:52:in `run'
        from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.4.0/bin/pod:55:in `<top (required)>'
        from /usr/local/bin/pod:23:in `load'
        from /usr/local/bin/pod:23:in `<main>'
    

    解决办法:
    gem 2.7.7 can not run cocoapods 1.3.x . 1.4.x
    you should install rubygem in 2.7.6
    please:
    gem install rubygems-update -v 2.7.6
    and
    update_rubygems

    then
    pod install or pod update

    如果你的电脑收到管制,没有写入 /usr/bin 路径的权限
    执行sudo gem update --system 2.3.0 -n /usr/local/bin

    2.7.6版本的安装可能会报:
    ERROR: While executing gem ... (Errno::EPERM)
    Operation not permitted @ rb_sysopen - /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/gem
    而安装2.3.0版本没有问题

    issues链接:
    https://github.com/CocoaPods/CocoaPods/issues/7765

    相关文章

      网友评论

          本文标题:cococpods报错:ArgumentError - Malf

          本文链接:https://www.haomeiwen.com/subject/aaqpsctx.html