vijay
vijay

Reputation: 10997

The version of CocoaPods used to generate the lockfile (1.5.3) is higher than the version of the current executable (1.5.2)

on $pod install it gives warning & fails

The version of CocoaPods used to generate the lockfile (1.5.3) is higher than the version of the current executable (1.5.2)

What is it trying to say ?

macOs : 10.11.6 osx el capitan

my pod version is : 1.5.3

What does"current executable" (1.5.2) means ?

and

how to update it ?

Upvotes: 67

Views: 71338

Answers (7)

Ahmad Khudeish
Ahmad Khudeish

Reputation: 1137

Had the same issue, I updated my cocoacpods version and it worked.

If you previously installed cocoapods using brew

  1. You need to update your local installation of cocoapods, you can run:

     brew install cocoapods 
    
  2. Once installed hen run

    pod install
    

If you previously installed cocoapods using gem:

  1. You need to update your local installation of cocoapods, you can run:

     sudo gem install cocoapods 
    
  2. Once installed you can generate your new Podfile.lock matching the new version by running:

    pod install
    

You might have to also sometimes upgrade your ruby version if it does not work with the cocaopods version you installed you can use rbenv to upgrade your ruby version to the one compatible with your cocaopods.

Upvotes: 1

vijay
vijay

Reputation: 10997

3 solution

  1. deleted ios/podfile.lock and again do $pod install

OR

  1. OS UPDATE

    2.1 updated mac to high sierra or higher

    2.2 update xcode

    2.3 then update pod $sudo gem install cocoapods

    2.4 then $cd ios

    2.5 then $pod install

OR

  1. do any thing to make version match, then only it will work

Upvotes: 23

quynhbkhn
quynhbkhn

Reputation: 622

If you have tried the above methods and it doesn't work, then try this way:

gem update --system 

Upvotes: 0

Pranav Pravakar
Pranav Pravakar

Reputation: 253

For those like me whose cocoapods version is 1.5.2, you can update cocoapods using

sudo gem install cocoapods

and the problem is solved

For checking pod version use

pod --version

For those for which cocoapods version is 1.5.3, you can delete podfile.lock and do pod install. However please note that if the version, of libraries used in your project, is not specified in podfile, then they will be automatically updated to latest vesrion.

Upvotes: 6

wayne214
wayne214

Reputation: 1

$ sudo gem install cocoapods

you can solve

Upvotes: -2

Ali Murat
Ali Murat

Reputation: 161

$ [sudo] gem install cocoapods

you can update with this command

Upvotes: 2

Jstngoulet
Jstngoulet

Reputation: 1184

The error you are getting is due to your podfile.lock being built with an older version of Cocoapods. All you need to do is to delete your podfile.lock file and run pod install. This will create a new podfile.lock, with your current dependencies. Note that it should not take too long because your files should already be downloaded, they just need to be linked in said file.

Upvotes: 98

Related Questions