CocoaPods是什么,有什么用,怎么来等等我就不说了.反正就是一个管理第三方开源框架的~

1. 配置前 - 本地安装好Ruby环境

2. 安装命令 -> sudo gem install cocoapods

墙挡了.出这个错

ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
Errno::ECONNRESET: Connection reset by peer - SSL_connect (https://api.rubygems.org/quick/Marshal.4.8/cocoapods-0.39.0.gemspec.rz)

这是因为ruby的软件源rubygems.org因为使用亚马逊的云服务,还是墙..,需要更新一下ruby的源,过程如下:

Could not find a valid gem 'cocoapods' (>= ) in any repository

$ gem sources -l (查看当前ruby的源)
$ gem sources --remove https://rubygems.org/
$ gem sources -a https://ruby.taobao.org/
$ gem sources -l

查看当前ruby的软件源

cuiwenlongdeMac-mini:~ cuiwenlong$ gem sources -l
*** CURRENT SOURCES *** https://ruby.taobao.org/

加进ruby源之后,就再次安装,成功了

cuiwenlongdeMac-mini:~ cuiwenlong$ sudo gem install cocoapods
Password:
Fetching: nap-1.0..gem (%)
Successfully installed nap-1.0.
Fetching: thread_safe-0.3..gem (%)
Successfully installed thread_safe-0.3.
Fetching: minitest-5.8..gem (%)
Successfully installed minitest-5.8.
Fetching: tzinfo-1.2..gem (%)
Successfully installed tzinfo-1.2.
Fetching: i18n-0.7..gem (%)
Successfully installed i18n-0.7.
Fetching: activesupport-4.2..gem (%)
Successfully installed activesupport-4.2.
Fetching: escape-0.0..gem (%)
Successfully installed escape-0.0.
Fetching: colored-1.2.gem (%)
Successfully installed colored-1.2
Fetching: molinillo-0.4..gem (%)
Successfully installed molinillo-0.4.
Fetching: netrc-0.7..gem (%)
Successfully installed netrc-0.7.
Fetching: cocoapods-trunk-0.6..gem (%)
Successfully installed cocoapods-trunk-0.6.
Fetching: cocoapods-try-0.5..gem (%)
Successfully installed cocoapods-try-0.5.
Fetching: cocoapods-stats-0.6..gem (%)
Successfully installed cocoapods-stats-0.6.
Fetching: cocoapods-search-0.1..gem (%)
Successfully installed cocoapods-search-0.1.
Fetching: cocoapods-plugins-0.4..gem (%)
Successfully installed cocoapods-plugins-0.4.
Fetching: cocoapods-downloader-0.9..gem (%)
Successfully installed cocoapods-downloader-0.9.
Fetching: claide-0.9..gem (%)
Successfully installed claide-0.9.
Fetching: xcodeproj-0.28..gem (%)
Successfully installed xcodeproj-0.28.
Fetching: fuzzy_match-2.0..gem (%)
Successfully installed fuzzy_match-2.0.
Fetching: cocoapods-core-0.39..gem (%)
Successfully installed cocoapods-core-0.39.
Fetching: cocoapods-0.39..gem (%)
Successfully installed cocoapods-0.39.
Parsing documentation for nap-1.0.
Installing ri documentation for nap-1.0.
Parsing documentation for thread_safe-0.3.
Installing ri documentation for thread_safe-0.3.
Parsing documentation for minitest-5.8.
Installing ri documentation for minitest-5.8.
Parsing documentation for tzinfo-1.2.
Installing ri documentation for tzinfo-1.2.
Parsing documentation for i18n-0.7.
Installing ri documentation for i18n-0.7.
Parsing documentation for activesupport-4.2.
Installing ri documentation for activesupport-4.2.
Parsing documentation for escape-0.0.
Installing ri documentation for escape-0.0.
Parsing documentation for colored-1.2
Installing ri documentation for colored-1.2
Parsing documentation for molinillo-0.4.
Installing ri documentation for molinillo-0.4.
Parsing documentation for netrc-0.7.
Installing ri documentation for netrc-0.7.
Parsing documentation for cocoapods-trunk-0.6.
Installing ri documentation for cocoapods-trunk-0.6.
Parsing documentation for cocoapods-try-0.5.
Installing ri documentation for cocoapods-try-0.5.
Parsing documentation for cocoapods-stats-0.6.
Installing ri documentation for cocoapods-stats-0.6.
Parsing documentation for cocoapods-search-0.1.
Installing ri documentation for cocoapods-search-0.1.
Parsing documentation for cocoapods-plugins-0.4.
Installing ri documentation for cocoapods-plugins-0.4.
Parsing documentation for cocoapods-downloader-0.9.
Installing ri documentation for cocoapods-downloader-0.9.
Parsing documentation for claide-0.9.
Installing ri documentation for claide-0.9.
Parsing documentation for xcodeproj-0.28.
Installing ri documentation for xcodeproj-0.28.
Parsing documentation for fuzzy_match-2.0.
Installing ri documentation for fuzzy_match-2.0.
Parsing documentation for cocoapods-core-0.39.
Installing ri documentation for cocoapods-core-0.39.
Parsing documentation for cocoapods-0.39.
Installing ri documentation for cocoapods-0.39.
Done installing documentation for nap, thread_safe, minitest, tzinfo, i18n, activesupport, escape, colored, molinillo, netrc, cocoapods-trunk, cocoapods-try, cocoapods-stats, cocoapods-search, cocoapods-plugins, cocoapods-downloader, claide, xcodeproj, fuzzy_match, cocoapods-core, cocoapods after seconds
gems installed

xcodeproj-0.28.2.gem 版本旧的话,可以更新一下

gem 更新命令 =>   sudo gem update —system

安装成功之后,安装Pod  => 命令 : pod setup

错误 : error: RPC failed; result=18, HTTP code = 200

cuiwenlongdeMac-mini:~ cuiwenlong$ pod setup
Setting up CocoaPods master repo
[!] /usr/bin/git clone https://github.com/CocoaPods/Specs.git master --depth=1 Cloning into 'master'...
error: RPC failed; result=, HTTP code =
fatal: The remote end hung up unexpectedly

解决 : 200经典错误,网络连接错误,大概就是说哪个网站连接不上.我就重复继续安装就可以了..再次pod setut

错误 : active developer path ,选择默认的Xcode把

[!] Pod::Executable clone 'https://github.com/CocoaPods/Specs.git' master

xcrun: error: active developer path ("/Users/xiakejie/工具/Xcode 2.app/Contents/Developer") does not exist, use xcode-select to change

解决 : sudo xcode-select -switch /Applications/Xcode-beta.app/Contents/Developers

(/Applications/Xcode-beta.app/Contents/Developers)这个是你Xcode路径

cuiwenlongdeMac-mini:~ cuiwenlong$ pod setup
Setting up CocoaPods master repo
Setup completed

解决 : 经典的Setup completed~ 搞掂

3. 使用CocoePod

【CocoaPods】CocoaPods基本安装教程的更多相关文章

  1. 史上最详细的CocoaPods安装教程

    虽然网上关于CocoaPods安装教程多不胜数,但是我在安装的过程中还是出现了很多错误,所以大家可以照下来步骤装一下,我相信会很好用. 前言 在iOS项目中使用第三方类库可以说是非常常见的事,但是要正 ...

  2. CocoaPods安装教程 pod setup很慢解决方案

    CocoaPods安装教程 pod setup很慢解决方案 http://www.jianshu.com/p/6230eec137f6

  3. [CocoaPods]CocoaPods安装详解

    安装CocoaPods之前先安装ruby: 1.安装ruby ruby官网rubygems.org已被屏蔽,替换当前镜像是否为国内镜像. $gem sources --add https://gems ...

  4. react native 0.6x 在创建项目时,CocoaPods 的依赖安装步骤卡解决方案

    前言 你需要做两件事 gem换源 pod repo 换源 实战 如果你已经成功安装了CocoaPods.那么这里你需要卸载它.gem换源1. 卸载CocoaPods 查看gem安装的东西 gem li ...

  5. cocospods 最新安装教程

    Terminator 终端原来 安装 cocoa pods  终端命令 :sudo gem install cocoapods  #已经无效系统更新后的 cocoa pods 终端命令 : sudo ...

  6. https://github.com/CocoaPods/CocoaPods/search?q=No+such+file+or+directory报错解决方式

    ――― MARKDOWN TEMPLATE ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― ### Command ``` /U ...

  7. Linux+apache+mono+asp.net安装教程

    Linux+apache+mono+asp.net安装教程(CentOS上测试的) 一.准备工作: 1.安装linux系统(CentOS,这个就不多讲了) 2.下载所需软件 http-2.4.4.ta ...

  8. Greenplum 源码安装教程 —— 以 CentOS 平台为例

    Greenplum 源码安装教程 作者:Arthur_Qin 禾众 Greenplum 主体以及orca ( 新一代优化器 ) 的代码以可以从 Github 上下载.如果不打算查看代码,想下载编译好的 ...

  9. git 安装教程

    昆,简单说下安装教程1,安装Git2,安装TortoiseGit3,打开第一步安装的git工具GIT BASH

  10. Docker和Docker-compose安装教程以及docker-elk,docker-storm安装教程

    此安装教程仅供我自己安装配置时查看,其他的人不可以偷看!!! 安装Docker 1. Update package information, ensure that APT works with th ...

随机推荐

  1. 关于CSS的只言片语

    这段时间做了一个简单的页面,借机又重温了一下CSS的相关知识,现总结一下: 工欲善其事必先利其器,让我们先做一点准备工作 1.在页面添加: <meta http-equiv="x-ua ...

  2. CS加密算法

    概述: 加密数据可以使用对称加密或非对称加密算法,使用对称加密比非对称密钥快得多,但对称密钥需要解决安全交换密钥的问题.在 .NET Framework中,可以使用System.Security.Cr ...

  3. Fragment 总结

    本博客代码地址 : -- 单一 Fragment 示例 : https://github.com/han1202012/Octopus-Fragement.git -- 可复用的 Fragment 示 ...

  4. 可以伸缩的查询面板 (searchBar)

    最近有这样的需求,一个页面查询条件特别多,一次全部展示出来的话就占用大量的空间,所以分成了两类,简单搜索和高级搜索,当点击高级搜索的时候就会全部显示. 这样就存在一个问题,页面(navTab,dial ...

  5. FreeBSD修改root密码错误passwd: pam_chau(www.111cn.net)thtok(): error in service module from:http://www.111cn.net/sys/freebsd/66713.htm

    在FreeBSD中修改帐号密码有时候会出现一些错误,针对passwd: pam_chauthtok(): error in service module这样的错误提示,简单整理了以下解决方案:错误提示 ...

  6. 构建前端Mock Server

    写在前面 最开始只是在做活动页面时苦于效率太低制定了这样一个自动化的工作环境, 所以Github上项目名是Rapid-Dev-Activity-Page(快速开发活动页...). 活动页这类比较简单的 ...

  7. Linux I/O模型

    同步阻塞I/O 在此种方式下,用户进程在发起一个I/O操作以后,必须等待I/O操作的完成,只有当真正完成了I/O操作以后,用户进程才能运行.Java传统的I/O模型属于此种方式. 同步非阻塞I/O 在 ...

  8. 修改ubuntu按电源键触发效果

    GUI内终端执行如下指令,或者加入开机启动脚本内 gsettings set org.gnome.settings-daemon.plugins.power button-power shutdown ...

  9. 《samba服务搭建》RHEL6

    Samba服务不仅可以实现linux和win之间的文件共享,也可以实现linux和linux之间的共享,samba的用户只限服务端本地用户使用. 本文的环境是selinux开启的情况下配置 Samba ...

  10. C# 条码标签打印程序,RDLC报表动态显示多条码标签的方法

    初学c#,因最近公司客户要求原出货标签需实现条码化,练手的机会来了,遂动手做这个程序,开始都是一些增删改查操作一直很顺利,但到RDLC报表将条码显示到报表上犯难了,因为初学未接触过报表,上网查资料均一 ...