www.MyException.Cn 網(wǎng)友分享于:2015-06-12 瀏覽:0次
命令行執(zhí)行命令時(shí)報(bào)錯(cuò)You don't have write permissions for the /Library/***
這是因?yàn)橐獔?zhí)行這些操作時(shí)必須有管理員的權(quán)限(比如更新軟件),比如更新cocoapods時(shí)報(bào)錯(cuò)
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是獲取管理員權(quán)限,現(xiàn)在按照步驟輸入管理員密碼即可.