The version of CocoaPods used to generate the lockfile

简介: The version of CocoaPods used to generate the lockfile

The version of CocoaPods used to generate the lockfile (1.12.1) is higher than the version of the current executable (1.11.3). Incompatibility issues may arise.

在我们使用cocoapods加载第三方库时,有时会碰到报这个错,这很明显是告诉我们现在所使用的cocoapods版本低于第三方库所要求的。


我们可以在终端中执行pod repo update 命令


如果执行pod repo update 命令报下面的错

Failed to connect to GitHub to update the CocoaPods/Specs specs repo - Please check if you are offline, or that GitHub is down


再执行pod update --verbose --no-repo-update

然后再执行pod repo update

根据提示再更新sudo gem install cocoapods

若还报错,有可能个gem版本问题,采用下面操作。这种操作很彻底,但是很复杂,能解决所有问题,会遇到系统的ruby权限问题,后面会有文章专门解决。不过万不得已不要走下面的流程。

升级cocoapods需要一个正确的操作流程和命令语句。


1、更新gem:sudo gem update --system

2、删除gem源:gem sources --remove https://ruby.taobao.org/

3、修改gem源:gem sources -a https://gems.ruby-china.org

4、查看gem源是否是最新的:gem sources -l

5、升级cocoapods:sudo gem install -n /usr/local/bin cocoapods --pre

6、查看升级后的cocoapods版本:pod --version


目录
相关文章
|
Java Maven
maven install时报错The packaging for this project did not assign a file to the build artifact
maven install时报错The packaging for this project did not assign a file to the build artifact
6921 0
No cached version of com.android.tools.build:gradle:2.0.0 available for offline mode.
No cached version of com.android.tools.build:gradle:2.0.0 available for offline mode.
151 0
|
Java iOS开发
Mac编译OpenJDK8:configure: error: Xcode 4 is required to build JDK 8, the version found was 10.1config
Mac编译OpenJDK8:configure: error: Xcode 4 is required to build JDK 8, the version found was 10.1config
138 0
|
Python
【解决方案】解决CMake must be installed to build the following extensions: pyltp
【解决方案】解决CMake must be installed to build the following extensions: pyltp
233 0
|
API 开发工具 Android开发
Installed Build Tools revision 31.0.0 is corrupted. Remove and install again using the SDK Manager.
Installed Build Tools revision 31.0.0 is corrupted. Remove and install again using the SDK Manager.
986 0
Installed Build Tools revision 31.0.0 is corrupted. Remove and install again using the SDK Manager.
|
Android开发
ERROR: Could not install Gradle distribution from ‘https://services.gradle.org/distributions/gradle
ERROR: Could not install Gradle distribution from ‘https://services.gradle.org/distributions/gradle
2784 0
ERROR: Could not install Gradle distribution from ‘https://services.gradle.org/distributions/gradle
成功解决You are using pip version 9.0.3, however version 10.0.1 is available. You should consider upgr
成功解决You are using pip version 9.0.3, however version 10.0.1 is available. You should consider upgr
成功解决You are using pip version 9.0.3, however version 10.0.1 is available. You should consider upgr
成功解决You are using pip version 9.0.1, however version 9.0.3 is available. You should consider upgra
成功解决You are using pip version 9.0.1, however version 9.0.3 is available. You should consider upgra
成功解决You are using pip version 9.0.1, however version 9.0.3 is available. You should consider upgra
dpkg-checkbuilddeps: error: Unmet build dependencies: build-essential:native
dpkg-checkbuilddeps: error: Unmet build dependencies: build-essential:native
756 0