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

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/soindy/article/details/46470463

       这是因为要执行这些操作时必须有管理员的权限(比如更新软件),比如更新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是获取管理员权限,现在按照步骤输入管理员密码即可.


阅读更多
换一批

没有更多推荐了,返回首页