LoginSignup
0
1

More than 5 years have passed since last update.

Realm が Downloading core failed. によって pod install に失敗する場合の対処療法

Last updated at Posted at 2015-10-26

現象

たぶん一時的なエラーだとは思うのですが、CocoaPods pod install / ソースビルド sh build.sh build いずれでも以下のようなエラーで必ずビルドに失敗してしまいます。原因はよくわかりませんが、どうも realm-core なるライブラリ一式のダウンロード途中で失敗してしまっているようです。

Installing Realm (0.96.1)
[!] /usr/local/bin/bash -c 
set -e
sh build.sh cocoapods-setup

core is not a symlink. Deleting...

Downloading dependency: core 0.94.0

Downloading core failed. Please try again once you have an Internet connection.

対処

回線速度やその他要因の可能性もあるのでこれは一時的なものかもしれませんが、build.sh におけるライブラリのダウンロード処理を飛ばす方法でとりあえず対処しました。

realm-core ライブラリは次の URL から取得されるようなので、ブラウザや curl などであらかじめ自分で取得しておきます。

build.shより抜粋
${REALM_CORE_VERSION:=0.94.0}
〜
https://static.realm.io/downloads/core/realm-core-${REALM_CORE_VERSION}.tar.bz2
curl
$ curl -f -L --verbose "https://static.realm.io/downloads/core/realm-core-0.94.0.tar.bz2" -o $TMPDIR/core_bin/core-0.94.0.tar.bz2

build.sh でダウンロードされる bzip2 ファイルは $TMPDIR/core_bin/core-{REALM_CORE_VERSION}.tar.bz2 に置かれるので、リネームしてここに配置しておきます。(ファイル名が変わります。)

これで pod install が通るようになりました。

s.png

0
1
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
0
1