el capitan 绕过rootless

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/fjh658/article/details/48971625

el capitan 绕过rootless

关于 rootless 相关操作,参见 http://blog.csdn.net/fjh658/article/details/46535073


在 el capitan 增加了rootless,所谓rootless就是严格对os的一些系统目录做了限制,即使是sudo 也不能写


如何查看目录是否有限制?

ls -lO

-l      (The lowercase letter ``ell''.)  List in long format.  (See
             below.)  If the output is to a terminal, a total sum for all the
             file sizes is output on a line before the long listing.


-O      Include the file flags in a long (-l) output.


cd /

ls -lO|grep restricted



如何绕过?

1. 关闭rootless, 参见 http://blog.csdn.net/fjh658/article/details/46535073

2. 或者绕过这些目录,出于安全原因,我们还是尽量绕开目录


常用的 gem install 安装默认是安装到 /usr目录下

绕开

sudo gem install -n 二进制文件目录 文件名


如:

sudo gem install -n /usr/local/bin cocoapods


gem help install







猜你喜欢

转载自blog.csdn.net/fjh658/article/details/48971625
EL
今日推荐