2,删除已经安装pod版本
bogon:~ xxxxx$ sudo gem uninstall cocoapods -v 1.7.3
Remove executables:
pod, sandbox-pod
in addition to the gem? [Yn] n
Executables and scripts will remain installed.
Successfully uninstalled cocoapods-1.7.3
————————————————
3, 安装新指定版本的pod
bogon:~ xxxxxxx$ sudo gem install cocoapods -v 1.7.0 -n /usr/local/bin
Successfully installed cocoapods-1.7.0
Parsing documentation for cocoapods-1.7.0
Installing ri documentation for cocoapods-1.7.0
Done installing documentation for cocoapods after 3 seconds
1 gem installed
4,查看安装的pod的版本
bogon:~xxxxxxxx$ pod --version
---------------------------------------------
Error loading the plugin `cocoapods-static-frameworks-0.0.1`.
Gem::ConflictError - Unable to activate cocoapods-static-frameworks-0.0.1, because cocoapods-1.7.0 conflicts with cocoapods (= 1.3.1)
/Library/Ruby/Site/2.3.0/rubygems/specification.rb:2290:in `raise_if_conflicts'
/Library/Ruby/Site/2.3.0/rubygems/specification.rb:1410:in `activate'
/Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command/plugin_manager.rb:93:in `safe_activate_and_require'
/Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command/plugin_manager.rb:31:in `block in load_plugins'
/Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command/plugin_manager.rb:30:in `map'
/Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command/plugin_manager.rb:30:in `load_plugins'
/Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:326:in `block in run'
/Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:325:in `each'
/Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:325:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.0/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.0/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
---------------------------------------------
1.7.0
————————————————
网友评论