You don't have write permissions for the / usr/bin directory

using sudo gem install jekyll when installing jekyll has the following error

clipboard.png

:
sudo gem install -n /usr/local/bin jekyll

clipboard.png

is there any other way?
May.22,2021

in the OSX system, / usr/bin belongs to system-level protection. no one can write , including root , which is absolutely forbidden. The only way is to install it into / usr/local/bin as you did above.

Why is it so strict? Because the / usr/bin directory is so sensitive that any virus wants to conquer it, Apple strictly forbids it.

Menu