#cocoapods in macOS Sierra 一些问题

#cocoapods in macOS Sierra 一些问题
##打开终端


##卸载之前的cocoapods `sudo gem uninstall cocoapods`


Last login: Sat Nov 19 10:54:24 on ttys006
Goobird-JackdeiMac:~ goobird-jack$ sudo gem uninstall cocoapods
Password:


Select gem to uninstall:
 1. cocoapods-1.0.1
 2. cocoapods-1.1.0.beta.1
 3. All versions
> 3
Successfully uninstalled cocoapods-1.0.1
Remove executables:
pod, sandbox-pod


in addition to the gem? [Yn]  yes
Removing pod
Removing sandbox-pod
Successfully uninstalled cocoapods-1.1.0.beta.1


##下面是我在安装过程中遇到的问题  据说https://ruby.taobao.org已经不维护了  所以我换成了 原生的源 https://rubygems.org 开启vpn下载 现在也可以换成 https://gems.ruby-china.org(没试过) 更换的时候要特别注意 url后面有没有 "/"


Goobird-JackdeiMac:~ goobird-jack$ sudo gem install -n /usr/local/bin cocoapods
ERROR:  While executing gem ... (Gem::DependencyError)
    Unable to resolve dependencies: cocoapods requires cocoapods-core (= 1.1.1), cocoapods-downloader (< 2.0, >= 1.1.2), cocoapods-trunk (< 2.0, >= 1.1.1), xcodeproj (< 2.0, >= 1.3.3)
Goobird-JackdeiMac:~ goobird-jack$ gem sources
*** CURRENT SOURCES ***


https://ruby.taobao.org
Goobird-JackdeiMac:~ goobird-jack$ gem sources -l
*** CURRENT SOURCES ***


https://ruby.taobao.org
Goobird-JackdeiMac:~ goobird-jack$ sudo gem install cocoapods
ERROR:  While executing gem ... (Gem::DependencyError)
    Unable to resolve dependencies: cocoapods requires cocoapods-core (= 1.1.1), cocoapods-downloader (< 2.0, >= 1.1.2), cocoapods-trunk (< 2.0, >= 1.1.1), xcodeproj (< 2.0, >= 1.3.3)
Goobird-JackdeiMac:~ goobird-jack$ gem help
RubyGems is a sophisticated package manager for Ruby.  This is a
basic help message containing pointers to more information.


  Usage:
    gem -h/--help
    gem -v/--version
    gem command [arguments...] [options...]


  Examples:
    gem install rake
    gem list --local
    gem build package.gemspec
    gem help install


  Further help:
    gem help commands            list all 'gem' commands
    gem help examples            show some examples of usage
    gem help platforms           show information about platforms
    gem help <COMMAND>           show help on COMMAND
                                   (e.g. 'gem help install')
    gem server                   present a web page at
                                 http://localhost:8808/
                                 with info about installed gems
  Further information:
    http://guides.rubygems.org
Goobird-JackdeiMac:~ goobird-jack$ gem sources -l
*** CURRENT SOURCES ***


https://ruby.taobao.org
Goobird-JackdeiMac:~ goobird-jack$ gem --remove https://ruby.taobao.org
ERROR:  Invalid option: --remove.  See 'gem --help'.
Goobird-JackdeiMac:~ goobird-jack$ gem sources --add https://gems.ruby-china.org/ --remove https://taobao.org/
https://gems.ruby-china.org/ added to sources
source https://taobao.org/ not present in cache
Goobird-JackdeiMac:~ goobird-jack$ gem sources -l
*** CURRENT SOURCES ***


https://ruby.taobao.org
https://gems.ruby-china.org/
Goobird-JackdeiMac:~ goobird-jack$ gem update --system
Updating rubygems-update
Fetching: rubygems-update-2.6.7.gem (100%)
ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
Goobird-JackdeiMac:~ goobird-jack$ gem install cocoapods -v 1.1.0
ERROR:  Could not find a valid gem 'cocoapods' (= 1.1.0) in any repository
ERROR:  Possible alternatives: cocoapods
Goobird-JackdeiMac:~ goobird-jack$ sudo gem install cocoapods -v 1.1.0
Password:
ERROR:  Could not find a valid gem 'cocoapods' (= 1.1.0) in any repository
ERROR:  Possible alternatives: cocoapods
Goobird-JackdeiMac:~ goobird-jack$ sudo gem install cocoapods
ERROR:  Could not find a valid gem 'cocoapods' (>= 0), here is why:
          Unable to download data from https://ruby.taobao.org - too many connection resets (https://gems-ruby-china.b0.upaiyun.com/latest_specs.4.8.gz)
          Unable to download data from https://gems.ruby-china.org/ - server did not return a valid file (https://gems.ruby-china.org/latest_specs.4.8.gz)
ERROR:  Possible alternatives: cocoapods
Goobird-JackdeiMac:~ goobird-jack$ gem sources -l
*** CURRENT SOURCES ***


https://ruby.taobao.org
https://gems.ruby-china.org/
Goobird-JackdeiMac:~ goobird-jack$ gem sources --remove https://taobao.org
source https://taobao.org not present in cache
Goobird-JackdeiMac:~ goobird-jack$ gem sources -l
*** CURRENT SOURCES ***


https://ruby.taobao.org
https://gems.ruby-china.org/
Goobird-JackdeiMac:~ goobird-jack$ gem sources --remove https://taobao.org/
source https://taobao.org/ not present in cache
Goobird-JackdeiMac:~ goobird-jack$ gem sources --remove http://taobao.org/
source http://taobao.org/ not present in cache
Goobird-JackdeiMac:~ goobird-jack$ gem sources --remove http://taobao.org
source http://taobao.org not present in cache
Goobird-JackdeiMac:~ goobird-jack$ gem sources --remove https://gems.ruby-china.org
source https://gems.ruby-china.org not present in cache
Goobird-JackdeiMac:~ goobird-jack$ gem shources help
ERROR:  While executing gem ... (Gem::CommandLineError)
    Unknown command shources
Goobird-JackdeiMac:~ goobird-jack$ gem shources -help
ERROR:  While executing gem ... (Gem::CommandLineError)
    Unknown command shources
Goobird-JackdeiMac:~ goobird-jack$ gem sources -l
*** CURRENT SOURCES ***


https://ruby.taobao.org
https://gems.ruby-china.org/
Goobird-JackdeiMac:~ goobird-jack$ gem sources -r https://taobao.org
source https://taobao.org not present in cache
Goobird-JackdeiMac:~ goobird-jack$ gem sources -u
source cache successfully updated
Goobird-JackdeiMac:~ goobird-jack$ gem sources -l
*** CURRENT SOURCES ***


https://ruby.taobao.org
https://gems.ruby-china.org/
Goobird-JackdeiMac:~ goobird-jack$ gem sources -r https://taobao.org/
source https://taobao.org/ not present in cache
Goobird-JackdeiMac:~ goobird-jack$ gem sources -l
*** CURRENT SOURCES ***


https://ruby.taobao.org
https://gems.ruby-china.org/
Goobird-JackdeiMac:~ goobird-jack$ sudo gem sources -r https://rubygems.org
Password:
source https://rubygems.org not present in cache
Goobird-JackdeiMac:~ goobird-jack$ sudo gem sources -a http://rubygems.org
https://rubygems.org is recommended for security over http://rubygems.org


Do you want to add this insecure source? [yn]  y
http://rubygems.org added to sources
Goobird-JackdeiMac:~ goobird-jack$ gem sources -l
*** CURRENT SOURCES ***


https://ruby.taobao.org
https://gems.ruby-china.org/
http://rubygems.org
Goobird-JackdeiMac:~ goobird-jack$ sudo gem sources -r http://rubygems.org
http://rubygems.org removed from sources
Goobird-JackdeiMac:~ goobird-jack$ sudo gem sources -a https://rubygems.org
https://rubygems.org added to sources
Goobird-JackdeiMac:~ goobird-jack$ sudo gem sources -r https://ruby.taobao.org
https://ruby.taobao.org removed from sources
Goobird-JackdeiMac:~ goobird-jack$ sudo gem sources -r https://gems.ruby-china.org
source https://gems.ruby-china.org not present in cache
Goobird-JackdeiMac:~ goobird-jack$ gem sources -l
*** CURRENT SOURCES ***


https://gems.ruby-china.org/
https://rubygems.org
Goobird-JackdeiMac:~ goobird-jack$ sudo gem sources -r https://gems.ruby-china.org/
https://gems.ruby-china.org/ removed from sources
Goobird-JackdeiMac:~ goobird-jack$ gem sources -l
*** CURRENT SOURCES ***


https://rubygems.org
Goobird-JackdeiMac:~ goobird-jack$ sudo gem install cocoapods
Fetching: cocoapods-core-1.1.1.gem (100%)
Successfully installed cocoapods-core-1.1.1
Fetching: claide-1.0.1.gem (100%)
Successfully installed claide-1.0.1
Fetching: cocoapods-deintegrate-1.0.1.gem (100%)
Successfully installed cocoapods-deintegrate-1.0.1
Fetching: cocoapods-downloader-1.1.2.gem (100%)
Successfully installed cocoapods-downloader-1.1.2
Fetching: cocoapods-trunk-1.1.1.gem (100%)
Successfully installed cocoapods-trunk-1.1.1
Fetching: molinillo-0.5.4.gem (100%)
Successfully installed molinillo-0.5.4
Fetching: CFPropertyList-2.3.3.gem (100%)
Successfully installed CFPropertyList-2.3.3
Fetching: nanaimo-0.2.2.gem (100%)
Successfully installed nanaimo-0.2.2
Fetching: xcodeproj-1.4.1.gem (100%)
Successfully installed xcodeproj-1.4.1
Fetching: fourflusher-2.0.1.gem (100%)
Successfully installed fourflusher-2.0.1
Fetching: cocoapods-1.1.1.gem (100%)
Successfully installed cocoapods-1.1.1
Parsing documentation for cocoapods-core-1.1.1
Installing ri documentation for cocoapods-core-1.1.1
Parsing documentation for claide-1.0.1
Installing ri documentation for claide-1.0.1
Parsing documentation for cocoapods-deintegrate-1.0.1
Installing ri documentation for cocoapods-deintegrate-1.0.1
Parsing documentation for cocoapods-downloader-1.1.2
Installing ri documentation for cocoapods-downloader-1.1.2
Parsing documentation for cocoapods-trunk-1.1.1
Installing ri documentation for cocoapods-trunk-1.1.1
Parsing documentation for molinillo-0.5.4
Installing ri documentation for molinillo-0.5.4
Parsing documentation for CFPropertyList-2.3.3
Installing ri documentation for CFPropertyList-2.3.3
Parsing documentation for nanaimo-0.2.2
Installing ri documentation for nanaimo-0.2.2
Parsing documentation for xcodeproj-1.4.1
Installing ri documentation for xcodeproj-1.4.1
Parsing documentation for fourflusher-2.0.1
Installing ri documentation for fourflusher-2.0.1
Parsing documentation for cocoapods-1.1.1
Installing ri documentation for cocoapods-1.1.1
11 gems installed
Goobird-JackdeiMac:~ goobird-jack$ pod 
Usage:


    $ pod COMMAND


      CocoaPods, the Cocoa library package manager.


Commands:


    + cache         Manipulate the CocoaPods cache
    + deintegrate   Deintegrate CocoaPods from your project
    + env           Display pod environment
    + init          Generate a Podfile for the current directory
    + install       Install project dependencies according to versions from a
                    Podfile.lock
    + ipc           Inter-process communication
    + lib           Develop pods
    + list          List pods
    + outdated      Show outdated project dependencies
    + plugins       Show available CocoaPods plugins
    + repo          Manage spec-repositories
    + search        Search for pods
    + setup         Setup the CocoaPods environment
    + spec          Manage pod specs
    + trunk         Interact with the CocoaPods API (e.g. publishing new specs)
    + try           Try a Pod!
    + update        Update outdated project dependencies and create new
                    Podfile.lock


Options:


    --silent        Show nothing
    --version       Show the version of the tool
    --verbose       Show more debugging information
    --no-ansi       Show output without ANSI codes
    --help          Show help banner of specified command
Goobird-JackdeiMac:~ goobird-jack$ pod --version
1.1.1
Goobird-JackdeiMac:~ goobird-jack$ cd /Users/goobird-jack/Desktop/XmppTest
Goobird-JackdeiMac:XmppTest goobird-jack$ ls 
Podfile XmppTest.xcodeproj XmppTestUITests
XmppTest XmppTestTests
Goobird-JackdeiMac:XmppTest goobird-jack$ pod update --no-repo-update
Update all pods
Analyzing dependencies
[!] The dependency `AFNetworking` is not used in any concrete target.
The dependency `MBProgressHUD (~> 0.9)` is not used in any concrete target.
The dependency `XMPPFramework (from `https://github.com/robbiehanson/XMPPFramework.git`, branch `master`)` is not used in any concrete target.
Goobird-JackdeiMac:XmppTest goobird-jack$ pod update --no-repo-update
Update all pods
Analyzing dependencies
Pre-downloading: `XMPPFramework` from `https://github.com/robbiehanson/XMPPFramework.git`, branch `master`

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值