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

2023-07-29,,

这是由于要运行这些操作时必须有管理员的权限(比方更新软件),比方更新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是获取管理员权限,如今依照步骤输入管理员password就可以.

命令行运行命令时报错You don't have write permissions for the /Library/***的相关教程结束。

《命令行运行命令时报错You don't have write permissions for the /Library/***.doc》

下载本文的Word格式文档,以方便收藏与打印。