“您没有/usr/bin 目录的写权限."使用 Gem 命令安装 Sass 时 [英] "You don't have write permissions for the /usr/bin directory." when installing Sass using the Gem command
问题描述
我在 Mac 上尝试使用终端中的命令sudo gem install sass"安装 Sass.然后我输入我的密码,一切正常,直到弹出这个,
I'm on Mac and I'm trying to install Sass using the command in terminal, "sudo gem install sass". I then enter my password, and everything works fine until this pops up,
"错误:执行 gem 时 ... (Gem::FilePermissionError)您没有/usr/bin 目录的写权限."
"ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /usr/bin directory."
我确实使用了 sudo,但它仍然不起作用,这是您无法阅读和阅读的内容之一.写入权限.有什么想法吗?
I do use sudo, but it still doesn't work, and it's one of those things that you can't give yourself read & write permissions to. Any ideas?
谢谢,
韦德
推荐答案
/usr/bin
受系统完整性保护,不可写任何人甚至根.你需要运行:
/usr/bin
is protected by system integrity protection and is not writeable by
anybody even root. You need to run:
sudo gem install -n /usr/local/bin sass
安装到可写目录
这篇关于“您没有/usr/bin 目录的写权限."使用 Gem 命令安装 Sass 时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!