CocoaPods 安装错误解决

最近在安装CocoaPods ,各种坑,参考网上的文章结果一大堆的错误,于是乎在这个浩瀚的知识的海洋世界遨游了半天,黄天不苦心人啊,终于是安装成功了。接下来,把我遇到的问题及解决方法记录下来,希望大家少走一点坑。

XCode版本: Version 9.1 (9B55)
系统版本 : 10.12.6 (16G1036)

安装的步骤就直接看wu大维的文章了。

安装的ruby: $ rvm install 2.4 遇到的坑
问题一:Failed to update Homebrew
 rvm install 2.4
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.12/x86_64/ruby-2.2.2.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Installing requirements for osx.
Updating system..........Failed to update Homebrew, follow instructions here:
    https://github.com/Homebrew/homebrew/wiki/Common-Issues
and make sure `brew update` works before continuing.
.
Error running 'requirements_osx_brew_update_system ruby-2.2.2',
please read /Users/a123/.rvm/log/1512107654_ruby-2.2.2/update_system.log
Requirements installation failed with status: 1.

额,老老实实按照提示进行操作就好了。

$ brew update

再次:$ rvm install 2.4

问题二:
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.12/x86_64/ruby-2.4.1.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Installing requirements for osx.
Updating system.........
Installing required packages: autoconf, automake, libtool, pkg-config, coreutils, libyaml, readline, libksba, openssl@1.1..There were package installation errors, make sure to read the log.

Try `brew tap --repair` and make sure `brew doctor` looks reasonable.

Check Homebrew requirements https://github.com/Homebrew/homebrew/wiki/Installation
..
Error running 'requirements_osx_brew_libs_install autoconf automake libtool pkg-config coreutils libyaml readline libksba openssl@1.1',
please read /Users/a123/.rvm/log/1512109492_ruby-2.4.1/package_install_autoconf_automake_libtool_pkg-config_coreutils_libyaml_readline_libksba_openssl@1.1.log
Requirements installation failed with status: 1.

额,老老实实按照提示进行操作就好了。

$ brew tap --repair
$ brew doctor
问题三
 rvm install 2.4
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.12/x86_64/ruby-2.4.1.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Installing requirements for osx.
Updating system.........
Installing required packages: autoconf, automake, libtool, pkg-config, coreutils, libyaml, readline, libksba, openssl@1.1.........
Certificates bundle '/usr/local/etc/openssl@1.1/cert.pem' is already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/a123/.rvm/rubies/ruby-2.4.1, this may take a while depending on your cpu(s)...
ruby-2.4.1 - #downloading ruby-2.4.1, this may take a while depending on your connection...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
 25 11.9M   25 3097k    0     0   3082      0  1:07:59  0:17:08  0:50:51     0
curl: (56) SSLRead() return error -9806
There was an error(56).
Checking fallback: https://ftp.ruby-lang.org/pub/ruby/2.4/ruby-2.4.1.tar.bz2
** Resuming transfer from byte position 3171491
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
 14 9179k   14 1375k    0     0   3964      0  0:39:31  0:05:55  0:33:36 17402
curl: (18) transfer closed with 7991355 bytes remaining to read
Partial file(18). Only a part of the file was transferred. Removing partial and re-trying.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
 58 11.9M   58 7215k    0     0  24635      0  0:08:30  0:04:59  0:03:31 2824815 58 11.9M   58 7215k    0     0  24554      0  0:08:31  0:05:00  0:03:31 1653609100 11.9M  100 11.9M    0     0  30323      0  0:06:54  0:06:54 --:--:-- 38284
Failed download
There has been an error fetching the ruby interpreter. Halting the installation.

这个奇葩的错误竟然是网络的问题,所以重新导入。

问题四
[!] /usr/bin/git clone https://github.com/CocoaPods/Specs.git master --progress

Cloning into 'master'...
remote: Counting objects: 1715688, done.        
remote: Compressing objects: 100% (404/404), done.        
error: RPC failed; curl 56 SSLRead() return error -9806 10.00 KiB/s    
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

$ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

附:全部安装的坑

Last login: Fri Dec  1 11:53:07 on ttys006
123deMac-mini:~ a123$ ruby -v
ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
123deMac-mini:~ a123$ rvm install 2.2.2
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.12/x86_64/ruby-2.2.2.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Installing requirements for osx.
Updating system..........Failed to update Homebrew, follow instructions here:
    https://github.com/Homebrew/homebrew/wiki/Common-Issues
and make sure `brew update` works before continuing.
.
Error running 'requirements_osx_brew_update_system ruby-2.2.2',
please read /Users/a123/.rvm/log/1512107654_ruby-2.2.2/update_system.log
Requirements installation failed with status: 1.
123deMac-mini:~ a123$ brew update



Updated 1 tap (homebrew/core).
==> New Formulae
apm-server
==> Updated Formulae
packetbeat
123deMac-mini:~ a123$ 
123deMac-mini:~ a123$ 
123deMac-mini:~ a123$ 
123deMac-mini:~ a123$ rvm install 2.2.7
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.12/x86_64/ruby-2.2.7.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Installing requirements for osx.
Updating system..........Failed to update Homebrew, follow instructions here:
    https://github.com/Homebrew/homebrew/wiki/Common-Issues
and make sure `brew update` works before continuing.
.
Error running 'requirements_osx_brew_update_system ruby-2.2.7',
please read /Users/a123/.rvm/log/1512109022_ruby-2.2.7/update_system.log
Requirements installation failed with status: 1.
123deMac-mini:~ a123$ brew update
Already up-to-date.
123deMac-mini:~ a123$ rvm list known
# MRI Rubies
[ruby-]1.8.6[-p420]
[ruby-]1.8.7[-head] # security released on head
[ruby-]1.9.1[-p431]
[ruby-]1.9.2[-p330]
[ruby-]1.9.3[-p551]
[ruby-]2.0.0[-p648]
[ruby-]2.1[.10]
[ruby-]2.2[.7]
[ruby-]2.3[.4]
[ruby-]2.4[.1]
ruby-head

# for forks use: rvm install ruby-head-<name> --url https://github.com/github/ruby.git --branch 2.2

# JRuby
jruby-1.6[.8]
jruby-1.7[.27]
jruby[-9.1.13.0]
jruby-head

# Rubinius
rbx-1[.4.3]
rbx-2.3[.0]
rbx-2.4[.1]
rbx-2[.5.8]
rbx-3[.84]
rbx-head

# Opal
opal

# Minimalistic ruby implementation - ISO 30170:2012
mruby-1.0.0
mruby-1.1.0
mruby-1.2.0
mruby-1[.3.0]
mruby[-head]

# Ruby Enterprise Edition
ree-1.8.6
ree[-1.8.7][-2012.02]

# Topaz
topaz

# MagLev
maglev[-head]
maglev-1.0.0

# Mac OS X Snow Leopard Or Newer
macruby-0.10
macruby-0.11
macruby[-0.12]
macruby-nightly
macruby-head

# IronRuby
ironruby[-1.1.3]
ironruby-head
123deMac-mini:~ a123$ rvm install 2.4
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.12/x86_64/ruby-2.4.1.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Installing requirements for osx.
Updating system.........
Installing required packages: autoconf, automake, libtool, pkg-config, coreutils, libyaml, readline, libksba, openssl@1.1..There were package installation errors, make sure to read the log.

Try `brew tap --repair` and make sure `brew doctor` looks reasonable.

Check Homebrew requirements https://github.com/Homebrew/homebrew/wiki/Installation
..
Error running 'requirements_osx_brew_libs_install autoconf automake libtool pkg-config coreutils libyaml readline libksba openssl@1.1',
please read /Users/a123/.rvm/log/1512109492_ruby-2.4.1/package_install_autoconf_automake_libtool_pkg-config_coreutils_libyaml_readline_libksba_openssl@1.1.log
Requirements installation failed with status: 1.
123deMac-mini:~ a123$ brew tap --repair
123deMac-mini:~ a123$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!

Warning: Xcode alone is not sufficient on Sierra.
Install the Command Line Tools:
  xcode-select --install

123deMac-mini:~ a123$ xcode-select --install
xcode-select: note: install requested for command line developer tools
123deMac-mini:~ a123$ xcode-select --install
xcode-select: note: install requested for command line developer tools
123deMac-mini:~ a123$ brew doctor
Your system is ready to brew.
123deMac-mini:~ a123$ rvm install 2.4
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.12/x86_64/ruby-2.4.1.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Installing requirements for osx.
Updating system.........
Installing required packages: autoconf, automake, libtool, pkg-config, coreutils, libyaml, readline, libksba, openssl@1.1.........
Certificates bundle '/usr/local/etc/openssl@1.1/cert.pem' is already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/a123/.rvm/rubies/ruby-2.4.1, this may take a while depending on your cpu(s)...
ruby-2.4.1 - #downloading ruby-2.4.1, this may take a while depending on your connection...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
 25 11.9M   25 3097k    0     0   3082      0  1:07:59  0:17:08  0:50:51     0
curl: (56) SSLRead() return error -9806
There was an error(56).
Checking fallback: https://ftp.ruby-lang.org/pub/ruby/2.4/ruby-2.4.1.tar.bz2
** Resuming transfer from byte position 3171491
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
 14 9179k   14 1375k    0     0   3964      0  0:39:31  0:05:55  0:33:36 17402
curl: (18) transfer closed with 7991355 bytes remaining to read
Partial file(18). Only a part of the file was transferred. Removing partial and re-trying.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
 58 11.9M   58 7215k    0     0  24635      0  0:08:30  0:04:59  0:03:31 2824815 58 11.9M   58 7215k    0     0  24554      0  0:08:31  0:05:00  0:03:31 1653609100 11.9M  100 11.9M    0     0  30323      0  0:06:54  0:06:54 --:--:-- 38284
Failed download
There has been an error fetching the ruby interpreter. Halting the installation.
123deMac-mini:~ a123$ rvm install 2.4
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.12/x86_64/ruby-2.4.1.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Certificates bundle '/usr/local/etc/openssl@1.1/cert.pem' is already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/a123/.rvm/rubies/ruby-2.4.1, this may take a while depending on your cpu(s)...
ruby-2.4.1 - #downloading ruby-2.4.1, this may take a while depending on your connection...
ruby-2.4.1 - #extracting ruby-2.4.1 to /Users/a123/.rvm/src/ruby-2.4.1....
ruby-2.4.1 - #applying patch /Users/a123/.rvm/patches/ruby/2.4.1/random_c_using_NR_prefix.patch.
ruby-2.4.1 - #configuring......................................................-
ruby-2.4.1 - #post-configuration.
ruby-2.4.1 - #compiling........................................................-
ruby-2.4.1 - #installing.......
ruby-2.4.1 - #making binaries executable..
ruby-2.4.1 - #downloading rubygems-2.6.14
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  751k  100  751k    0     0   575k      0  0:00:01  0:00:01 --:--:--  576k
No checksum for downloaded archive, recording checksum in user configuration.
ruby-2.4.1 - #extracting rubygems-2.6.14....
ruby-2.4.1 - #removing old rubygems.........
ruby-2.4.1 - #installing rubygems-2.6.14...........................
ruby-2.4.1 - #gemset created /Users/a123/.rvm/gems/ruby-2.4.1@global
ruby-2.4.1 - #importing gemset /Users/a123/.rvm/gemsets/global.gems............|
ruby-2.4.1 - #generating global wrappers........
ruby-2.4.1 - #gemset created /Users/a123/.rvm/gems/ruby-2.4.1
ruby-2.4.1 - #importing gemsetfile /Users/a123/.rvm/gemsets/default.gems evaluated to empty gem list
ruby-2.4.1 - #generating default wrappers........
ruby-2.4.1 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
Install of ruby-2.4.1 - #complete 
Ruby was built without documentation, to build it run: rvm docs generate-ri
123deMac-mini:~ a123$ sudo gem update --system
Password:
Latest version currently installed. Aborting.
123deMac-mini:~ a123$  gem sources --remove https://rubygems.org/
source https://rubygems.org/ not present in cache
123deMac-mini:~ a123$ gem sources --remove https://ruby.taobao.org/
source https://ruby.taobao.org/ not present in cache
123deMac-mini:~ a123$ gem sources -a https://gems.ruby-china.org/
source https://gems.ruby-china.org/ already present in the cache
123deMac-mini:~ a123$  gem sources -l
*** CURRENT SOURCES ***

https://gems.ruby-china.org/
123deMac-mini:~ a123$ sudo gem install -n /usr/local/bin cocoapods
Fetching: concurrent-ruby-1.0.5.gem (100%)
Successfully installed concurrent-ruby-1.0.5
Fetching: i18n-0.9.1.gem (100%)
Successfully installed i18n-0.9.1
Fetching: thread_safe-0.3.6.gem (100%)
Successfully installed thread_safe-0.3.6
Fetching: tzinfo-1.2.4.gem (100%)
Successfully installed tzinfo-1.2.4
Fetching: activesupport-4.2.10.gem (100%)
Successfully installed activesupport-4.2.10
Fetching: nap-1.1.0.gem (100%)
Successfully installed nap-1.1.0
Fetching: fuzzy_match-2.0.4.gem (100%)
Successfully installed fuzzy_match-2.0.4
Fetching: cocoapods-core-1.3.1.gem (100%)
Successfully installed cocoapods-core-1.3.1
Fetching: claide-1.0.2.gem (100%)
Successfully installed claide-1.0.2
Fetching: cocoapods-deintegrate-1.0.1.gem (100%)
Successfully installed cocoapods-deintegrate-1.0.1
Fetching: cocoapods-downloader-1.1.3.gem (100%)
Successfully installed cocoapods-downloader-1.1.3
Fetching: cocoapods-plugins-1.0.0.gem (100%)
Successfully installed cocoapods-plugins-1.0.0
Fetching: cocoapods-search-1.0.0.gem (100%)
Successfully installed cocoapods-search-1.0.0
Fetching: cocoapods-stats-1.0.0.gem (100%)
Successfully installed cocoapods-stats-1.0.0
Fetching: netrc-0.11.0.gem (100%)
Successfully installed netrc-0.11.0
Fetching: cocoapods-trunk-1.3.0.gem (100%)
Successfully installed cocoapods-trunk-1.3.0
Fetching: cocoapods-try-1.1.0.gem (100%)
Successfully installed cocoapods-try-1.1.0
Fetching: molinillo-0.5.7.gem (100%)
Successfully installed molinillo-0.5.7
Fetching: CFPropertyList-2.3.5.gem (100%)
Successfully installed CFPropertyList-2.3.5
Fetching: colored2-3.1.2.gem (100%)
Successfully installed colored2-3.1.2
Fetching: nanaimo-0.2.3.gem (100%)
Successfully installed nanaimo-0.2.3
Fetching: xcodeproj-1.5.3.gem (100%)
Successfully installed xcodeproj-1.5.3
Fetching: escape-0.0.4.gem (100%)
Successfully installed escape-0.0.4
Fetching: fourflusher-2.0.1.gem (100%)
Successfully installed fourflusher-2.0.1
Fetching: gh_inspector-1.0.3.gem (100%)
Successfully installed gh_inspector-1.0.3
Fetching: ruby-macho-1.1.0.gem (100%)
Successfully installed ruby-macho-1.1.0
Fetching: cocoapods-1.3.1.gem (100%)
Successfully installed cocoapods-1.3.1
Parsing documentation for concurrent-ruby-1.0.5
Installing ri documentation for concurrent-ruby-1.0.5
Parsing documentation for i18n-0.9.1
Installing ri documentation for i18n-0.9.1
Parsing documentation for thread_safe-0.3.6
Installing ri documentation for thread_safe-0.3.6
Parsing documentation for tzinfo-1.2.4
Installing ri documentation for tzinfo-1.2.4
Parsing documentation for activesupport-4.2.10
Installing ri documentation for activesupport-4.2.10
Parsing documentation for nap-1.1.0
Installing ri documentation for nap-1.1.0
Parsing documentation for fuzzy_match-2.0.4
Installing ri documentation for fuzzy_match-2.0.4
Parsing documentation for cocoapods-core-1.3.1
Installing ri documentation for cocoapods-core-1.3.1
Parsing documentation for claide-1.0.2
Installing ri documentation for claide-1.0.2
Parsing documentation for cocoapods-deintegrate-1.0.1
Installing ri documentation for cocoapods-deintegrate-1.0.1
Parsing documentation for cocoapods-downloader-1.1.3
Installing ri documentation for cocoapods-downloader-1.1.3
Parsing documentation for cocoapods-plugins-1.0.0
Installing ri documentation for cocoapods-plugins-1.0.0
Parsing documentation for cocoapods-search-1.0.0
Installing ri documentation for cocoapods-search-1.0.0
Parsing documentation for cocoapods-stats-1.0.0
Installing ri documentation for cocoapods-stats-1.0.0
Parsing documentation for netrc-0.11.0
Installing ri documentation for netrc-0.11.0
Parsing documentation for cocoapods-trunk-1.3.0
Installing ri documentation for cocoapods-trunk-1.3.0
Parsing documentation for cocoapods-try-1.1.0
Installing ri documentation for cocoapods-try-1.1.0
Parsing documentation for molinillo-0.5.7
Installing ri documentation for molinillo-0.5.7
Parsing documentation for CFPropertyList-2.3.5
Installing ri documentation for CFPropertyList-2.3.5
Parsing documentation for colored2-3.1.2
Installing ri documentation for colored2-3.1.2
Parsing documentation for nanaimo-0.2.3
Installing ri documentation for nanaimo-0.2.3
Parsing documentation for xcodeproj-1.5.3
Installing ri documentation for xcodeproj-1.5.3
Parsing documentation for escape-0.0.4
Installing ri documentation for escape-0.0.4
Parsing documentation for fourflusher-2.0.1
Installing ri documentation for fourflusher-2.0.1
Parsing documentation for gh_inspector-1.0.3
Installing ri documentation for gh_inspector-1.0.3
Parsing documentation for ruby-macho-1.1.0
Installing ri documentation for ruby-macho-1.1.0
Parsing documentation for cocoapods-1.3.1
Installing ri documentation for cocoapods-1.3.1
Done installing documentation for concurrent-ruby, i18n, thread_safe, tzinfo, activesupport, nap, fuzzy_match, cocoapods-core, claide, cocoapods-deintegrate, cocoapods-downloader, cocoapods-plugins, cocoapods-search, cocoapods-stats, netrc, cocoapods-trunk, cocoapods-try, molinillo, CFPropertyList, colored2, nanaimo, xcodeproj, escape, fourflusher, gh_inspector, ruby-macho, cocoapods after 25 seconds
27 gems installed
123deMac-mini:~ a123$ sudo xcode-select --switch/Applications/Xcode.app
xcode-select: error: invalid argument '--switch/Applications/Xcode.app'
Usage: xcode-select [options]

Print or change the path to the active developer directory. This directory
controls which tools are used for the Xcode command line tools (for example, 
xcodebuild) as well as the BSD development commands (such as cc and make).

Options:
  -h, --help                  print this help message and exit
  -p, --print-path            print the path of the active developer directory
  -s <path>, --switch <path>  set the path for the active developer directory
  --install                   open a dialog for installation of the command line developer tools
  -v, --version               print the xcode-select version
  -r, --reset                 reset to the default command line tools path
123deMac-mini:~ a123$ pod setup
Setting up CocoaPods master repo
  $ /usr/bin/git clone https://github.com/CocoaPods/Specs.git master --progress
  Cloning into 'master'...
  remote: Counting objects: 1715688, done.        
  remote: Compressing objects: 100% (404/404), done.        
  error: RPC failed; curl 56 SSLRead() return error -9806 10.00 KiB/s    
  fatal: The remote end hung up unexpectedly
  fatal: early EOF
  fatal: index-pack failed
[!] /usr/bin/git clone https://github.com/CocoaPods/Specs.git master --progress

Cloning into 'master'...
remote: Counting objects: 1715688, done.        
remote: Compressing objects: 100% (404/404), done.        
error: RPC failed; curl 56 SSLRead() return error -9806 10.00 KiB/s    
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

123deMac-mini:~ a123$ pod setup
Setting up CocoaPods master repo
  $ /usr/bin/git clone https://github.com/CocoaPods/Specs.git master --progress
  Cloning into 'master'...
  remote: Counting objects: 1715877, done.        
  remote: Compressing objects: 100% (586/586), done.        
  error: RPC failed; curl 18 transfer closed with outstanding read data remaining
  fatal: The remote end hung up unexpectedly
  fatal: early EOF
  fatal: index-pack failed
[!] /usr/bin/git clone https://github.com/CocoaPods/Specs.git master --progress

Cloning into 'master'...
remote: Counting objects: 1715877, done.        
remote: Compressing objects: 100% (586/586), done.        
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

123deMac-mini:~ a123$ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
Password:
123deMac-mini:~ a123$ pod setup
Setting up CocoaPods master repo
  $ /usr/bin/git clone https://github.com/CocoaPods/Specs.git master --progress
  Cloning into 'master'...
  remote: Counting objects: 1715976, done.        
  remote: Compressing objects: 100% (137/137), done.        
  error: RPC failed; curl 18 transfer closed with outstanding read data remaining
  fatal: The remote end hung up unexpectedly
  fatal: early EOF
  fatal: index-pack failed
[!] /usr/bin/git clone https://github.com/CocoaPods/Specs.git master --progress

Cloning into 'master'...
remote: Counting objects: 1715976, done.        
remote: Compressing objects: 100% (137/137), done.        
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

123deMac-mini:~ a123$ git config –global http.postBuffer 524288000
fatal: not in a git directory
123deMac-mini:~ a123$ pod setup
Setting up CocoaPods master repo
  $ /usr/local/bin/git clone https://github.com/CocoaPods/Specs.git master
  --progress
  Cloning into 'master'...
  remote: Counting objects: 1716057, done.        
  remote: Compressing objects: 100% (214/214), done.        
  error: RPC failed; curl 56 SSLRead() return error -98066.00 KiB/s    
  fatal: The remote end hung up unexpectedly
  fatal: early EOF
  fatal: index-pack failed
[!] /usr/local/bin/git clone https://github.com/CocoaPods/Specs.git master --progress

Cloning into 'master'...
remote: Counting objects: 1716057, done.        
remote: Compressing objects: 100% (214/214), done.        
error: RPC failed; curl 56 SSLRead() return error -98066.00 KiB/s    
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

123deMac-mini:~ a123$ git clone https://github.com/CocoaPods/Specs.git master 
Cloning into 'master'...
remote: Counting objects: 1716111, done.
remote: Compressing objects: 100% (264/264), done.
error: RPC failed; curl 56 SSLRead() return error -9806 9.00 KiB/s      
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
123deMac-mini:~ a123$ $Gitclone https://git.coding.net/CocoaPods/Specs.git ~/.cocoapods/repos/master 
-bash: https://git.coding.net/CocoaPods/Specs.git: No such file or directory
123deMac-mini:~ a123$ $git clone https://git.coding.net/CocoaPods/Specs.git ~/.cocoapods/repos/master 
-bash: clone: command not found
123deMac-mini:~ a123$ git clone https://git.coding.net/CocoaPods/Specs.git ~/.cocoapods/repos/master
Cloning into '/Users/a123/.cocoapods/repos/master'...
remote: Counting objects: 1130099, done.
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
123deMac-mini:~ a123$ git clone https://github.com/CocoaPods/Specs.git master --progress
Cloning into 'master'...


remote: Counting objects: 1716192, done.
remote: Compressing objects: 100% (342/342), done.
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
123deMac-mini:~ a123$ 
123deMac-mini:~ a123$ 
123deMac-mini:~ a123$ gem install rails
Fetching: activesupport-5.1.4.gem (100%)
Successfully installed activesupport-5.1.4
Fetching: rack-2.0.3.gem (100%)
Successfully installed rack-2.0.3
Fetching: rack-test-0.8.2.gem (100%)
Successfully installed rack-test-0.8.2
Fetching: mini_portile2-2.3.0.gem (100%)
Successfully installed mini_portile2-2.3.0
Fetching: nokogiri-1.8.1.gem (100%)
Building native extensions.  This could take a while...
Successfully installed nokogiri-1.8.1
Fetching: crass-1.0.3.gem (100%)
Successfully installed crass-1.0.3
Fetching: loofah-2.1.1.gem (100%)
Successfully installed loofah-2.1.1
Fetching: rails-html-sanitizer-1.0.3.gem (100%)
Successfully installed rails-html-sanitizer-1.0.3
Fetching: rails-dom-testing-2.0.3.gem (100%)
Successfully installed rails-dom-testing-2.0.3
Fetching: builder-3.2.3.gem (100%)
Successfully installed builder-3.2.3
Fetching: erubi-1.7.0.gem (100%)
Successfully installed erubi-1.7.0
Fetching: actionview-5.1.4.gem (100%)
Successfully installed actionview-5.1.4
Fetching: actionpack-5.1.4.gem (100%)
Successfully installed actionpack-5.1.4
Fetching: activemodel-5.1.4.gem (100%)
Successfully installed activemodel-5.1.4
Fetching: arel-8.0.0.gem (100%)
Successfully installed arel-8.0.0
Fetching: activerecord-5.1.4.gem (100%)
Successfully installed activerecord-5.1.4
Fetching: globalid-0.4.1.gem (100%)
Successfully installed globalid-0.4.1
Fetching: activejob-5.1.4.gem (100%)
Successfully installed activejob-5.1.4
Fetching: mini_mime-1.0.0.gem (100%)
Successfully installed mini_mime-1.0.0
Fetching: mail-2.7.0.gem (100%)
Successfully installed mail-2.7.0
Fetching: actionmailer-5.1.4.gem (100%)
Successfully installed actionmailer-5.1.4
Fetching: nio4r-2.1.0.gem (100%)
Building native extensions.  This could take a while...
Successfully installed nio4r-2.1.0
Fetching: websocket-extensions-0.1.3.gem (100%)
Successfully installed websocket-extensions-0.1.3
Fetching: websocket-driver-0.6.5.gem (100%)
Building native extensions.  This could take a while...
Successfully installed websocket-driver-0.6.5
Fetching: actioncable-5.1.4.gem (100%)
Successfully installed actioncable-5.1.4
Fetching: thor-0.20.0.gem (100%)
Successfully installed thor-0.20.0
Fetching: method_source-0.9.0.gem (100%)
Successfully installed method_source-0.9.0
Fetching: railties-5.1.4.gem (100%)
Successfully installed railties-5.1.4
Fetching: bundler-1.16.0.gem (100%)
Successfully installed bundler-1.16.0
Fetching: sprockets-3.7.1.gem (100%)
Successfully installed sprockets-3.7.1
Fetching: sprockets-rails-3.2.1.gem (100%)
Successfully installed sprockets-rails-3.2.1
Fetching: rails-5.1.4.gem (100%)
Successfully installed rails-5.1.4
Parsing documentation for activesupport-5.1.4
Installing ri documentation for activesupport-5.1.4
Parsing documentation for rack-2.0.3
Installing ri documentation for rack-2.0.3
Parsing documentation for rack-test-0.8.2
Installing ri documentation for rack-test-0.8.2
Parsing documentation for mini_portile2-2.3.0
Installing ri documentation for mini_portile2-2.3.0
Parsing documentation for nokogiri-1.8.1
Installing ri documentation for nokogiri-1.8.1
Parsing documentation for crass-1.0.3
Installing ri documentation for crass-1.0.3
Parsing documentation for loofah-2.1.1
Installing ri documentation for loofah-2.1.1
Parsing documentation for rails-html-sanitizer-1.0.3
Installing ri documentation for rails-html-sanitizer-1.0.3
Parsing documentation for rails-dom-testing-2.0.3
Installing ri documentation for rails-dom-testing-2.0.3
Parsing documentation for builder-3.2.3
Installing ri documentation for builder-3.2.3
Parsing documentation for erubi-1.7.0
Installing ri documentation for erubi-1.7.0
Parsing documentation for actionview-5.1.4
Installing ri documentation for actionview-5.1.4
Parsing documentation for actionpack-5.1.4
Installing ri documentation for actionpack-5.1.4
Parsing documentation for activemodel-5.1.4
Installing ri documentation for activemodel-5.1.4
Parsing documentation for arel-8.0.0
Installing ri documentation for arel-8.0.0
Parsing documentation for activerecord-5.1.4
Installing ri documentation for activerecord-5.1.4
Parsing documentation for globalid-0.4.1
Installing ri documentation for globalid-0.4.1
Parsing documentation for activejob-5.1.4
Installing ri documentation for activejob-5.1.4
Parsing documentation for mini_mime-1.0.0
Installing ri documentation for mini_mime-1.0.0
Parsing documentation for mail-2.7.0
Installing ri documentation for mail-2.7.0
Parsing documentation for actionmailer-5.1.4
Installing ri documentation for actionmailer-5.1.4
Parsing documentation for nio4r-2.1.0
Installing ri documentation for nio4r-2.1.0
Parsing documentation for websocket-extensions-0.1.3
Installing ri documentation for websocket-extensions-0.1.3
Parsing documentation for websocket-driver-0.6.5
Installing ri documentation for websocket-driver-0.6.5
Parsing documentation for actioncable-5.1.4
Installing ri documentation for actioncable-5.1.4
Parsing documentation for thor-0.20.0
Installing ri documentation for thor-0.20.0
Parsing documentation for method_source-0.9.0
Installing ri documentation for method_source-0.9.0
Parsing documentation for railties-5.1.4
Installing ri documentation for railties-5.1.4
Parsing documentation for bundler-1.16.0
Installing ri documentation for bundler-1.16.0
Parsing documentation for sprockets-3.7.1
Installing ri documentation for sprockets-3.7.1
Parsing documentation for sprockets-rails-3.2.1
Installing ri documentation for sprockets-rails-3.2.1
Parsing documentation for rails-5.1.4
Installing ri documentation for rails-5.1.4
Done installing documentation for activesupport, rack, rack-test, mini_portile2, nokogiri, crass, loofah, rails-html-sanitizer, rails-dom-testing, builder, erubi, actionview, actionpack, activemodel, arel, activerecord, globalid, activejob, mini_mime, mail, actionmailer, nio4r, websocket-extensions, websocket-driver, actioncable, thor, method_source, railties, bundler, sprockets, sprockets-rails, rails after 62 seconds
32 gems installed
123deMac-mini:~ a123$ gem installed
ERROR:  While executing gem ... (Gem::CommandLineError)
    Unknown command installed
123deMac-mini:~ a123$ pod setup
Setting up CocoaPods master repo
  $ /usr/local/bin/git clone https://github.com/CocoaPods/Specs.git master
  --progress
  Cloning into 'master'...
  remote: Counting objects: 1716324, done.        
  remote: Compressing objects: 100% (467/467), done.        
  error: RPC failed; curl 56 SSLRead() return error -9806.00 KiB/s     
  fatal: The remote end hung up unexpectedly
  fatal: early EOF
  fatal: index-pack failed
[!] /usr/local/bin/git clone https://github.com/CocoaPods/Specs.git master --progress

Cloning into 'master'...
remote: Counting objects: 1716324, done.        
remote: Compressing objects: 100% (467/467), done.        
error: RPC failed; curl 56 SSLRead() return error -9806.00 KiB/s     
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

123deMac-mini:~ a123$ pod setup
、Setting up CocoaPods master repo
  $ /usr/local/bin/git clone https://github.com/CocoaPods/Specs.git master
  --progress
  Cloning into 'master'...
  fatal: unable to access 'https://github.com/CocoaPods/Specs.git/': SSLRead() return error -36
[!] /usr/local/bin/git clone https://github.com/CocoaPods/Specs.git master --progress

Cloning into 'master'...
fatal: unable to access 'https://github.com/CocoaPods/Specs.git/': SSLRead() return error -36

123deMac-mini:~ a123$ git clone https://github.com/CocoaPods/Specs.git
Cloning into 'Specs'...
remote: Counting objects: 1768984, done.
remote: Compressing objects: 100% (262/262), done.
remote: Total 1768984 (delta 113), reused 35 (delta 35), pack-reused 1768679
Receiving objects: 100% (1768984/1768984), 497.42 MiB | 484.00 KiB/s, done.
Resolving deltas: 100% (961323/961323), done.
Checking out files: 100% (200648/200648), done.
123deMac-mini:~ a123$  pod search AFNetworking
Setting up CocoaPods master repo
  $ /usr/local/bin/git clone https://github.com/CocoaPods/Specs.git master --progress
  Cloning into 'master'...
  remote: Counting objects: 1769020, done.        
  remote: Compressing objects: 100% (296/296), done.        
  remote: Total 1769020 (delta 123), reused 35 (delta 35), pack-reused 1768680        
  Receiving objects: 100% (1769020/1769020), 497.52 MiB | 1.09 MiB/s, done.
  Resolving deltas: 100% (961154/961154), done.
  Checking out files: 100% (200652/200652), done.
Setup completed
Creating search index for spec repo 'master'.. Done!
[!] Unable to find a pod with name, author, summary, or description matching `AFNetworking`

[!] Skipping `0` because the podspec contains errors.

[!] Skipping `1` because the podspec contains errors.

[!] Skipping `2` because the podspec contains errors.

[!] Skipping `3` because the podspec contains errors.

[!] Skipping `4` because the podspec contains errors.

[!] Skipping `5` because the podspec contains errors.

[!] Skipping `6` because the podspec contains errors.

[!] Skipping `7` because the podspec contains errors.

[!] Skipping `8` because the podspec contains errors.

[!] Skipping `9` because the podspec contains errors.

[!] Skipping `a` because the podspec contains errors.

[!] Skipping `b` because the podspec contains errors.

[!] Skipping `c` because the podspec contains errors.

[!] Skipping `d` because the podspec contains errors.

[!] Skipping `e` because the podspec contains errors.

[!] Skipping `f` because the podspec contains errors.
123deMac-mini:~ a123$ rm ~/Library/Caches/CocoaPods/search_index.json
123deMac-mini:~ a123$ pod search AFNetworking
Creating search index for spec repo 'master'.. Done!


-> AFNetworking (3.1.0)
   A delightful iOS and OS X networking framework.
   pod 'AFNetworking', '~> 3.1.0'
   - Homepage: https://github.com/AFNetworking/AFNetworking
   - Source:   https://github.com/AFNetworking/AFNetworking.git
   - Versions: 3.1.0, 3.0.4, 3.0.3, 3.0.2, 3.0.1, 3.0.0, 3.0.0-beta.3, 3.0.0-beta.2,
   3.0.0-beta.1, 2.6.3, 2.6.2, 2.6.1, 2.6.0, 2.5.4, 2.5.3, 2.5.2, 2.5.1, 2.5.0, 2.4.1, 2.4.0,
   2.3.1, 2.3.0, 2.2.4, 2.2.3, 2.2.2, 2.2.1, 2.2.0, 2.1.0, 2.0.3, 2.0.2, 2.0.1, 2.0.0,
   2.0.0-RC3, 2.0.0-RC2, 2.0.0-RC1, 1.3.4, 1.3.3, 1.3.2, 1.3.1, 1.3.0, 1.2.1, 1.2.0, 1.1.0,
   1.0.1, 1.0, 1.0RC3, 1.0RC2, 1.0RC1, 0.10.1, 0.10.0, 0.9.2, 0.9.1, 0.9.0, 0.7.0, 0.5.1
   [master repo]
   - Subspecs:
     - AFNetworking/Serialization (3.1.0)
     - AFNetworking/Security (3.1.0)
     - AFNetworking/Reachability (3.1.0)
     - AFNetworking/NSURLSession (3.1.0)
     - AFNetworking/UIKit (3.1.0)

-> AFNetworking+AutoRetry (0.0.5)
   Auto Retries for AFNetworking requests
   pod 'AFNetworking+AutoRetry', '~> 0.0.5'
   - Homepage: https://github.com/shaioz/AFNetworking-AutoRetry
   - Source:   https://github.com/shaioz/AFNetworking-AutoRetry.git
   - Versions: 0.0.5, 0.0.4, 0.0.3, 0.0.2, 0.0.1 [master repo]

:


安装参考文章:
//www.greatytc.com/p/2ef8a38416c4
//www.greatytc.com/p/fce8b0be72f0
//www.greatytc.com/p/9e4e36ba8574

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 205,033评论 6 478
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 87,725评论 2 381
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 151,473评论 0 338
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 54,846评论 1 277
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 63,848评论 5 368
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 48,691评论 1 282
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 38,053评论 3 399
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 36,700评论 0 258
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 42,856评论 1 300
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 35,676评论 2 323
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 37,787评论 1 333
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 33,430评论 4 321
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 39,034评论 3 307
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 29,990评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 31,218评论 1 260
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 45,174评论 2 352
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 42,526评论 2 343

推荐阅读更多精彩内容

  • Android 自定义View的各种姿势1 Activity的显示之ViewRootImpl详解 Activity...
    passiontim阅读 171,464评论 25 707
  • 今天张兵老师分享秦王会商学院牧场理论6.0的第一节热身课:赚钱社群营销方法论2.0,价值巨大! 到底有价值巨大在哪...
    姜军说沙棘阅读 183评论 0 0
  • 壹 距离我飞升成仙也有一段日子了。起初还是有点新鲜感,可这九重天上的生活有些乏味,还不如我前世在人间来得快活。 至...
    步尘无迹阅读 806评论 6 8
  • 文/燕子 相识十几年,似乎梦一场。 相识相知,却不能够相许。 祝英梁山美梦,却也不能成真。 默默,何念初中相识,默...
    Joanachen阅读 419评论 0 8