我正在尝试编辑键盘布局,在保存文件时得到Operation not permitted
。
到目前为止,我尝试了一些没有成功的事情:
cd /System/Library/Input Methods/PressAndHold.app/Contents/Resources
sudo chmod u+w Keyboard-pl.plist
vim Keyboard-pl.plist
和
sudo chflags nouchg Keyboard-pl.plist
sudo chmod u+w Keyboard-pl.plist
vim Keyboard-pl.plist
知道我该怎么编辑吗?
事实上,在El Captain上,/System(和其他位置)下的文件受到保护。为了编辑它,你需要禁用保护:
要禁用系统完整性保护,您可以执行以下操作:
- 在按住
⌘R
的同时重新启动以引导至恢复HD- 打开终端(从实用程序菜单)
在终端中运行以下命令:
csrutil disable
重新启动。
来源:https://georgegarside.com/blog/osx/package-incompatible-installer/和https://apple.stackexchange.com/questions/208911/the-keyboards-plists-of-pressandhold-also-can-no-longer-be-modified-to-add-the