sudo mkdir in /usr/, Operation not permitted. El Capitan [closed]

佐手、 提交于 2021-02-16 04:20:22

问题


Attempting to install PHP, which requires the creation of an extensions directory within /usr/lib/php/extensions. The installation returned an error "Operation not permitted".

I have since found out, sudo is not able to create any directories under /usr/. Anyone else experienced this?


回答1:


Local installations really should be installed under /usr/local, not directly under /usr. Starting in El Capitan, this is enforced by System Integrity Protection. Shouldn't be a big change, just install the extensions in /usr/local/lib/php/extensions, and edit php.ini to set extension_dir to the appropriate location.



来源:https://stackoverflow.com/questions/33309005/sudo-mkdir-in-usr-operation-not-permitted-el-capitan

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!