Operation not permitted turning off airplay mirroring
You'll need to disable System Integrity Protection (SIP). It stops anything from modifying System files.

Disabling SIP: (more info in this article)


Enter Recovery HD
From the Utilities menu, select Terminal
Type in csrutil disable