您的位置:首页 > 其它

el capitan 绕过rootless

2015-10-08 14:05 267 查看
el capitan 绕过rootless

关于 rootless 相关操作,参见 /article/9880227.html

在 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, 参见 /article/9880227.html

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

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

绕开

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

如:

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

gem help install

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: