El Captian sudo 也不能改/usr/bin 之类的目录了,有什么办法解决么

2015-07-11 10:31:22 +08:00
 zhujinliang
vi,php之类的某些原因要替换系统自带的版本

-------------
刚才发现一个办法,/usr/local/bin还是可以操作的,改了PATH变量,把/usr/local/bin放在了最前面

sudo也不让改/usr/bin总觉得怪怪的啊
4133 次点击
所在节点    macOS
9 条回复
zhjits
2015-07-11 11:30:22 +08:00
sudo nvram boot-args="rootless=0"

然而据说正式版本这东西也会失效,所以……

话说替换系统版本为啥不直接用 homebrew 呢
wkdhf233
2015-07-11 12:12:57 +08:00
这是准备做成iOS的节奏么,这么搞估计以后OS X也可以越狱了。。
ffffwh
2015-07-11 15:12:20 +08:00
其实吧,那个拼作capitan..
另外我原先以为是captain...
sobigfish
2015-07-11 17:15:25 +08:00
brew, phpbrew 可以不?
os x 10.11 是说权限被限制的很厉害,都不打算升了
jedihy
2015-07-11 23:25:10 +08:00
硬盘拆下来改
crystone
2015-07-11 23:35:16 +08:00
有限制也是好处
geekdada
2015-07-12 16:42:29 +08:00
http://arstechnica.com/apple/2015/06/preview-os-x-el-capitans-first-beta-is-a-promising-heap-of-refinements/4/

以下为引用:

System Integrity Protection, also called "rootless," is a new system security feature that prevents the user or any process from writing in system-protected folders. This list includes /System, /bin, /usr (but not /usr/local), and /sbin. Not even administrators can add to these folders or edit files that are in them, though they retain their access to the rest of the files on the drive. That's one way to protect important operating system files from external tampering!

If you never dive into any of those folders, you won't notice the difference in day-to-day usage. If you do, reboot into your El Capitan Mac's recovery partition. There's a new item under the Utilities menu that will let you toggle System Integrity Protection on and off for El Capitan volumes. That's all it does. So we're not looking at an iOS-esque level of system lockdown just yet, though there are no promises that System Integrity Protection won't become mandatory in some future version of OS X.
uuapp
2015-10-15 17:01:56 +08:00
执行
sudo chown -R $(whoami):admin /usr/local
homebrew 等 使用正常
uuapp
2015-10-15 17:02:36 +08:00
sudo chown -R $(whoami):admin /usr/bin

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/204921

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX