Kann auch mit sudo nicht nach /usr schreiben

Hier ist mein Problem:

sudo php -d detect_unicode=0 go-pear.phar

... sollte mich als root ausführen und /usr& /usr/shareVerzeichnisse ändern lassen, aber ich bekomme Folgendes:

Below is a suggested file layout for your new PEAR installation.  To
change individual locations, type the number in front of the
directory.  Type 'all' to change all of them or simply press Enter to
accept these locations.

 1. Installation base ($prefix)                   : /usr
 2. Temporary directory for processing            : /tmp/pear/install
 3. Temporary directory for downloads             : /tmp/pear/install
 4. Binaries directory                            : /usr/bin
 5. PHP code directory ($php_dir)                 : /usr/share/pear
 6. Documentation directory                       : /usr/docs
 7. Data directory                                : /usr/data
 8. User-modifiable configuration files directory : /usr/cfg
 9. Public Web Files directory                    : /usr/www
10. System manual pages directory                 : /usr/man
11. Tests directory                               : /usr/tests
12. Name of configuration file                    : /private/etc/pear.conf

1-12, 'all' or Enter to continue: 
Unable to create PHP code directory ($php_dir) /usr/share/pear.
Run this script as root or pick another location.

Warum sudoerhalte ich keine Root-Rechte? *Anmerkung: *Ich bin in der Radgruppe, das sollte aber nichts mit diesem komischen sudoVerhalten zu tun haben.

Gabbar-Singh:~ anadi$ id anadi
uid=XXX(anadi) gid=XX(staff) groups=XX(staff),0(wheel)

Antworten (1)

Sie versuchen zu installieren, /usrwas durch SIP (System Integrity Protection) geschützt ist, eine Funktion, die mit 10.11 eingeführt wurde ( Einzelheiten finden Sie unter Was ist die "rootless"-Funktion in El Capitan wirklich? ).

Verwenden Sie /usr/localstattdessen den Speicherort, der für benutzerseitige Installationen vorgesehen ist.

Ja, außer ich muss auf /usr/include verlinken oder ich kann nicht mit gcc 4.9 kompilieren!
Dann musst du wohl SIP deaktivieren.
Alte Antwort, aber warum können Sie GCC nicht einfach mitteilen, wo die Include-Dateien zu finden sind? Dafür ist die Option '-l' da. PHP als root... <Schauder>