MacOS Sierra 10.12.1 (Xcode8.1) installed CocoaPods

MacOS Sierra 10.12.1 (Xcode8.1) installed CocoaPods
history.png

Due to the recent frequent computer disk prompted insufficient disk space, whenever I see the temporary delete some files to make room, but not a long time and disk, too lazy to summarize computer files one by one, so I finally decided to format the disk, reinstall the system, think of online installation due to relatively slow speed and waste of time in advance to download good image, use U disk to install, take into account that delay the progress of work, so the development must be the tools used are all good to think ahead to download, after the computer reinstall the complete system can be installed to one, did not expect the period still encounter some pit, that is finally ready to run the code update cocoapods time dependence library problems, finally lead to spent almost a time at noon and then toss it, hereby a record Under the.

Problem reason:

The macOS Sierra 10.12.1 comes with a version of Ruby (2.0.0) is too low, leading to cocoapods when installing a variety of problems, because of my personal computer and computer companies have encountered this problem, so the following will introduce two kinds of installation way of ruby:

Solution:

  • RVM (Ruby Version Manager) can not only be used to install ruby, you can also manage different versions of the ruby tools.
  • Rbenv (Ruby environment) also provides management functions of the Ruby Version, both can achieve the management of ruby, install the ruby view of paragraph two of this management tool operation is very simple, just a few simple command line to complete the installation and management of ruby.

A, RVM installation Ruby

1 view current ruby version:
MacdeMacBook-Pro:~ mac$-v ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16] Ruby
2 install RVM management tools:
MacdeMacBook-Pro:~ mac$curl -L https://get.rvm.io bash -s stable |% Total% Received% Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0:00:01 0:00:01: 10018410018400990 - - 039720 0:00:05 - - 991002292110022921: 0:00:05: Downloading: https://github.com/rvm/rvm/archive/1.27.0.tar.gz Downloading - 6052 - https://github.com/rvm/rvm/releases/download/1.27.0/1.27.0.tar.gz.asc curl: (28) Connection timed out after milliseconds Could not download'https://github.com/rvm/rvm/releases/download/1.27.0/1.27.0.tar.gz.asc'. curl 30005 returned status'28'. Installing RVM to /Users/mac/.rvm/ Add Ing RVM PATH line to /Users/mac/.profile /Users/mac/.mkshrc /Users/mac/.bashrc /Users/mac/.zshrc. Adding RVM loading line to /Users/mac/.profile /Users/mac/.bash_profile /Users/mac/.zlogin. Installation of RVM in /Users/mac/.rvm/ is almost complete: start using RVM you * To need to run `source /Users/mac/.rvm/scripts/rvm` in all your open shell windows, in rare cases you need to reopen all shell windows. MAC Thank you #, # # for using RVM! Sincerely hope that RVM # We helps to make your life easier and more enjoyable!!! # # ~Wayne, Michal & team. In case of problems:; https://rvm.io/help and https://twitter.com/rvm_io MacdeMacBook-Pro:~ mac$
3 check RVM version:
MacdeMacBook-Pro:~ mac$RVM RVM 1.27.0 (latest) by E. Seguin < [email protected]> Michal Papis < [email protected]> [https://rvm.io/] MacdeMacBook-Pro:~ mac$(Wayne)
4 identify all available ruby versions:
MacdeMacBook-Pro:~ mac$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[.8] [ruby-]2.2[.4] [ruby-]2.3[.0] [ruby-] 2.2-head 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[.23] jruby[-9.0.5.0] jruby-head # # Rubinius rbx-1[.4.3] rbx-2.3[.0] rbx-2.4[.1] rbx[-2.5.8] rbx-head Opal opal Minimalistic # # Ruby implementation - ISO 30170:2012 mruby[-head] # Ruby Enterprise Edition ree-1.8.6 ree[-1.8.7][-2012.02] GoRuby goruby Topaz Topaz # # # MagLev maglev[-head] maglev-1.0.0 Mac OS X Snow Leopard Or # Ne Wer macruby-0.10 macruby-0.11 macruby[-0.12] macruby-nightly macruby-head IronRuby ironruby[-1.1.3] ironruby-head MacdeMacBook-Pro:~ mac$#
5 install ruby 2.3.0 version:
MacdeMacBook-Pro:~ mac$RVM install 2.3.0 Searching for binary rubies, this might take some time. No binary rubies available for: osx/10.12/x86_64/ruby-2.3.0. Continuing with compilation. Please read'rvm help mount'to get more information on binary rubies. Checking requirements for osx. About to install Homebrew, press `Enter` for default installation in `/usr/local`, type new path if you wish custom Homebrew installation (the path needs to be writable for user ==> This script): will install: /usr/local/bin/brew /usr/local/share/doc/homebrew /usr/local/share/man/man1/brew.1 /usr/local/share/zsh/site-functions/_brew /usr/local/etc/bash_completion.d/brew /usr/local/Homebrew ==> The following new directories will be; created: /usr/ lo Cal/Cellar /usr/local/Homebrew /usr/local/Frameworks /usr/local/bin /usr/local/etc /usr/local/include /usr/local/lib /usr/local/opt /usr/local/sbin /usr/local/share /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var Press RETURN to continue or any other key to abort ==> /usr/bin/sudo /bin/mkdir -p /usr/local/Cellar /usr/local/Homebrew; /usr/local/Frameworks /usr/local/bin /usr/local/etc /usr/local/include /usr/local/lib /usr/local/opt /usr/local/sbin /usr/local/share /usr/local/ share/zsh /usr/local/share/zsh/site-functions /usr/local/var Password: ==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/Cellar /usr/local/Homebrew; /usr/local/Frameworks /usr/local/bin /usr/local/etc /usr/local/include /usr/local/lib /usr/loca L/opt /usr/local/sbin /usr/local/share /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var ==> /usr/bin/sudo /bin/chmod /usr/local/share/zsh /usr/local/share/zsh/site-functions ==> 755; /usr/bin/sudo /usr/sbin/chown MAC /usr/ local/Cellar /usr/local/Homebrew /usr/local/Frameworks /usr/local/bin /usr/local/etc /usr/local/include /usr/local/lib /usr/local/opt /usr/local/sbin /usr/local/share /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var ==> /usr/ bin/sudo /usr/bin/chgrp admin /usr/local/Cellar; /usr/local/Homebrew /usr/local/Frameworks /usr/local/bin /usr/local/etc /usr/local/include /usr/local/lib /usr/local/opt /usr/local/sbin /usr/local/share /usr/local/share/zsh /usr/local/share/zsh/site -functions /usr/local/var ==> /usr/bin/sudo /bin/mkdir -p /Users/mac/Library/Caches/Homebrew ==> /usr/bin/sudo /bin/chmod g+rwx /Users/mac/Library/Caches/Homebrew; ==> /usr/bin/sudo; /usr/sbin/chown MAC /Users/mac/Library/Caches/Homebrew GT Downloading and ==&; installing Homebrew remote: Counting... Objects: 4131, done. remote: Compressing objects: 100% (2754/2754), done. remote: Total 4131 (delta 2094), reused 2652 (delta 1230), Receiving (pack-reused 0 objects: 100% 4131/4131 2.40 MiB 49 KiB/s), |, done. Resolving deltas: 100% (2094/2094), done. From https://github.com/Homebrew/brew [new branch] master -> * origin/master * [new; tag] 0.1 -> 0.1 * [new tag] 0.2 -> 0.2 * [new tag 0.3 -> 0.3 tag] 0.4 * [new 0.4 * [new tag] -> 0.5 -> 0.5 tag] 0.6 * [new 0.6 * [new tag] -> 0.7 -> 0.7 tag] 0.7.1 * [new -> 0.7.1 * [new; tag] 0.8 -> 0.8 * [new tag] 0.8.1 * [new tag] 0.8.1 -> 0.9 -> 0.9 * [new tag] 0.9.1 -> 0.9.1 [new tag] 0.9.2 -> * 0.9.2 * [new tag] 0.9.3; -> 0.9.3; [new tag] 0.9.4 -> * 0.9.4 * [new tag] 0.9.5; -> 0.9.5; [new tag] 0.9.8 -> * 0.9.8 * [new tag] 0.9.9; -> 0.9.9; [new tag] 1.0.0 -> * 1.0.0 * [new tag] 1.0.1; -> 1.0.1 [new tag] 1.0.2 -> * 1.0.2 * [new tag] 1.0.3; -> 1.0.3; [new tag] 1.0.4 -> * 1.0.4 * [new tag] 1.0.5; -> 1.0.5; [new tag] 1.0.6 -> * 1.0.6 * [new tag] 1.0.7; -> 1.0.7; [new tag] 1.0.8 -> * 1.0.8 * [new tag] 1.0.9; -> 1.0.9; tag] 1.1.0 -> * [new 1.1.0 * [new tag] 1.1.1; -> 1.1.1; HEAD is now at 89c3348 Merge pull request #1567 from cesarandreu/fix-diagnostic-conditonal ==> Homebrew has enabled anonymous aggregate; user behaviour analytics Read the analytics documentation (and how to opt-out here: https://git.io/brew-analytics ==>); Tapping homebrew/core Clonin G into'/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'remote: Counting... Objects: 3768, done. remote: Compressing objects: 100% (3657/3657), done. remote: Total 3768 (delta 14), reused 309 (delta 1), pack-reused 0 Receiving objects: 100% (3768/3768), 3.01 MiB | 51 KiB/s, deltas: 100% done. Resolving (14/14), done. Checking connectivity done. Tapped 3646... Formulae (3795 files, 9.3M) Already up-to-date. ==> Installation ==> Next steps Run successful! `brew help` to get started Further documentation: https://git.io/brew-docs Installing requirements for osx. Updating system running'requirements_osx_brew_update_system ruby-2.3.0'... Error... Showing, last 15 lines of /Users/mac/.rvm/ log/1480093522_ruby-2.3.0/update_sys Tem.log https://github.com/Homebrew/homebrew/wiki/Common-Issues and make sure `brew update` works before continuing.'rvm_pretty_print stderr Case + + + + + + in "${rvm_pretty_print_flag:=auto}" case "${TERM:-dumb}" in + case "$1" in "-t 2" + + + + + + 1 return printf%b'Failed to update Homebrew, follow instructions here: https://github.com/Homebrew/homebrew/wiki/Common-Issues and make sure `brew update` works before continuing./n' Failed to update Homebrew. Follow instructions here: https://github.com/Homebrew/homebrew/wiki/Common-Issues and make sure `brew update` works before continuing. return Requirements installation failed with + + 1 status: 1
6 update Homebrew:
MacdeMacBook-Pro:~ mac$ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install) curl: (7) Failed to connect to raw.githubusercontent.com port 443: Operation timed out MacdeMacBook-Pro:~ mac$ruby -e" (curl -fsSL https: //raw.github.com/Homebrew/homebrew/go/install), curl: (22) The requested URL returned error: Found MacdeMacBook-Pro:~ mac$brew 404 Not install Autoconf automake libtool Updating Homebrew ==> Downloading... Https://homebrew.bintray.com/ bottles/autoconf-2.69.sierra.bottle 100% ==> Pouring autoconf-2.69.sierra.bottle.4.tar.gz ########################################################################; ==> Caveats Emacs Lisp files have been installed to: /usr/local/share/emacs/ site-lisp/autoconf ==& Gt; Summary /usr/local/Cellar/autoconf/2.69: 70 files, 3.0M ==> Downloading https://homebrew.bintray.com/bottles/automake-1.15.sierra.bottle ==> Pouring automake-1.15.sierra.bottle.2.tar.gz ######################################################################## 100%; /usr/local/Cellar/automake/1.15: 130 files, 2.9M ==> Downloading https://homebrew.bintray.com/bottles/libtool-2.4.6_1.sierra.bott curl: (7) Failed to connect to homebrew.bintray.com port 443: Operation timed out Error: Failed to download resource "libtool" Download failed: https://homebrew.bintray.com/bottles/libtool-2.4.6_1.sierra.bottle.tar.gz Warning: Bottle installation failed: building from source. ==> Using the sandbox ==> Downloading https: //ftpmirror.gnu.org/libtool/libtool-2.4.6.tar.xz ==> Downloading from http://ftp.kaist.ac.kr/gnu/gnu/libtool/libtool-2.4.6.tar.xz ==>./configure --prefix=/usr/local /Cellar/libtool/2.4.6_1 ######################################################################## 100%; --program-prefix=g ==> make install ==> Caveats In order to prevent conflicts with Apple's own libtool we have prepended a "g" so, you have instead: glibtool and glibtoolize. ==> Summary /usr/local/Cellar /libtool/2.4.6_1:; 71 files, 3.7M, built in 41 seconds
7 install ruby2.3.0:
MacdeMacBook-Pro:~ mac$RVM install 2.3.0 Searching for binary rubies, this might take some time. No binary rubies available for: osx/10.12/x86_64/ruby-2.3.0. 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:.... pkg-config, libyaml, readLine, libksba, openssl..- Certificates in'/usr/local/etc/openssl/cert.pem' are already up to date. Requirements installation successful. Installing Ruby from source to: /Users/mac/.rvm/rubies/ruby-2.3.0, this may take a while depending on your CPU (s) ruby-2.3.0 - #downloading ruby-2.3.0... This may take a while depending on your connection... The% Total% Received% Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 13.5M 100 13.5M 00204220 0:11:34 - 0:11:34 - 23365 - ruby-2.3.0:: #extracting - ruby-2.3.0 to /Users/mac/.rvm/src/ruby-2.3.0... Ruby-2.3.0 configuring. - #................................................... | - ruby-2.3.0... #post-configuration. ruby-2.3.0 - #compiling.....................................................|... Ruby-2.3.0 #installing... Binaries executable..... ruby-2.3.0... #making Installed rubygems 2.5.1 is newer than 2.4.8 provided with installed ruby, skipping installation, use --force to force installation. ruby-2.3.0 - #gemset created /User S/mac/.rvm/gems/[email protected] ruby-2.3.0 - #importing gemset /Users/mac/.rvm/gemsets/global.gems... Ruby-2.3.0... #generating....|... Global wrappers... Ruby-2.3.0 created /Users/mac/.rvm/gems/ruby-2.3.0..... - #gemset ruby-2.3.0 - #importing gemsetfile /Users/mac/.rvm/gemsets/default.gems evaluated to empty gem list ruby-2.3.0 - #generating default wrappers - #adjusting #shebangs... Ruby-2.3.0.... for (GEM IRB Erb RI RDOC testrb rake Install of). Ruby-2.3.0 - #complete Ruby was built without documentation, to build it run: RVM docs generate-ri MacdeMacBook-Pro:~ mac$
8 check the Ruby Version, this time no accident Ruby version should be 2.3.0:
MacdeMacBook-Pro:~ mac$-v ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin16] MacdeMacBook-Pro:~ mac$Ruby
MacdeMacBook-Pro:~ mac$RVM list RVM rubies ruby-2.3.0 [x86_64] # = * => / / current - the current version of current - # = * & & default / / the default version and # * - default / / default version of MacdeMacBook-Pro:~ mac$
9 view ruby source:
MacdeMacBook-Pro:~ mac$sources -l * * SOURCES * * https://rubygems.org/ MacdeMacBook-Pro:~ CURRENT mac$gem
10 remove the default ruby source:
MacdeMacBook-Pro:~ mac$sources -r https://rubygems.org/ removed sources mac$gem sources * * CURRENT SOURCES * * * MacdeMacBook-Pro:~ mac$-l * from * https://rubygems.org/ * MacdeMacBook-Pro:~ * gem
11 add ruby-china source:
MacdeMacBook-Pro:~ mac$gem sources -a https://gems.ruby-china.org/ https://gems.ruby-china.org/ added to sources MacdeMacBook-Pro:~ mac$gem sources -l CURRENT SOURCES https://gems.ruby-china.org/ MacdeMacBook-Pro:~ mac$* * * * * *
12 install cocoapods:
MacdeMacBook-Pro:~ mac$gem install cocoapods Fetching: nanaimo-0.2.2.gem (100%) Successfully installed nanaimo-0.2.2 Fetching: colored-1.2.gem (100%) Successfully installed colored-1.2 Fetching: claide-1.0.1.gem (100%) Successfully installed claide-1.0.1 Fetching: CFPropertyList-2.3.4.gem (100%) Successfully installed CFPropertyList-2.3.4 Fetching: thread_safe-0.3.5.gem (100%) Successfully installed thread_safe-0.3.5 Fetching: tzinfo-1.2.2.gem (100%) Successfully installed tzinfo-1.2.2 Fetching: i18n-0.7.0.gem (100%) Successfully installed i18n-0.7.0 Fetching: (activesupport-4.2.7.1.gem 100%) Successfully installed activesupport-4.2.7.1 Fetching: xcodeproj-1.4.1.gem (100%) Successfully installed xcodeproj-1.4.1 Fetching: nap-1.1.0.gem (10 0%) Successfully installed nap-1.1.0 Fetching: molinillo-0.5.4.gem (100%) Successfully installed molinillo-0.5.4 Fetching: gh_inspector-1.0.2.gem (100%) Successfully installed gh_inspector-1.0.2 Fetching: fourflusher-2.0.1.gem (100%) Successfully installed fourflusher-2.0.1 Fetching: escape-0.0.4.gem (100%) Successfully installed escape-0.0.4 Fetching: cocoapods-try-1.1.0.gem (100%) Successfully installed cocoapods-try-1.1.0 Fetching: netrc-0.7.8.gem (100%) Successfully installed netrc-0.7.8 Fetching: cocoapods-trunk-1.1.1.gem (100%) Successfully installed cocoapods-trunk-1.1.1 Fetching: (cocoapods-stats-1.0.0.gem 100%) Successfully installed cocoapods-stats-1.0.0 Fetching: cocoapods-search-1.0.0.gem (100%) Successfully installed cocoapods -search-1.0.0 Fetching: cocoapods-plugins-1.0.0.gem (100%) Successfully installed cocoapods-plugins-1.0.0 Fetching: cocoapods-downloader-1.1.2.gem (100%) Successfully installed cocoapods-downloader-1.1.2 Fetching: cocoapods-deintegrate-1.0.1.gem (100%) Successfully installed cocoapods-deintegrate-1.0.1 Fetching: fuzzy_match-2.0.4.gem (100%) Successfully installed fuzzy_match-2.0.4 Fetching: cocoapods-core-1.1.1.gem (100%) Successfully installed cocoapods-core-1.1.1 Fetching: cocoapods-1.1.1.gem (100%) Successfully installed cocoapods-1.1.1 Parsing documentation for nanaimo-0.2.2 Installing RI documentation for nanaimo-0.2.2 Parsing documentation for colored-1.2 Installing ri documentation for colored-1.2 Parsing documentation for claide-1. 0.1 Installing RI documentation for claide-1.0.1 Parsing documentation for CFPropertyList-2.3.4 Installing RI documentation for CFPropertyList-2.3.4 Parsing documentation for thread_safe-0.3.5 Installing RI documentation for thread_safe-0.3.5 Parsing documentation for tzinfo-1.2.2 Installing RI documentation for tzinfo-1.2.2 Parsing documentation for i18n-0.7.0 Installing RI documentation for i18n-0.7.0 Parsing documentation for activesupport-4.2.7.1 Installing RI documentation for activesupport-4.2.7.1 Parsing documentation for xcodeproj-1.4.1 Installing RI documentation for xcodeproj-1.4.1 Parsing documentation for nap-1.1.0 Installing RI documentation for nap-1.1.0 Parsing documentation for molinillo-0.5.4 Installing RI documentation fo R molinillo-0.5.4 Parsing documentation for gh_inspector-1.0.2 Installing RI documentation for gh_inspector-1.0.2 Parsing documentation for fourflusher-2.0.1 Installing RI documentation for fourflusher-2.0.1 Parsing documentation for escape-0.0.4 Installing RI documentation for escape-0.0.4 Parsing documentation for cocoapods-try-1.1.0 Installing RI documentation for cocoapods-try-1.1.0 Parsing documentation for netrc-0.7.8 Installing RI documentation for netrc-0.7.8 Parsing documentation for cocoapods-trunk-1.1.1 Installing RI documentation for cocoapods-trunk-1.1.1 Parsing documentation for cocoapods-stats-1.0.0 Installing RI documentation for cocoapods-stats-1.0.0 Parsing documentation for cocoapods-search-1.0.0 Installing RI documentat Ion for cocoapods-search-1.0.0 Parsing documentation for cocoapods-plugins-1.0.0 Installing RI documentation for cocoapods-plugins-1.0.0 Parsing documentation for cocoapods-downloader-1.1.2 Installing RI documentation for cocoapods-downloader-1.1.2 Parsing documentation for cocoapods-deintegrate-1.0.1 Installing RI documentation for cocoapods-deintegrate-1.0.1 Parsing documentation for fuzzy_match-2.0.4 Installing RI documentation for fuzzy_match-2.0.4 Parsing documentation for cocoapods-core-1.1.1 Installing RI documentation for cocoapods-core-1.1.1 Parsing documentation for cocoapods-1.1.1 Installing RI documentation for cocoapods-1.1.1 Done installing documentation for Nanaimo, colored claide, CFPropertyList, thread_safe, tzinfo, I18N, Activesupport, xcodeproj, nap, MOLINILLO, gh_inspector, fourflusher, escape, cocoapods-try, netrc, cocoapods-trunk, cocoapods-stats, cocoapods-search, cocoapods-plugins, cocoapods-downloader, cocoapods-deintegrate, fuzzy_match, cocoapods-core, cocoapods after 14 seconds 25 gems installed MacdeMacBook-Pro:~ mac$
13 view cocoapods version:
MacdeMacBook-Pro:~ mac$--version 1.1.1 MacdeMacBook-Pro:~ pod mac$
14 install Zsh, easy to use the back of the Du -sh * command to view the file download progress:
MacdeMacBook-Pro:repos mac$sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" Cloning Oh My Zsh Cloning into remote:...'/Users/mac/.oh-my-zsh'... Counting objects: 823, done. remote: Compressing objects: 100% (693/693), done. remote: Total 823 (delta 20), reused 683 (delta 9), pack-reused 0 Receiving objects: 100% (823/823), 559.90 KiB | 300 KiB/s, done. Resolving deltas: 100% (20/20), done. Checking connectivity done. Looking for an existing... Zsh config... Found ~/.zshrc. Backing up to ~/.zshrc.pre-oh-my-zsh Using the Oh My Zsh template file and adding it to ~/.zshrc Time to change your default shell to Zsh Changing shell for mac. Password! For mac: __ __ ____ / /_ ____ ___ __ __ ____ _____/ /_ / __ / __ / __ / `__ / / / / / / /_ / ___/ / __ / /_/ / / / / / / / / / / / /_/ / /_ (__) / /____/_/ /_/ /_/ /_/ /_//__, /___/____/_/ /_/ /____/ /.Is now... Installed! Please look over the ~/.zshrc file to select plugins, themes and, options. P.S. Follow us at https://twitter.com/ohmyzsh. p.p.s. Get stickers and T-shirts at http://shop.planetargon.com. MacdeMacBook-Pro:~ mac$
15 download the cocoapods file, the period may be wrong, as follows:
MacdeMacBook-Pro:~ mac$pod --version 1.1.1 MacdeMacBook-Pro:~ mac$pod search AFNetworking Setting up CocoaPods master repo 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` becau Se 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. MacdeMacBook-Pro:~ mac$
16 Unable to find pod with name a, author, summary, or matching AFNetworking error, description:
RM ~/Library/Caches/CocoaPods/search_index.json
17 into the repos folder, use the Du -sh command, see the repos file (this file should be downloaded for 358 trillion or so, after downloading some files should be decompressed automatically, the final size of 889 MB or so, because they are small files, so this step please patience wait):
CD /Users/mac/.cocoapods/repos ****repos** Du -sh 3M * * * * * * * Master 58M ****repos** master ****repos** Du -sh * 215M master * * ****repos** Du -sh 358M master * * * ****repos** Du -sh 358M master * * * ****repos** Du -sh 597M master * * * * * * *repos** Du -sh * 893M master * * ****repos** Du -sh *
18 run again, the result is as follows: cocoapods installation and use:
MacdeMacBook-Pro:~ mac$RM ~/Library/Caches/CocoaPods/search_index.json MacdeMacBook-Pro:~ mac$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''~> Homepage: https://github.com/AFNetworking/AFNetworking Source:; 3.1.0' - 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, 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).....

Two, rbenv installation Ruby

1 installation of brew, the use of BREW can help us install some software download:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
2 use brew to install rbenv:
Brew install rbenv
3 install ruby-build:
Git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
4 install ruby-china mirror:
Git clone https://github.com/andorchen/rbenv-china-mirror.git ~/.rbenv/plugins/rbenv-china-mirror
5 use rbenv to install ruby, here we choose 2.3.0:
Rbenv install 2.3.0
6 set the global version of ruby, the default is 2.0.0:
Rbenv global 2.3.0
7 remove the native gem source, replace the ruby-china source:
Gem sources https://gems.ruby-china.org/ gem sources --r --a https://rubygems.org/
8 update gem version:
Gem update --system
9 CocoaPods: required for installation
Gem install cocoapods -v 1.1.1
The following is the process through the installation of rbenv, a number of important steps to install the screenshot record for reference:
MacOS Sierra 10.12.1 (Xcode8.1) installed CocoaPods
rbenv-01.jpg
MacOS Sierra 10.12.1 (Xcode8.1) installed CocoaPods
rbenv-02.png
MacOS Sierra 10.12.1 (Xcode8.1) installed CocoaPods
rbenv-03.png

The above is through the rbenv installation ruby, the installation is successful, switch the default Ruby Version, the final installation of cocoapods can be.

Summary: the problem is not a problem, solve the problem is the key! This is my personal computer and the company on the computer to install some records, but also hope to help me with the same problem.

  • Reference: https://github.com/ruby/ruby
  • Reference: https://github.com/rbenv/rbenv
  • Reference: https://www.ruby-lang.org/zh_cn/documentation/installation/