I want to delete php in mac:
/private/etc/ sudo rm -rf php-fpm.conf.default php.ini php.ini.default
/usr/bin/ sudo rm -rf php php-config phpdoc phpize
/usr/include sudo rm -rf php
/usr/lib sudo rm -rf php
/usr/sbin sudo rm -rf php-fpm
/usr/share sudo rm -rf php
/usr/share/man/man1 sudo rm -rf php-config.1 php.1 phpize.1
/usr/share/man/man8 sudo rm -rf php-fpm.8
when i run
sudo rm -rf php php-config phpdoc phpize
happen:
rm: php: Operation not permitted
rm: php-config: Operation not permitted
rm: phpize: Operation not permitted
Anyone can help me? thanks a lot!
To delete a file in /usr/bin/, you need to disable SIP (System Integrity Protection) by following below steps:
csrutil disable
.
Enter reboot
.To enable SIP again, repeating the above steps (2 first steps), enter csrutil enable
and reboot your Mac OS.
Had the same issue, try this if the php version you need is already installed.
brew link --overwrite [email protected]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With