[!] The version of CocoaPods used to generate the lockfile (1.2.0) is higher than the version of the current executable (1.0.0). Incompatibility issues may arise.
$ pod install
Analyzing dependencies
[!] The version of CocoaPods used to generate the lockfile (1.2.0) is higher than the version of the current executable (1.0.0). Incompatibility issues may arise.
解决方案
$ sudo gem install cocoapods
Updating installed gems Nothing to update
$ gem update cocoapod
Updating installed gems
Nothing to update
待解决
替换ruby源
$ gem sources
*** CURRENT SOURCES ***
http://rubygems-china.oss.aliyuncs.com
这个数据源已经失效了,我们移除掉
$ gem sources -r http://rubygems-china.oss.aliyuncs.com
http://rubygems-china.oss.aliyuncs.com removed from sources
加入新的数据源,目前只有ruby-china的源是保持更新的
$ gem sources -a https://gems.ruby-china.org/
https://gems.ruby-china.org/ added to sources
确保当前只有一个ruby源
$ gem sources
*** CURRENT SOURCES ***
https://gems.ruby-china.org/
ERROR: While executing gem ... (OpenSSL::SSL::SSLError) hostname "upyun.gems.ruby-china.org" does not match the server certificate
$ gem update --system
Updating rubygems-update
ERROR: While executing gem ... (OpenSSL::SSL::SSLError)
hostname "upyun.gems.ruby-china.org" does not match the server certificate
解决方案
- 在这里下载ruby源码点击下载,并解压
- 安装openssl
$ brew install openssl
如果提示
Warning: openssl 1.0.2l is already installed
说明已经安装了openssl
- cd到解压好的ruby源码文件夹中
- 配置源码(此处需要添加openssl目录索引)
$ ./configure --with-openssl-dir=/usr/local/ssl
- 编译ruby源码
$ make
- 最后安装ruby
$ sudo make install
ERROR: While executing gem ... (Errno::EACCES) Permission denied - /Library/Ruby/Gems/2.0.0/gems/rubygems-update-2.6.7/.autotest
$ gem update --system
Updating rubygems-update
ERROR: While executing gem ... (Errno::EACCES)
Permission denied - /Library/Ruby/Gems/2.0.0/gems/rubygems-update-2.6.7/.autotest
解决方案
$ sudo gem update --system
ERROR: While executing gem ... (Errno::EPERM) Operation not permitted - /usr/bin/update_rubygems
$ sudo gem update --system
Password:
Updating rubygems-update
ERROR: While executing gem ... (Errno::EPERM)
Operation not permitted - /usr/bin/update_rubygems
解决方案
安装homebrew homebrew官网
然后安装ruby
$ brew install ruby
ERROR: While executing gem ... (Errno::EPERM) Operation not permitted - /usr/bin/xcodeproj
$ sudo gem install cocoapods
Password:
etching: colored2-3.1.2.gem (100%)
Successfully installed colored2-3.1.2
Fetching: claide-1.0.2.gem (100%)
Successfully installed claide-1.0.2
Fetching: xcodeproj-1.5.0.gem (100%)
ERROR: While executing gem ... (Errno::EPERM)
Operation not permitted - /usr/bin/xcodeproj
解决方案
$ sudo gem install -n /usr/local/bin cocoapods
error: RPC failed; curl 56 SSLRead() return error -36
[!] /usr/bin/git clone https://github.com/CocoaPods/Specs.git master
Cloning into 'master'...
error: RPC failed; curl 56 SSLRead() return error -36
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
解决方案
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
注意
- "/Applications/Xcode.app/Contents/Developer"此路径是当前默认XCode的所在位置,如果安装了多个XCode需要多加注意
- 做了以上操作之后还会报错,将XCode删除,重新安装
PS
获取当前XCode路径,在终端中输入
$ xcode-select --print-path
error: RPC failed; curl 56 SSLRead() return error -9806
解决方案
$ git config --global http.postBuffer 524288000
$ pod setup
Unable to find a specification for "xxxx"
问题描述:
pod install时显示以下报错
解决方法
更新一下repo,然后再install
更新repo的命令如下
pod repo update
[!] <PBXSourcesBuildPhase UUID=
7DA7EFEB1FDA23A800B17618>
attempted to initialize an object with an unknown UUID. 6124B2561FECCEB200077BCA
for attribute: files
. This can be the result of a merge and the unknown UUID is being discarded.
问题描述
同事pod新库之后合并代码,我这边拉下来之后重新pod install报错
解决方法
- 选中 项目名称–>Target–>项目名称–>General–>Linked Frameworks and Libraries–>选中 libpods-项目名称.a 去除掉这个 .a
- 然后再一次 pod install
- 如果出现pod下面没有文件,就把Xcode关掉重新打开就好了
网友评论