卸载后无法安装可可豆荚,导致错误 [英] Cannot install cocoa pods after uninstalling, results in error

查看:128
本文介绍了卸载后无法安装可可豆荚,导致错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我删除了可可豆荚,因为它声称它已安装,但一直说未找到命令包。当试图重新安装cocoapods( sudo gem install cocoa pods -v )时出现此错误:

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:


错误:执行gem时...(Errno :: EPERM)
不允许操作 - / usr / bin / pod

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

任何想法?

推荐答案

正如Ramesh Ramchandaran在下面指出的那样,这是一种更清洁的方式,而不是获取围绕OS X的安全功能。

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






原始答案



我假设你正在运行OS X 10.11。


Original Answer

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

这种情况正在发生,因为Apple已经在新安装上启用了rootless。

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

如果是ou类型:

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

terminal.app 中,你的计算机将在禁用时重启。

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

完成后,输入:

sudo gem install cocoapods -V

-V 用于详细,如果发生任何错误,将吐出。

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

这篇关于卸载后无法安装可可豆荚,导致错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆