Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
344 views
in Technique[技术] by (71.8m points)

ios - Cannot install cocoa pods after uninstalling, results in error

I removed cocoa pods because it claimed it had installed, but kept saying the command pod wasn't found afterward. When trying to reinstall cocoapods (sudo gem install cocoa pods -v) I get this error:

ERROR: While executing gem ... (Errno::EPERM) Operation not permitted - /usr/bin/pod

Screenshot for error

Any ideas?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

As it has been pointed out below by Ramesh Ramchandaran, this is a cleaner way of doing it, instead of getting around the Security features of OS X.

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

Original Answer

I'm assuming you're running OS X 10.11.

This is happening because Apple has enabled rootless on the new install.

If you type:

sudo nvram boot-args="rootless=0"; sudo reboot

in terminal.app, your computer will reboot with it disabled.

Once that is done, type:

sudo gem install cocoapods -V

the -V is for verbose and will spit out any errors if they happen.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...