使用brew,gem安装工具的时候,总是容易报错,如下:
Fetching: aws-sdk-v1-1.67.0.gem (100%)
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory.
解决:在命令前面加上sudo
。
然后就会出现第二个错误:
Fetching: aws-sdk-v1-1.67.0.gem (100%)
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /usr/bin directory.
解决:在命令的install
后面加上-n /usr/local/bin
即可成功。