8
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

cocoapodsで [!] Unable to find a specification for `ライブラリ名`のとき

Last updated at Posted at 2016-01-26

該当ディレクトリで
$ pod installしたら

こんなエラーが出てくる
[!] Unable to find a specification for "ライブラリ名"

その時はmasterにそのライブラリが入ってるか確認
$ pod search "検索文言"

検索文言にSlackといれました。

はいってたらこんな感じに該当ライブラリが出る

-> SlackTextViewController (1.9.1)
   A drop-in UIViewController subclass with a custom growing text input and
   other useful messaging features.
   pod 'SlackTextViewController', '~> 1.9.1'
   - Homepage: https://slack.com/
   - Source:   https://github.com/slackhq/SlackTextViewController.git
   - Versions: 1.9.1, 1.9, 1.8, 1.7.2, 1.7.1, 1.7, 1.6, 1.5.2, 1.5, 1.4.1, 1.4,
   1.3.3, 1.3.2, 1.3.1, 1.3, 1.2.10, 1.2.9, 1.2.8, 1.2.7, 1.2.6, 1.2.5, 1.2.4,
   1.2.3, 1.2.2, 1.2.1, 1.2, 1.1.1, 1.1, 1.0 [master repo]

入ってなかったらこんな感じ

$ pod search "hogenyan"
[!] Unable to find a pod with name matching "hogenyan"

ちゃんとlistにはいってるじゃない!
絶対cocoapodsのmasterがおかしい!

っていうとき

cocoapodsのmaster(ライブラリをversion別に管理しているところ)が壊れちゃってる時もあります

わたしはいつも下記コマンドでなおしてます
(cocoapodsの公式で言ってたきがする)


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


$ pod setup
ーーーーSetup completed

$ pod install

毎回うんざりするんですけどこのなおし方で本当に良いのかな〜

8
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?