How to delete the built-in php on mac

藏色散人
Release: 2023-03-04 15:54:01
Original
8156 people have browsed it

How to delete the built-in php on mac: first check the rootless status; then find the php file through the "sudo find / -name php" command; then use "cd /private/etc/ sudo rm -rf php*" Just wait for the command to delete the PHP that comes with it.

How to delete the built-in php on mac

Recommended: "PHP Video Tutorial"

Mac installation php environment , Delete the built-in php

rootless kernel protection

When deleting the php file, you will find that you do not have permission to delete it. The built-in php is protected by the system, close rootless

View rootless status

csrutil status //查看rootless状态 disabled //开启
Copy after login

Close rootless

Restart the computer and hold down Command R to enter the recovery partition. Then find the terminal in the utility bar and start running.

csrutil disable //关闭rootless reboot //重启
Copy after login

Turn on rootless

It is recommended to open rootless after deleting php

csrutil enable //开启rootless reboot
Copy after login

Delete the built-in php

sudo find / -name php //查找php文件 cd /private/etc/ sudo rm -rf php* cd /usr/bin sudo rm -rf php* cd /usr/include sudo rm -rf php cd /usr/lib sudo rm -rf php cd /usr/sbin/ sudo rm -rf php* cd /usr/share sudo rm -rf php*
Copy after login

The above is the detailed content of How to delete the built-in php on mac. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!