realm / realm-swift

Realm is a mobile database: a replacement for Core Data & SQLite
https://realm.io
Apache License 2.0
16.27k stars 2.14k forks source link

Error installing through cocoapods / manual install #2340

Closed ketansmodha closed 9 years ago

ketansmodha commented 9 years ago

I have tried to integrate Realm through manual install as it is described in documentation but no luck. Also I have tried integrating through cocoapods but everytime when I install it through cocoapods it shows me error which is reported by other guys too.

While installing through cocoapods, I'm having similar issue reported on #1022. I'm on OS X 10.9.5, running XCode 6.2 and Cocoapods 0.38.2.

I get an error running pod install to configure Realm. I also tried removing /tmp/core_bin as suggested in issue #1022 but it didn't help. Please advise!

Error that I am facing is as below

Analyzing dependencies Downloading dependencies Installing Realm (0.94.0) [!] /bin/bash -c set -e sh build.sh cocoapods-setup

core is not a symlink. Deleting... Downloading dependency: core 0.92.0 core/librealm-watchos.a: (Empty error message) tar: Error exit delayed from previous errors. mv: rename /var/folders/54/8ydcxqy177b2ppd6f_0pnvnh0000gn/T//core_bin/core-0.92.0 to ./core-0.92.0: No such file or directory

segiddins commented 9 years ago

@ketansmodha I'm unable to reproduce the issues you're seeing. Could you try running the following and sharing the output? Thanks!

rm -rf $TMPDIR/core_bin
rm -rf ~/Library/Caches/CocoaPods
rm -rf Pods/Realm
pod install --verbose
mobilinked commented 9 years ago

@segiddins I have same problem, please check following the output after taking actions as you suggested:

-> Installing Realm (0.94.0)

Git download Git download $ /usr/bin/git clone https://github.com/realm/realm-cocoa.git /var/folders/n9/cjps42gj4cbcjq0p0myw0l880000gn/T/d20150808-1405-fwifo1 --single-branch --depth 1 --branch v0.94.0 Cloning into '/var/folders/n9/cjps42gj4cbcjq0p0myw0l880000gn/T/d20150808-1405-fwifo1'... Note: checking out 'd6ad6cf6716d45425bab692c8a699bf2ac5ce96c'.

 You are in 'detached HEAD' state. You can look around, make experimental
 changes and commit them, and you can discard any commits you make in this
 state without impacting any branches by performing another checkout.

 If you want to create a new branch to retain commits you create, you may
 do so (now or later) by using -b with the checkout command again. Example:

   git checkout -b new_branch_name

Running prepare command $ /bin/bash -c set -e sh build.sh cocoapods-setup core is not a symlink. Deleting... Downloading dependency: core 0.92.0 Downloading core failed. Please try again once you have an Internet connection. [!] /bin/bash -c set -e sh build.sh cocoapods-setup

core is not a symlink. Deleting... Downloading dependency: core 0.92.0 Downloading core failed. Please try again once you have an Internet connection.

/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/executable.rb:70:in execute_command' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/executable.rb:27:inblock in executable' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer/pod_source_preparer.rb:64:in block (2 levels) in run_prepare_command' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer/pod_source_preparer.rb:60:inchdir' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer/pod_source_preparer.rb:60:in block in run_prepare_command' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/user_interface.rb:59:insection' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer/pod_source_preparer.rb:59:in run_prepare_command' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer/pod_source_preparer.rb:37:inprepare!' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/downloader/cache.rb:201:in copy_and_clean' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/downloader/cache.rb:158:inblock (2 levels) in uncached_pod' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/downloader/cache.rb:156:in each' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/downloader/cache.rb:156:inblock in uncached_pod' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/downloader/cache.rb:180:in call' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/downloader/cache.rb:180:inin_tmpdir' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/downloader/cache.rb:152:in uncached_pod' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/downloader/cache.rb:33:indownload_pod' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/downloader.rb:34:in download' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer/pod_source_installer.rb:103:indownload_source' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer/pod_source_installer.rb:53:in install!' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:328:ininstall_source_of_pod' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:303:in block (2 levels) in install_pod_sources' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/user_interface.rb:80:intitled_section' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:302:in block in install_pod_sources' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:294:ineach' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:294:in install_pod_sources' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:143:inblock in download_dependencies' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/user_interface.rb:59:in section' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:141:indownload_dependencies' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:105:in install!' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/command/project.rb:71:inrun_install_with_update' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/command/project.rb:101:in run' /Library/Ruby/Gems/2.0.0/gems/claide-0.9.1/lib/claide/command.rb:312:inrun' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/command.rb:48:in run' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/bin/pod:44:in<top (required)>'

segiddins commented 9 years ago

Hm so as the error message is saying for you, Downloading core failed. Please try again once you have an Internet connection.

That looks like it's probably the issue for you, @mobilinked, which is not the same as @ketansmodha's issue.

mobilinked commented 9 years ago

@segiddins Thanks. Tried MANY times, but failed. Do you know more details about core? where can I download it directly?

segiddins commented 9 years ago

Can you try just downloading core via your browser? It's at http://static.realm.io/downloads/core/realm-core-0.92.0.tar.bz2, which is exactly what the Podspec's prepare_command is curling.

mobilinked commented 9 years ago

Thanks much. it was because of slow network.

segiddins commented 9 years ago

@ketansmodha since we haven't heard back from you for a bit, I'm going to go ahead and close this issue for now, but feel free to re-open it if you have further information or see it again!

vijay120 commented 9 years ago

Hello I am experiencing similar issues as @ketansmodha. My network seems to be fine.

onmyway133 commented 8 years ago

I get this error as well

Installing Realm (0.96.0)
[!] /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.
jpsim commented 8 years ago

@onmyway133 as the error message indicates, Realm's core binaries couldn't be downloaded. This can happen if you have a poor internet connection, or if AWS S3 is experiencing issues, or if you're in an embargoed country that we legally cannot export to.

onmyway133 commented 8 years ago

@jpsim maybe it's because of AWS S3, the next time I tried, it worked for me. Thanks

AndyIbanez commented 8 years ago

Currently having this issue.

I'm certain it's a problem with Realm's servers. Other dependencies seem to work fine. This is the output of my pod install --verbose:

Andys-iMac:Mignori andyibanez$ rm -rf $TMPDIR/core_bin
Andys-iMac:Mignori andyibanez$ rm -rf ~/Library/Caches/CocoaPods
Andys-iMac:Mignori andyibanez$ rm -rf Pods/Realm
Andys-iMac:Mignori andyibanez$ pod install --verbose
  Preparing

Updating local specs repositories

Updating spec repo `master`
  $ /usr/bin/git pull --ff-only
  Already up-to-date.

Analyzing dependencies

Inspecting targets to integrate
  Using `ARCHS` setting to build architectures of target `Pods`: (``)

Finding Podfile changes
  A Realm
  A RealmSwift
  - Alamofire
  - Async
  - Crashlytics
  - Fabric
  - Flurry-iOS-SDK
  - IAPHelper
  - MWPhotoBrowser
  - SSZipArchive
  - SVProgressHUD
  - SWRevealViewController
  - StandardPaths
  - SwiftyJSON

Resolving dependencies of `Podfile`

Comparing resolved specification to the sandbox manifest
  A Realm
  A RealmSwift
  - Alamofire
  - Async
  - Crashlytics
  - DACircularProgress
  - Fabric
  - Flurry-iOS-SDK
  - IAPHelper
  - MBProgressHUD
  - MWPhotoBrowser
  - SDWebImage
  - SSZipArchive
  - SVProgressHUD
  - SWRevealViewController
  - StandardPaths
  - SwiftyJSON

Downloading dependencies

-> Using Alamofire (3.1.2)

-> Using Async (0.2.0)

-> Using Crashlytics (3.4.0)

-> Using DACircularProgress (2.3.1)

-> Using Fabric (1.6.0)

-> Using Flurry-iOS-SDK (7.3.0)

-> Using IAPHelper (1.0.8.1)

-> Using MBProgressHUD (0.9.1)

-> Using MWPhotoBrowser (2.1.1)

-> Installing Realm (0.96.2)
 > Git download
 > Git download
     $ /usr/bin/git clone https://github.com/realm/realm-cocoa.git
     /var/folders/hm/m7nkmbcx3w96rtcht60t3n1m0000gn/T/d20151120-69473-1kqnshm --single-branch
     --depth 1 --branch v0.96.2
     Cloning into '/var/folders/hm/m7nkmbcx3w96rtcht60t3n1m0000gn/T/d20151120-69473-1kqnshm'...
     Note: checking out '0570ad292cb64ef90493e6a5782ea29391cdbcc9'.

     You are in 'detached HEAD' state. You can look around, make experimental
     changes and commit them, and you can discard any commits you make in this
     state without impacting any branches by performing another checkout.

     If you want to create a new branch to retain commits you create, you may
     do so (now or later) by using -b with the checkout command again. Example:

       git checkout -b <new-branch-name>

     Checking out files: 100% (677/677), done.
 > Running prepare command
   $ /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.
[!] /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.

/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/executable.rb:70:in `execute_command'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/executable.rb:27:in `block in executable'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/installer/pod_source_preparer.rb:64:in `block (2 levels) in run_prepare_command'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/installer/pod_source_preparer.rb:60:in `chdir'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/installer/pod_source_preparer.rb:60:in `block in run_prepare_command'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/user_interface.rb:59:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/installer/pod_source_preparer.rb:59:in `run_prepare_command'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/installer/pod_source_preparer.rb:37:in `prepare!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/downloader/cache.rb:201:in `copy_and_clean'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/downloader/cache.rb:158:in `block (2 levels) in uncached_pod'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/downloader/cache.rb:156:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/downloader/cache.rb:156:in `block in uncached_pod'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/downloader/cache.rb:180:in `call'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/downloader/cache.rb:180:in `in_tmpdir'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/downloader/cache.rb:152:in `uncached_pod'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/downloader/cache.rb:33:in `download_pod'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/downloader.rb:34:in `download'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/installer/pod_source_installer.rb:113:in `download_source'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/installer/pod_source_installer.rb:53:in `install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/installer.rb:339:in `install_source_of_pod'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/installer.rb:306:in `block (2 levels) in install_pod_sources'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/user_interface.rb:80:in `titled_section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/installer.rb:305:in `block in install_pod_sources'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/installer.rb:297:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/installer.rb:297:in `install_pod_sources'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/installer.rb:146:in `block in download_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/user_interface.rb:59:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/installer.rb:144:in `download_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/installer.rb:106:in `install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/command/project.rb:71:in `run_install_with_update'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/command/project.rb:101:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-0.9.1/lib/claide/command.rb:312:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/command.rb:47:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/bin/pod:44:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'

Downloading the file directly from the link above (which I believe is slightly outdated now) works fine on my browser, so I'm not getting IP blocked.

What other solutions are there?

jpsim commented 8 years ago

You can unpack the core archive directly into your core directory.

AndyIbanez commented 8 years ago

It worked fine when I tried again a few hours later. Thanks for your reply though!

mslayton-abra commented 8 years ago

It appears that the TMPDIR variable in the build.sh install script was not being defined for 0.96.3. After defining it explicitly on the command line and rerunning the script, the build worked properly.

TMPDIR=/path/to/valid/tmp pod install