bundle exec pod install -> Failed to find known source with the URL "trunk"

Viewed 2157

I'm following some instructions left behind for an Xcode repository.

$ bundle exec pod install
Analyzing dependencies
[!] The version of CocoaPods used to generate the lockfile (1.9.3) is higher than the version of the \
current executable (1.6.1). Incompatibility issues may arise.

I think this leads to the error:

 Failed to find known source with the URL "trunk"

When I check the version of pods, I get:

$ pod --version
1.10.0

My assumption (but I could be wrong), is that I either need to run the command to it runs the newer version of pod, or I need to install the newer version in a different place.

Added info (per comment's request)

$ gem list pod

*** LOCAL GEMS ***

cocoapods (1.10.1, 1.10.0)
cocoapods-core (1.10.1, 1.10.0)
cocoapods-deintegrate (1.0.4)
cocoapods-downloader (1.4.0)
cocoapods-plugins (1.0.0)
cocoapods-search (1.0.0)
cocoapods-trunk (1.5.0)
cocoapods-try (1.2.0)


$ grep -i pod Gemfile.lock
    cocoapods (1.6.1)
      cocoapods-core (= 1.6.1)
      cocoapods-deintegrate (>= 1.0.2, < 2.0)
      cocoapods-downloader (>= 1.2.2, < 2.0)
      cocoapods-plugins (>= 1.0.0, < 2.0)
      cocoapods-search (>= 1.0.0, < 2.0)
      cocoapods-stats (>= 1.0.0, < 2.0)
      cocoapods-trunk (>= 1.3.1, < 2.0)
      cocoapods-try (>= 1.1.0, < 2.0)
    cocoapods-core (1.6.1)
    cocoapods-deintegrate (1.0.4)
    cocoapods-downloader (1.2.2)
    cocoapods-plugins (1.0.0)
    cocoapods-search (1.0.0)
    cocoapods-stats (1.1.0)
    cocoapods-trunk (1.3.1)
    cocoapods-try (1.1.0)
  cocoapods
1 Answers

I've run into this issue multiple times, not sure why though. To fix I run the following terminal commands in the project directory:

sudo gem install cocoapods-deintegrate cocoapods-clean (ONLY if you do not have cocoapods-deintegrate and cocoapods-clean installed)

pod deintegrate

pod clean

pod setup

pod install

From my understanding this will completely clear and reinstall the pod files. Again I am not sure what causes the issue to start with, but this works for me.

Related