Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"You don't have write permissions for the /usr/bin directory." when installing Sass using the Gem command

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,

"ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /usr/bin directory."

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?

Thanks,

Wade

like image 721
Wade M. Avatar asked Mar 10 '18 19:03

Wade M.


1 Answers

/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 

to install into a writeable directory

like image 53
Alan Birtles Avatar answered Oct 20 '22 20:10

Alan Birtles