Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error when running pod install

Tags:

cocoapods

When I run the pod install command, I am getting the following error:

[!] The `master` repo requires CocoaPods 1.0.0 -  (currently using 0.39.0)
Update Cocoapods, or checkout the appropriate tag in the repo.

Updating is not an option for me currently.

I looked at the answers to this question but none of the solutions seemed to work for me.

How can I continue to use CocoaPods 0.39.0 for my dependency management?

like image 438
nhgrif Avatar asked Nov 11 '16 22:11

nhgrif


People also ask

How do you install pods?

To install the pods, do one of the following: Place the caret at the code line where you add the pod, press ⌥ ⏎ , select Install, and press ⏎ . Click Install pods in the top-left corner of the editor window. From the main menu, select Tools | CocoaPods | Install.


2 Answers

At first In Podfile replace source "https://github.com/CocoaPods/Specs" with "source "https://github.com/CocoaPods/Old-Specs"

Move to your workspace root folder by below command :

cd <path to your workspace>

Pod install

If it doesn't work well then try above steps after following below steps.

In Terminal follow these steps :

gem list --local | grep cocoapods

You see output similar to this:

cocoapods (0.27.1, 0.20.2)
cocoapods-core (0.27.1, 0.20.2)
cocoapods-downloader (0.2.0, 0.1.2)

now for a safer side delete all local pods using below command :

sudo gem uninstall cocoapods
sudo gem uninstall cocoapods-core
sudo gem uninstall cocoapods-downloader

safer side delete cocoa pods version 0.39.0

sudo gem uninstall cocoapods -v 0.39.0

reinstall cocoa pods version 0.39.0

sudo gem install cocoapods -v 0.39.0

Then run below commands in terminal :

cd <path to your workspace>
pod install (this time it would fail again, but that's fine)
cd ~/.cocoapods/repos
git clone https://github.com/CocoaPods/Specs.git
cd specs
git checkout v0.32.1

Move to your workspace root folder by below command :

cd <path to your workspace>

run below commands :

rm -rf Pods
rm -rf Podfile.lock
pod install (this time you should be able to see it working)
like image 108
AnshulSharma Avatar answered Nov 04 '22 21:11

AnshulSharma


Hi I tried above all answers, But nothing got working, Finally I tried these Steps in Terminal.

1- Open Terminal
2- cd < Your Project File Location>
3- sudo gem install cocoapods --pre
4- pod setup
5- touch podfile
6- pod install
like image 23
ChenSmile Avatar answered Nov 04 '22 21:11

ChenSmile