cocopods 命令行执行命令时报错You don't have write permissions for the /Library/*

www.MyException.Cn 网友分享于:2015-06-12 浏览:0次

命令行执行命令时报错You don't have write permissions for the /Library/***
这是因为要执行这些操作时必须有管理员的权限(比如更新软件),比如更新cocoapods时报错
soindy:SmartThermo soindy$ gem install cocoapods
Fetching: cocoapods-core-0.37.2.gem (100%)
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
只需要在命令前加上sudo,例如:sudo gem install cocoapods即可.sudo是获取管理员权限,现在按照步骤输入管理员密码即可.

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容