Could not set environment: 150: Operation not permitted while System Integrity Protection is engaged 怎么解决
时间: 2024-01-08 21:21:24 浏览: 396
根据提供的引用内容,你遇到的问题是"Could not set environment: 150: Operation not permitted while System Integrity Protection is engaged"。这个错误通常是由于系统完整性保护(System Integrity Protection,SIP)导致的。SIP是macOS的一项安全功能,它限制了对系统文件和进程的访问权限,以保护系统的完整性。要解决这个问题,你可以按照以下步骤进行操作:
1. 重启你的Mac,并在启动时按住Command + R键,进入恢复模式。2. 在恢复模式下,打开终端(Utilities -> Terminal)。
3. 在终端中输入以下命令来禁用SIP:
```shell
csrutil disable
```
4. 重启你的Mac。
5. 在重启后,再次尝试设置环境变量,应该不会再出现"Could not set environment: 150: Operation not permitted while System Integrity Protection is engaged"的错误。
请注意,禁用SIP可能会降低你的系统安全性,请谨慎操作。如果你完成了你的操作后想要重新启用SIP,可以按照上述步骤,在恢复模式下使用以下命令来启用SIP:
```shell
csrutil enable
```
相关问题
Could not set environment: 150: Operation not permitted while System Integrity Protection is engaged
当出现"Could not set environment: 150: Operation not permitted while System Integrity Protection is engaged"的错误提示时,这意味着系统完整性保护(SIP)正在运行,而您的操作需要关闭SIP。为了解决这个问题,您可以按照以下步骤进行操作:
1. 从Apple菜单中,选择"重新启动",然后选择"重新启动"。
2. 在重启时按住"Command"和"R"按钮,这将启动您的计算机进入恢复模式。
3. 在恢复模式下,从菜单栏选择"实用工具",然后选择"终端"。
4. 在终端中,输入命令"csrutil disable",然后按下"Enter"键。这将禁用系统完整性保护。
5. 重新启动您的计算机,完成后您将能够执行需要关闭SIP的操作。
请注意,关闭SIP可能会降低您的计算机的安全性,因此在完成您的操作后,建议重新启用SIP,可以通过在恢复模式下执行"csrutil enable"命令来实现。这将重新启用系统完整性保护,提高您的计算机的安全性。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [Mac 域名解析不了,能ping通ip,但ping不通网址](https://blog.csdn.net/zjcxhswill/article/details/116176743)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [mac环境配置错误,导致命令行工具失效,亲测有效。](https://blog.csdn.net/weixin_42689212/article/details/121528885)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [rsync同步时出现rsync: failed to set times on “xxxx”: Operation not permitted](https://download.csdn.net/download/weixin_38515573/12901632)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
mac激活idea时报错Could not set environment: 150: Operation not permitted while System Integrity Protection is engaged
当在激活Idea时遇到"Could not set environment: 150: Operation not permitted while System Integrity Protection is engaged"的错误时,这可能是因为系统完整性保护(System Integrity Protection)阻止了对环境变量的设置。
要解决这个问题,可以尝试以下步骤:
1. 关闭系统完整性保护:从Apple菜单中选择“重新启动...”>“重新启动”。在重启时按住"Command"和"R"按钮,进入恢复模式。在顶部菜单中选择"实用工具" > "终端"(Terminal)。输入"csrutil disable",然后按"Enter"。重新启动计算机。
2. 检查Idea的权限:确保您有足够的权限来激活Idea。可以尝试使用管理员权限运行Idea来解决权限问题。
3. 检查其他限制:如果上述方法仍然无法解决问题,您还可以检查是否有其他限制或安全软件正在阻止Idea的激活。您可以尝试禁用或卸载这些软件,然后重新尝试激活。
请注意,关闭系统完整性保护可能会对系统的安全性产生一定的影响。因此,在完成Idea的激活后,建议重新启用系统完整性保护以确保系统的安全性。
希望这些步骤可以帮助您解决问题。如果问题仍然存在,请提供更多详细信息,以便我们能够更好地帮助您解决。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [Mac 域名解析不了,能ping通ip,但ping不通网址](https://blog.csdn.net/zjcxhswill/article/details/116176743)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *3* [rsync同步时出现rsync: failed to set times on “xxxx”: Operation not permitted](https://download.csdn.net/download/weixin_38515573/12901632)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)