0

I’m running the latest version of react native, whenever I create a new project through the terminal, I receive a message saying that I have to install pods manually by going to the iOS folder. When I do so, the pod install fails. I’ve tried running ‘sudo gem install’ and deleting and reinstalling react native.

This is the error I'm getting now when trying to run rbenv:

BUILD FAILED (OS X 10.15.1 using ruby-build 20191111)

Inspect or clean up the working tree at /var/folders/rh/5076xlbn4g9gzkvwk1wkjg400000gn/T/ruby-build.20191120204401.79920.wx7t9i
Results logged to /var/folders/rh/5076xlbn4g9gzkvwk1wkjg400000gn/T/ruby-build.20191120204401.79920.log

Last 10 log lines:
*** building:

    make depend
making all in crypto...
/usr/bin/perl ../util/mkbuildinf.pl "clang -I. -I.. -I../include  -fPIC -fno-common -DOPENSSL_PIC -DZLIB_SHARED -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -arch x86_64 -O3 -DL_ENDIAN -Wall -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM" "darwin64-x86_64-cc" >buildinf.h
clang -I. -I.. -I../include  -fPIC -fno-common -DOPENSSL_PIC -DZLIB_SHARED -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -arch x86_64 -O3 -DL_ENDIAN -Wall -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -I/Users/User1/.rbenv/versions/2.2.4/include   -c -o cryptlib.o cryptlib.c
/bin/sh: User1/.rbenv/versions/2.2.4/include: No such file or directory
make[1]: *** [cryptlib.o] Error 127
make: *** [build_crypto] Error 1
clang: error: no input files

This is the $HOME directory

8
  • 1
    can you check to see if there is Podfile? and can you remove Podfile.lock before re-installing? Commented Nov 16, 2019 at 5:33
  • There is Podfile but not Podfile.lock Commented Nov 16, 2019 at 6:59
  • 1
    i see. are you able to do a pod repo update and rm -rf node_modules && npm install before doing a pod install? Commented Nov 16, 2019 at 7:12
  • 1
    it seems like your pod installation and downloads got blocked. can you take a look at this github comment? Commented Nov 16, 2019 at 10:52
  • 1
    how about sudo rm -rf ~/.cocoapods and do another pod install? there are also other suggestions raised in this SO post. check it out. Commented Nov 18, 2019 at 6:29

1 Answer 1

1
+50

I have already faced this problem. I don't know why, but the default Ruby version on mac causes problems.

To get over this, I use Rbenv which is Ruby versions manager.

Here's how to install it

brew install rbenv

In your bash_profile or bashrc or zshrc whatever put this code and don't forget to source your file

export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"

Install a Ruby version with rbenv different from your actual version to be sure rbenv works.

rbenv install 2.5.3
rbenv global 2.5.3
rbenv rehash
ruby -v //ensure that you're now using 2.5.3 version
gem install cocoapods

Delete your Pods/ Podfile.lock and try to run pod install again. It should do the trick. As I said, it worked for me and the members of my project team. You must remember not to use sudo.

Keep me in touch I can provide clarification if you're stuck

Sign up to request clarification or add additional context in comments.

7 Comments

I received the following error when running rubyv install 2.5.3: BUILD FAILED (OS X 10.15.1 using ruby-build 20191111) Inspect or clean up the working tree at /var/folders/rh/5076xlbn4g9gzkvwk1wkjg400000gn/T/ruby-build.20191120062653.49305.6q008u Results logged to /var/folders/rh/5076xlbn4g9gzkvwk1wkjg400000gn/T/ruby-build.20191120062653.49305.log
You mean you can’t even install rbenv ?
I can successfully installed rbenv but I can't successfully run the command rbenv install 2.5.3
Maybe this SO Post can help you
Didn’t seem to help.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.