New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High Sierra: bad interpreter #6898

Closed
Juice805 opened this Issue Jul 25, 2017 · 17 comments

Comments

Projects
None yet
@Juice805

Juice805 commented Jul 25, 2017

Report

What did you do?

Run pod

What did you expect to happen?

run

What happened instead?

-bash: /usr/local/bin/pod: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby: bad interpreter: No such file or directory

CocoaPods Environment

1.2.1

Similar to this report I am unable to use the pod command. However, unlike his report reinstalling does not fix the issue.

@Juice805

This comment has been minimized.

Show comment
Hide comment
@Juice805

Juice805 Jul 25, 2017

Seemed to have fixed it. Some combination of rbenv, and sudo xcode-select --switch /Applications/Xcode-beta.app. It seems it was searching /Users/justin/Applications/Xcode.app originally and finding no CL Dev tools

Juice805 commented Jul 25, 2017

Seemed to have fixed it. Some combination of rbenv, and sudo xcode-select --switch /Applications/Xcode-beta.app. It seems it was searching /Users/justin/Applications/Xcode.app originally and finding no CL Dev tools

@Juice805 Juice805 closed this Jul 25, 2017

@justvanbloom

This comment has been minimized.

Show comment
Hide comment
@justvanbloom

justvanbloom Sep 26, 2017

for all others:

gem install -n /usr/local/bin cocoapods

fixes it

justvanbloom commented Sep 26, 2017

for all others:

gem install -n /usr/local/bin cocoapods

fixes it

@raisezhang

This comment has been minimized.

Show comment
Hide comment
@raisezhang

raisezhang Sep 29, 2017

sudo gem update --system
sudo gem install -n /usr/local/bin cocoapods

raisezhang commented Sep 29, 2017

sudo gem update --system
sudo gem install -n /usr/local/bin cocoapods
@anton-ogarkov

This comment has been minimized.

Show comment
Hide comment
@anton-ogarkov

anton-ogarkov Oct 3, 2017

Actually if you are using Fastlane and have this issue with it, you can use the approach from @raisezhang . Just use fastlane instead of cocoapods in the last command.

anton-ogarkov commented Oct 3, 2017

Actually if you are using Fastlane and have this issue with it, you can use the approach from @raisezhang . Just use fastlane instead of cocoapods in the last command.

@chuongtrh

This comment has been minimized.

Show comment
Hide comment
@chuongtrh

chuongtrh Oct 9, 2017

Actually if you are using Fastlane and have this issue with it, you can use the approach from @raisezhang . Just use fastlane instead of cocoapods in the last command.

Try running ~/.fastlane/bin/fastlane env
@KrauseFx

chuongtrh commented Oct 9, 2017

Actually if you are using Fastlane and have this issue with it, you can use the approach from @raisezhang . Just use fastlane instead of cocoapods in the last command.

Try running ~/.fastlane/bin/fastlane env
@KrauseFx

@chanduiosdeveloper

This comment has been minimized.

Show comment
Hide comment
@chanduiosdeveloper

chanduiosdeveloper Nov 10, 2017

After upgrading to macOS High Sierra, get it fixed with following commands:
sudo gem install cocoapods

chanduiosdeveloper commented Nov 10, 2017

After upgrading to macOS High Sierra, get it fixed with following commands:
sudo gem install cocoapods

@shaunbaker04

This comment has been minimized.

Show comment
Hide comment
@shaunbaker04

shaunbaker04 Nov 16, 2017

Just installed High Sierra and had the above listed problem and used: sudo gem install cocoapods
Worked perfectly and I'm back in business. Thanks guys :)

shaunbaker04 commented Nov 16, 2017

Just installed High Sierra and had the above listed problem and used: sudo gem install cocoapods
Worked perfectly and I'm back in business. Thanks guys :)

@wangdetong

This comment has been minimized.

Show comment
Hide comment
@wangdetong

wangdetong Nov 16, 2017

(this help me)Try reinstalling:gem install cocoapods

wangdetong commented Nov 16, 2017

(this help me)Try reinstalling:gem install cocoapods

@donpauldev

This comment has been minimized.

Show comment
Hide comment
@donpauldev

donpauldev Nov 17, 2017

Try this:

sudo gem install -n /usr/local/bin cocoapods

donpauldev commented Nov 17, 2017

Try this:

sudo gem install -n /usr/local/bin cocoapods

@shaunbaker04

This comment has been minimized.

Show comment
Hide comment
@shaunbaker04

shaunbaker04 Nov 17, 2017

It's closed. Solved.

shaunbaker04 commented Nov 17, 2017

It's closed. Solved.

@jiaokang

This comment has been minimized.

Show comment
Hide comment
@jiaokang

jiaokang Nov 22, 2017

When I run gem update --system under root. I get a error :

Updating rubygems-update
Fetching: rubygems-update-2.7.2.gem (100%)
Successfully installed rubygems-update-2.7.2
Parsing documentation for rubygems-update-2.7.2
Installing ri documentation for rubygems-update-2.7.2
Installing darkfish documentation for rubygems-update-2.7.2
Done installing documentation for rubygems-update after 46 seconds
Parsing documentation for rubygems-update-2.7.2
Done installing documentation for rubygems-update after 0 seconds
Installing RubyGems 2.7.2
ERROR: While executing gem ... (Errno::EPERM)
Operation not permitted @ rb_sysopen - /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/gem

Any suggestion?

jiaokang commented Nov 22, 2017

When I run gem update --system under root. I get a error :

Updating rubygems-update
Fetching: rubygems-update-2.7.2.gem (100%)
Successfully installed rubygems-update-2.7.2
Parsing documentation for rubygems-update-2.7.2
Installing ri documentation for rubygems-update-2.7.2
Installing darkfish documentation for rubygems-update-2.7.2
Done installing documentation for rubygems-update after 46 seconds
Parsing documentation for rubygems-update-2.7.2
Done installing documentation for rubygems-update after 0 seconds
Installing RubyGems 2.7.2
ERROR: While executing gem ... (Errno::EPERM)
Operation not permitted @ rb_sysopen - /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/gem

Any suggestion?

@zirinisp

This comment has been minimized.

Show comment
Hide comment
@zirinisp

zirinisp Nov 22, 2017

I got this issue with both cocoapods and fastlane. Using @raisezhang solution fixed both

zirinisp commented Nov 22, 2017

I got this issue with both cocoapods and fastlane. Using @raisezhang solution fixed both

@surya687

This comment has been minimized.

Show comment
Hide comment
@surya687

surya687 Dec 13, 2017

I too have the same problem as mentioned in the above post When I run gem update --system under root.

surya687 commented Dec 13, 2017

I too have the same problem as mentioned in the above post When I run gem update --system under root.

@abhiveeru85

This comment has been minimized.

Show comment
Hide comment
@abhiveeru85

abhiveeru85 Jan 9, 2018

I am having the same issue as mentioned by @jiaokang, gem update --system giving error under root.

abhiveeru85 commented Jan 9, 2018

I am having the same issue as mentioned by @jiaokang, gem update --system giving error under root.

@justvanbloom

This comment has been minimized.

Show comment
Hide comment
@justvanbloom

justvanbloom Jan 9, 2018

Not as root. Exec as normal user.
See my first comment or here

gem install -n /usr/local/bin cocoapods

OS X does not allow in system due to system integrate protection. Shure you can turn it off but thats a bad idea. And /usr/local/bin is correct for now.

justvanbloom commented Jan 9, 2018

Not as root. Exec as normal user.
See my first comment or here

gem install -n /usr/local/bin cocoapods

OS X does not allow in system due to system integrate protection. Shure you can turn it off but thats a bad idea. And /usr/local/bin is correct for now.

@dodikk

This comment has been minimized.

Show comment
Hide comment
@dodikk

dodikk Feb 8, 2018

@jiaokang , I've faced the same issue. My workaround was installing cocoapods via homebrew. (Since all gem based instructions were failing for me).

brew install cocoapods
brew link --overwrite cocoapods

P.S. The second instruction has been suggested by homebrew

Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/pod
Target /usr/local/bin/pod
already exists. You may want to remove it:
  rm '/usr/local/bin/pod'

To force the link and overwrite all conflicting files:
  brew link --overwrite cocoapods

To list all files that would be deleted:
  brew link --overwrite --dry-run cocoapods

dodikk commented Feb 8, 2018

@jiaokang , I've faced the same issue. My workaround was installing cocoapods via homebrew. (Since all gem based instructions were failing for me).

brew install cocoapods
brew link --overwrite cocoapods

P.S. The second instruction has been suggested by homebrew

Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/pod
Target /usr/local/bin/pod
already exists. You may want to remove it:
  rm '/usr/local/bin/pod'

To force the link and overwrite all conflicting files:
  brew link --overwrite cocoapods

To list all files that would be deleted:
  brew link --overwrite --dry-run cocoapods
@revolter

This comment has been minimized.

Show comment
Hide comment
@revolter

revolter Mar 3, 2018

Contributor

And you have to pass -n /usr/local/bin for every gem you install? Because it solved this exact issue affecting another gem, not CocoaPods.

Contributor

revolter commented Mar 3, 2018

And you have to pass -n /usr/local/bin for every gem you install? Because it solved this exact issue affecting another gem, not CocoaPods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment