Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"`pod repo update` does not happen" error in CocoaPods

I download and install CocoaPods from its website, and my pod version is pod --version 1.0.0.

When I want to install Alamofire or swiftJSON, for example, by adding them to my podfile and running pod install

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

target 'random contact' do
  pod 'Alamofire', '~> 3.4'
  pod 'SwiftyJSON'
end

I get this error:

Analyzing dependencies
[!] Unable to satisfy the following requirements:

- `Alamofire (~> 3.4)` required by `Podfile`

None of your spec sources contain a spec satisfying the dependency: `Alamofire (~> 3.4)`.

You have either:
 * out-of-date source repos which you can update with `pod repo update`.
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.

As the error says, I run pod repo update in my Terminal and then it prints this long message:

Updating spec repo `master`
  $ /Applications/CocoaPods.app/Contents/Resources/bundle/bin/git pull --ff-only
  error: Your local changes to the following files would be overwritten by merge:
    CocoaPods-version.yml
    Specs/AGIPC/0.0.2/AGIPC.podspec.json
    Specs/APIService-UmengAnalytics/3.6.6/APIService-UmengAnalytics.podspec.json
    Specs/Accengage-iOS-SDK@iOS-stars/5.4.0/[email protected]
    Specs/AdToApp/45.29/AdToApp.podspec.json
    Specs/AdToApp/45.30/AdToApp.podspec.json
    Specs/AdToApp/45.31/AdToApp.podspec.json
    Specs/AdToApp/45.32/AdToApp.podspec.json
    Specs/AesUtils/0.1.0/AesUtils.podspec.json
    Specs/AesUtils/0.2.0/AesUtils.podspec.json
    Specs/AesUtils/0.3.1/AesUtils.podspec.json
    Specs/AesUtils/0.3.3/AesUtils.podspec.json
    Specs/AesUtils/0.4.0/AesUtils.podspec.json
    Specs/AesUtils/0.4.1/AesUtils.podspec.json
    Specs/AesUtils/0.4.2/AesUtils.podspec.json
    Specs/AesUtils/0.5.0/AesUtils.podspec.json
    Specs/AesUtils/0.6.1/AesUtils.podspec.json
    Specs/AudioPlayer-Swift/1.0/AudioPlayer-Swift.podspec.json
    Specs/AudioPlayerSwift/1.0/AudioPlayerSwift.podspec.json
    Specs/AutoSizeTableView/1.0.1/AutoSizeTableView.podspec.json
    Specs/AutoSizeTableView/1.0.2/AutoSizeTableView.podspec.json
    Specs/AutoSizeTableView/1.0.3/AutoSizeTableView.podspec.json
    Specs/AutoSizeTableView/1.1.0/AutoSizeTableView.podspec.json
    Specs/BCMagicMoveTransition/1.0.2/BCMagicMoveTransition.podspec.json
    Specs/BMA4S/5.1.1.5/BMA4S.podspec.json
    Specs/BMA4S/5.1.1.7/BMA4S.podspec.json
    Specs/BMA4S/5.1.2/BMA4S.podspec.json
    Specs/BMA4S/5.1.3/BMA4S.podspec.json
    Specs/BMA4S/5.1.4/BMA4S.podspec.json
    Specs/BMA4S/5.2.0/BMA4S.podspec.json
    Specs/BMA4S/5.2.1/BMA4S.podspec.json
    Specs/BMA4S/5.2.2/BMA4S.podspec.json
    Specs/BMA4S/5.2.3/BMA4S.podspec.json
    Specs/BMA4S/5.2.4/BMA4S.podspec.json
    Specs/BMA4S/5.2.5/BMA4S.podspec.json
    Specs/BMA4S/5.2.6/BMA4S.podspec.json
    Specs/BMA4S/5.2.7/BMA4S.podspec.json
    Specs/BMA4S/5.2.8/BMA4S.podspec.json
    Specs/BMA4S/5.2.9/BMA4S.podspec.json
    Specs/BMA4S/5.3.0/BMA4S.podspec.json
    Specs/BMA4S/5.3.1/BMA4S.podspec.json
    Specs/BMA4S/5.3.2/BMA4S.podspec.json
    Specs/BMA4S/5.3.3/BMA4S.podspec.json
    Specs/BMA4S/5.3.4/BMA4S.podspec.json
    Specs/BMA4S/5.3.5/BMA4S.podspec.json
    Specs/Bucket/0.1.0/Bucket.podspec.json
    Specs/CrashlyticsFrameworkIOS/3.0.8/CrashlyticsFrameworkIOS.podspec.json
    Specs/CtrlZ/0.1.0/CtrlZ.podspec.json
    Specs/Curio_iOS_SDK/1.2.5/Curio_iOS_SDK.podspec.json
    Specs/DSTableViewWithDynamicHeight/1.0.3/DSTableViewWithDynamicHeight.podspec.json
    Specs/DZNCategories/1.0.4/DZNCategories.podspec.json
    Specs/DZNCategories/1.1.1/DZNCategories.podspec.json
    Specs/DZNCategories/1.1.2/DZNCategories.podspec.json
    Specs/DZNCategories/1.1/DZNCategories.podspec.json
    Specs/DZNCategories/1.2/DZNCategories.podspec.json
    Specs/DemoWatch1/8.0.18/DemoWatch1.podspec.json
    Specs/Drafter/1.0.0/Drafter.podspec.json
    Specs/FCGIKit/0.1.2/FCGIKit.podspec.json
    Specs/FCGIKit/0.1.7/FCGIKit.podspec.json
    Specs/FCGIKit/0.1.8/FCGIKit.podspec.json
    Specs/FCGIKit/0.2.0/FCGIKit.podspec.json
    Specs/FCGIKit/0.2.1/FCGIKit.podspec.json
    Specs/FCGIKit/0.2.2/FCGIKit.podspec.json
    Specs/FCGIKit/0.2.3/FCGIKit.podspec.json
    Specs/FCGIKit/0.2.4/FCGIKit.podspec.json
    Specs/FCGIKit/0.2.5/FCGIKit.podspec.json
    Specs/FCGIKit/0.2.6/FCGIKit.podspec.json
    Specs/FCHTTPClient/0.1.1/FCHTTPClient.podspec.json
    Specs/FCHTTPClient/0.1.21/FCHTTPClient.podspec.json
    Specs/FCHTTPClient/0.1.22/FCHTTPClient.podspec.json
    Specs/FCHTTPClient/0.1.4/FCHTTPClient.podspec.json
    Specs/FIDataFlowArchitecture/1.0.0/FIDataFlowArchitecture.podspec.json
    Specs/FIDataFlowArchitectureNew/1.0.0/FIDataFlowArchitectureNew.podspec.json
    Specs/FIDataFlowArchitectureNew/1.0.1/FIDataFlowArchitectureNew.podspec.json
    Specs/FIDataFlowArchitectureNew/1.0.10/FIDataFlowArchitectureNew.podspec.json
    Specs/FIDataFlowArchitectureNew/1.0.11/FIDataFlowArchitectureNew.podspec.json
    Specs/FIDataFlowArchitectureNew/1.0.12/FIDataFlowArchitectureNew.podspec.json
    Specs/FIDataFlowArchitectureNew/1.0.13/FIDataFlowArchitectureNew.podspec.json
    Specs/FIDataFlowArchitectureNew/1.0.14/FIDataFlowArchitectureNew.podspec.json
    Specs/FIDataFlowArchitectureNew/1.0.2/FIDataFlowArchitectureNew.podspec.json
    Specs/FIDataFlowArchitectureNew/1.0.3/FIDataFlowArchitectureNew.podspec.json
    Specs/FIDataFlowArchitectureNew/1.0.4/FIDataFlowArchitectureNew.podspec.json
    Specs/FIDataFlowArchitectureNew/1.0.5/FIDataFlowArchitectureNew.podspec.json
    Specs/FIDataFlowArchitectureNew/1.0.6/FIDataFlowArchitectureNew.podspec.json
    Specs/FIDataFlowArchitectureNew/1.0.7/FIDataFlowArchitectureNew.podspec.json
    Specs/FIDataFlowArchitectureNew/1.0.8/FIDataFlowArchitectureNew.podspec.json
    Specs/FIDataFlowArchitectureNew/1.0.9/FIDataFlowArchitectureNew.podspec.json
    Specs/FIDataFlowArchitectureNew/1.1.0/FIDataFlowArchitectureNew.podspec.json
    Specs/FIDataFlowArchitectureNew/1.1.1/FIDataFlowArchitectureNew.podspec.json
    Specs/FIDataFlowArchitectureNew/1.2.0/FIDataFlowArchitectureNew.podspec.json
    Specs/FIDataFlowArchitectureNew/1.2.1/FIDataFlowArchitectureNew.podspec.json
    Specs/FIDataFlowArchitectureNew/1.2.2/FIDataFlowArchitectureNew.podspec.json
    Specs/FIDataFlowArchitectureNew/1.2.3/FIDataFlowArchitectureNew.podspec.json
    Specs/FIDataFlowArchitectureNew/1.2.4/FIDataFlowArchitectureNew.podspec.json
    Specs/FIDataFlowArchitectureNew/1.2.5/FIDataFlowArchitectureNew.podspec.json
    Specs/FIDynamicViewController/0.1.0/FIDynamicViewController.podspec.json
    Specs/FIDynamicViewController/1.2.0/FIDynamicViewController.podspec.json
    Specs/FIDynamicViewController/1.2.1/FIDynamicViewController.podspec.json
    Specs/FIDynamicViewController/1.3.0/FIDynamicViewController.podspec.json
    Specs/FIDynamicViewController/1.3.1/FIDynamicViewController.podspec.json
    Specs/FIDynamicViewController/1.3.2/FIDynamicViewController.podspec.json
    Specs/FUIVerticalTabBarController/1.0.1/FUIVerticalTabBarController.podspec.json
    Specs/FUIVerticalTabBarController/1.0.2/FUIVerticalTabBarController.podspec.json
    Specs/FUIVerticalTabBarController/1.0.3/FUIVerticalTabBarController.podspec.json
    Specs/FUIVerticalTabBarController/1.0/FUIVerticalTabBarController.podspec.json
    Specs/GoogleOAuth2/1.0.126/GoogleOAuth2.podspec.json
    Specs/JMButtons/0.1.0/JMButtons.podspec.json
    Specs/JMButtons/0.1.1/JMButtons.podspec.json
    Specs/JMButtons/0.1.5/JMButtons.podspec.json
    Specs/JMButtons/0.1.7/JMButtons.podspec.json
    Specs/JMButtons/0.1.8/JMButtons.podspec.json
    Specs/JMButtons/0.2.0/JMButtons.podspec.json
    Specs/JMButtons/0.2.1/JMButtons.podspec.json
    Specs/JMButtons/0.2.2/JMButtons.podspec.json
    Specs/JMButtons/0.2.3/JMButtons.podspec.json
    Specs/JMButtons/0.2.4/JMButtons.podspec.json
    Specs/JMProgressStepper/0.0.4/JMProgressStepper.podspec.json
    Specs/LCTabBarControllerForLM/1.1.2/LCTabBarControllerForLM.podspec.json
    Specs/LeanCloud/3.1.0/LeanCloud.podspec.json
    Specs/MNSRemoteAB/1.0.0/MNSRemoteAB.podspec.json
    Specs/MNSRemoteAB/1.0.1/MNSRemoteAB.podspec.json
    Specs/MNSRemoteAB/1.0.2/MNSRemoteAB.podspec.json
    Specs/MNSRemoteAB/1.0.3/MNSRemoteAB.podspec.json
    Specs/MNSRemoteAB/1.0.6/MNSRemoteAB.podspec.json
    Specs/MNSRemoteAB/1.0.7/MNSRemoteAB.podspec.json
    Specs/MNSRemoteAB/1.0.8/MNSRemoteAB.podspec.json
    Specs/NHToolSets/0.1.1/NHToolSets.podspec.json
    Specs/NHToolSets/0.1.2/NHToolSets.podspec.json
    Specs/NHToolSets/0.1.3/NHToolSets.podspec.json
    Specs/NHToolSets/0.2.0/NHToolSets.podspec.json
    Specs/NHToolSets/0.2.1/NHToolSets.podspec.json
    Specs/NudgeSpotDemo/0.1.0/NudgeSpotDemo.podspec.json
    Specs/NudgeSpotDemo/0.1.1/NudgeSpotDemo.podspec.json
    Specs/ODObjCRuntime/1.0.0/ODObjCRuntime.podspec.json
    Specs/ODObjCRuntime/1.1.0/ODObjCRuntime.podspec.json
    Specs/ODObjCRuntime/1.1.1/ODObjCRuntime.podspec.json
    Specs/OneAPMLib/2.1.2/OneAPMLib.podspec.json
    Specs/PBToolKits/0.2.2/PBToolKits.podspec.json
    Specs/PBToolKits/0.2.3/PBToolKits.podspec.json
    Specs/PBToolKits/0.2.4/PBToolKits.podspec.json
    Specs/PBToolKits/0.2.5/PBToolKits.podspec.json
    Specs/PBToolKits/0.2.6/PBToolKits.podspec.json
    Specs/PBToolKits/0.2.7/PBToolKits.podspec.json
    Specs/PBToolKits/0.3.0/PBToolKits.podspec.json
    Specs/PBToolKits/0.3.1/PBToolKits.podspec.json
    Specs/PBToolKits/0.3.2/PBToolKits.podspec.json
    Specs/PBToolKits/0.3.3/PBToolKits.podspec.json
    Specs/PBToolKits/0.3.4/PBToolKits.podspec.json
    Specs/PBToolKits/0.3.5/PBToolKits.podspec.json
    Specs/PBToolKits/0.3.6/PBToolKits.podspec.json
    Specs/PBToolKits/0.3.7/PBToolKits.podspec.json
    Specs/React/0.1.0/React.podspec.json
    Specs/React/0.10.0-rc/React.podspec.json
    Specs/React/0.10.0/React.podspec.json
    Specs/React/0.11.0-rc/React.podspec.json
    Specs/React/0.11.0/React.podspec.json
    Specs/React/0.12.0-rc/React.podspec.json
    Specs/React/0.13.0-rc/React.podspec.json
    Specs/React/0.2.0/React.podspec.json
    Specs/React/0.2.1/React.podspec.json
    Specs/React/0.3.0/React.podspec.json
    Specs/React/0.3.1/React.podspec.json
    Specs/React/0.3.11/React.podspec.json
    Specs/React/0.3.2/React.podspec.json
    Specs/React/0.3.3/React.podspec.json
    Specs/React/0.3.4/React.podspec.json
    Specs/React/0.3.8/React.podspec.json
    Specs/React/0.4.0/React.podspec.json
    Specs/React/0.4.1/React.podspec.json
    Specs/React/0.4.2/React.podspec.json
    Specs/React/0.4.3/React.podspec.json
    Specs/React/0.4.4/React.podspec.json
    Specs/React/0.5.0/React.podspec.json
    Specs/React/0.6.0-rc/React.podspec.json
    Specs/React/0.6.0/React.podspec.json
    Specs/React/0.7.0-rc.2/React.podspec.json
    Specs/React/0.7.1/React.podspec.json
    Specs/React/0.8.0-rc.2/React.podspec.json
    Specs/React/0.8.0-rc/React.podspec.json
    Specs/React/0.8.0/React.podspec.json
    Specs/React/0.9.0-rc/React.podspec.json
    Specs/React/0.9.0/React.podspec.json
    Specs/Rollout.io/0.14.0/Rollout.io.podspec.json
    Specs/Rollout.io/0.14.1/Rollout.io.podspec.json
    Specs/SFProgressHUD/0.0.2/SFProgressHUD.podspec.json
    Specs/SFProgressHUD/0.0.3/SFProgressHUD.podspec.json
    Specs/SFProgressHUD/0.0.4/SFProgressHUD.podspec.json
    Specs/SFProgressHUD/0.1.1/SFProgressHUD.podspec.json
    Specs/SMW/0.1.1/SMW.podspec.json
    Specs/SOAPEngine/1.21.2/SOAPEngine.podspec.json
    Specs/SOAPEngine/1.24/SOAPEngine.podspec.json
    Specs/SOAPEngine/1.25.1/SOAPEngine.podspec.json
    Specs/SZCircleView/0.0.1/SZCircleView.podspec.json
    Specs/SZCircleView/0.0.2/SZCircleView.podspec.json
    Specs/SZCircleView/0.0.3/SZCircleView.podspec.json
    Specs/SZFrameHelper/0.0.1/SZFrameHelper.podspec.json
    Specs/SZQRCodeCoverView/0.0.1/SZQRCodeCoverView.podspec.json
    Specs/SZQRCodeCoverView/0.0.2/SZQRCodeCoverView.podspec.json
    Specs/SZTabSwitchBar/0.0.1/SZTabSwitchBar.podspec.json
    Specs/SZTabSwitchBar/0.0.2/SZTabSwitchBar.podspec.json
    Specs/SZTabSwitchBar/0.0.3/SZTabSwitchBar.podspec.json
    Specs/ShipLib/1.7.1/ShipLib.podspec.json
    Specs/ShipLib/1.7.3/ShipLib.podspec.json
    Specs/ShipLib/1.7.5/ShipLib.podspec.json
    Specs/ShipLib/1.7.6/ShipLib.podspec.json
    Specs/ShipLib/1.7/ShipLib.podspec.json
    Specs/ShipLib/2.0.0/ShipLib.podspec.json
    Specs/ShipLib/2.0.2/ShipLib.podspec.json
    Specs/ShipLib/2.0.3/ShipLib.podspec.json
    Specs/ShipLib/2.0.4/ShipLib.podspec.json
    Specs/ShipLib/2.0.5/ShipLib.podspec.json
    Specs/SuperModel/0.0.2/SuperModel.podspec.json
    Specs/SuperModel/0.0.3/SuperModel.podspec.json
    Specs/Tesseract-wrapper/0.0.2
    Specs/TestGhostPlus/1.05/TestGhostPlus.podspec.json
    Specs/TestGhostPlus/1.21/TestGhostPlus.podspec.json
    Specs/TestGhostPlus/1.22/TestGhostPlus.podspec.json
    Specs/UIImage+BPG/0.0.1/UIImage+BPG.podspec.json
    Specs/UIImage+BetterAdditions/2.0.0/UIImage+BetterAdditions.podspec.json
    Specs/UIImage+BetterAdditions/2.0.1/UIImage+BetterAdditions.podspec.json
    Specs/UIImage+BetterAdditions/2.0.2/UIImage+BetterAdditions.podspec.json
    Specs/ably/0.7.0/ably.podspec.json
    Specs/iOSBlocks/1.0.1/iOSBlocks.podspec.json
    Specs/iOSBlocks/1.0.2/iOSBlocks.podspec.json
    Specs/iOSBlocks/1.0/iOSBlocks.podspec.json
    Specs/iOSBlocks/1.1.1/iOSBlocks.podspec.json
    Specs/iOSBlocks/1.1/iOSBlocks.podspec.json
    Specs/iOSBlocks/1.2/iOSBlocks.podspec.json
    Specs/mParticle_Kahuna/2.10.1/mParticle_Kahuna.podspec.json
    Specs/mParticle_Kahuna/2.11.0/mParticle_Kahuna.podspec.json
    Specs/mParticle_Kahuna/2.11.1/mParticle_Kahuna.podspec.json
    Specs/mParticle_Kahuna/2.11.2/mParticle_Kahuna.podspec.json
    Specs/mParticle_Kahuna/2.11.3/mParticle_Kahuna.podspec.json
    Specs/mParticle_Kahuna/2.11.4/mParticle_Kahuna.podspec.json
    Specs/mParticle_Kahuna/2.12.0/mParticle_Kahuna.podspec.json
  Please, commit your changes or stash them before you can merge.
  Aborting
  Updating 075ddcb..44c0917

[!] CocoaPods was not able to update the `master` repo. If this is an unexpected issue and persists you can inspect it running `pod repo update --verbose`

How can I fix this issue?

like image 804
Sajad Avatar asked Jun 25 '16 16:06

Sajad


1 Answers

You might have a broken Specs repository. Cocoapods suggest you delete your local copies and reclone. Try:

$ sudo rm -fr ~/.cocoapods/repos/master

And then:

$ pod setup

I'd also recommend running:

sudo rm -fr ~/Library/Caches/CocoaPods/

before you run pod setup to clear the cache.

Here's their link: http://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/

like image 115
Meagan S. Avatar answered Sep 26 '22 03:09

Meagan S.