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

7

64

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 ?

Aboulia answered 6/7, 2018 at 3:1 Comment(1)
You will need to update your pod.Varietal
P
95

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.

Pueblo answered 6/7, 2018 at 17:55 Comment(6)
I don't know if this was just an issue for me or but the podfile.lock but while it was being tracked through git it wasn't part of the Xcode project so I had to delete it through terminal.Zinkenite
@Honey the Podfile.lock is usually not included in your Xcode file structure, but can usually be found in your project's root directory in FinderPueblo
Careful, this has the unintended consequences of upgrading all of your pods if you had not version locked them in your Podfile.Holloway
It didn't resolved to me..Supremacy
I tried the above suggestion and check the pod version, it still remains the same.Petropavlovsk
@Holloway If following best practices of 12 factor apps you would not run into this issue. However, you are correct if they are not explicitly declared.Pueblo
A
23

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
Aboulia answered 6/7, 2018 at 16:48 Comment(3)
Tried both answers and neither are working for me...any other ideas?Nicholas
@JoshuaHart do all the things to make version match, then only it will work , I only remember 2Aboulia
@JoshuaHart, if nothing else works, try a pod deintegrate and then a pod install.Cleareyed
R
6

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.

Rudiger answered 19/9, 2020 at 11:57 Comment(1)
sudo gem install cocoapods worked for me. Thanks!Ambience
I
2
$ [sudo] gem install cocoapods

you can update with this command

Isotherm answered 28/12, 2019 at 22:13 Comment(1)
Welcome to Stack Overflow. When answering an older question with existing answers it is useful to point out what new aspect of the question your answer addresses. It appears that your answer was already included by one of the other existing answers.Bibliotherapy
P
1

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.

Perfume answered 1/3, 2023 at 1:17 Comment(0)
C
0

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

gem update --system 
Connote answered 14/4, 2022 at 0:40 Comment(0)
T
-2

$ sudo gem install cocoapods

you can solve

Tambourine answered 20/8, 2020 at 7:52 Comment(2)
Please highlight the additional insight this answer provides, in comparison to existing older answers. Currently it gives an impression of only repeating the code of a different answer, but with even less explanation. The helpfulness of this answer is hence quite non-obvious.Crabbe
Welcome to Stack Overflow. Code-only answers are discouraged on Stack Overflow because they don't explain how it solves the problem. Please edit your answer to explain how this line solves the problem and how it improves on the existing upvoted answers the question already has, so that it is useful for users with similar issues.Dedication

© 2022 - 2025 — McMap. All rights reserved.