V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
iiusky
V2EX  ›  问与答

手贱把 os 10.10 自带的 php and apache 删除了~留下的后遗症

  •  
  •   iiusky · 2014-11-10 00:00:17 +08:00 · 5662 次点击
    这是一个创建于 3658 天前的主题,其中的信息可能已经有所发展或是发生改变。
    手贱把os 10.10自带的php and apache删除了~留下了一些后遗症。
    Alfred里面使用/usr/bin/php的那些插件用不鸟了。。怎么办,求破。。

    重做系统。恢复出厂就不考虑了。。毕竟本子上配置了一些环境,弄起来很烦。。


    求大神支招!
    8 条回复    2014-11-10 13:18:03 +08:00
    ergatea
        1
    ergatea  
       2014-11-10 00:11:33 +08:00   ❤️ 1
    brew
    66450146
        2
    66450146  
       2014-11-10 00:13:58 +08:00
    重装

    或者忍
    iiusky
        3
    iiusky  
    OP
       2014-11-10 00:46:46 +08:00
    @ergatea 求详细方法。。

    [ooo@macbook ~]$ brew install php
    Error: No available formula for php
    Searching formulae...
    brew-php-switcher php53-spl-types
    chphp php53-ssh2
    php-build php53-stats
    php-code-sniffer php53-stemmer
    php-cs-fixer php53-suhosin
    php-install php53-sundown
    php-version php53-svm
    php53 php53-swoole
    php53-amqp php53-thrift
    php53-apc php53-tidy
    php53-apcu php53-timezonedb
    php53-binpack php53-tokyotyrant
    php53-blitz php53-twig
    php53-boxwood php53-uploadprogress
    php53-chdb php53-uuid
    php53-couchbase php53-varnish
    php53-crypto php53-vld
    php53-dbase php53-wbxml
    php53-dbus php53-xcache
    php53-dmtx php53-xdebug
    php53-eio php53-xhgui
    php53-gearman php53-xhp
    php53-geoip php53-xhprof
    php53-gmagick php53-xmldiff
    php53-graphdat php53-yac
    php53-htscanner php53-yaf
    php53-http php53-yaml
    php53-igbinary php53-yar
    php53-imagick php53-yaz
    php53-inclued php53-yp
    php53-ioncubeloader php53-yrmcds
    php53-jsmin php53-zenddebugger
    php53-judy php53-zmq
    php53-leveldb php53-zookeeper
    php53-libevent php54
    php53-libvirt php54-amqp
    php53-lz4 php54-apc
    php53-lzf php54-apcu
    php53-mailparse php54-augmentedtypes
    php53-mcrypt php54-binpack
    php53-memcache php54-blitz
    php53-memcached php54-boxwood
    php53-midgard2 php54-chdb
    php53-mongo php54-couchbase
    php53-mosquitto php54-crypto
    php53-msgpack php54-dbase
    php53-mysqlnd_ms php54-dbus
    php53-oauth php54-dmtx
    php53-pcntl php54-eio
    php53-pdflib php54-ev
    php53-pdo-dblib php54-event
    php53-phalcon php54-gearman
    php53-proctitle php54-geoip
    php53-propro php54-gmagick
    php53-protobuf php54-graphdat
    php53-pspell php54-htscanner
    php53-pthreads php54-http
    php53-raphf php54-igbinary
    php53-redis php54-imagick
    php53-redland php54-inclued
    php53-riak php54-ioncubeloader
    php53-runkit php54-jsmin
    php53-scrypt php54-judy
    php53-snappy php54-leveldb
    php53-solr php54-libevent
    php53-sphinx php54-libvirt
    php54-lz4 php55
    php54-lzf php55-amqp
    php54-mailparse php55-apcu
    php54-mcrypt php55-augmentedtypes
    php54-memcache php55-binpack
    php54-memcached php55-blitz
    php54-midgard2 php55-boxwood
    php54-mongo php55-chdb
    php54-mosquitto php55-couchbase
    php54-msgpack php55-crypto
    php54-mysqlnd_ms php55-dbase
    php54-oauth php55-dbus
    php54-opcache php55-dmtx
    php54-parsekit php55-eio
    php54-pcntl php55-ev
    php54-pdflib php55-event
    php54-pdo-dblib php55-gearman
    php54-pdo-pgsql php55-geoip
    php54-phalcon php55-gmagick
    php54-proctitle php55-graphdat
    php54-propro php55-htscanner
    php54-protobuf php55-http
    php54-pspell php55-igbinary
    php54-pthreads php55-imagick
    php54-raphf php55-inclued
    php54-redis php55-ioncubeloader
    php54-redland php55-jsmin
    php54-riak php55-judy
    php54-runkit php55-leveldb
    php54-scrypt php55-libevent
    php54-snappy php55-libvirt
    php54-solr php55-lz4
    php54-sphinx php55-lzf
    php54-spl-types php55-mailparse
    php54-ssh2 php55-mcrypt
    php54-stats php55-memcache
    php54-stemmer php55-memcached
    php54-suhosin php55-midgard2
    php54-sundown php55-mongo
    php54-svm php55-mosquitto
    php54-swoole php55-msgpack
    php54-thrift php55-mysqlnd_ms
    php54-tidy php55-oauth
    php54-timezonedb php55-parsekit
    php54-tokyotyrant php55-pcntl
    php54-twig php55-pdflib
    php54-uploadprogress php55-pdo-dblib
    php54-uuid php55-pdo-pgsql
    php54-varnish php55-phalcon
    php54-vld php55-proctitle
    php54-wbxml php55-propro
    php54-xcache php55-protobuf
    php54-xdebug php55-pspell
    php54-xhgui php55-pthreads
    php54-xhp php55-raphf
    php54-xhprof php55-redis
    php54-xmldiff php55-redland
    php54-yac php55-riak
    php54-yaf php55-runkit
    php54-yaml php55-scrypt
    php54-yar php55-snappy
    php54-yaz php55-solr
    php54-yp php55-sphinx
    php54-yrmcds php55-spl-types
    php54-zmq php55-ssh2
    php54-zookeeper php55-stats
    php55-stemmer php56-midgard2
    php55-suhosin php56-mongo
    php55-sundown php56-mosquitto
    php55-svm php56-msgpack
    php55-swoole php56-mysqlnd_ms
    php55-thrift php56-oauth
    php55-tidy php56-parsekit
    php55-timezonedb php56-pcntl
    php55-tokyotyrant php56-pdflib
    php55-twig php56-pdo-dblib
    php55-uploadprogress php56-pdo-pgsql
    php55-uuid php56-phalcon
    php55-varnish php56-proctitle
    php55-vld php56-propro
    php55-wbxml php56-protobuf
    php55-xcache php56-pspell
    php55-xdebug php56-pthreads
    php55-xhgui php56-raphf
    php55-xhp php56-redis
    php55-xhprof php56-riak
    php55-xmldiff php56-runkit
    php55-yac php56-scrypt
    php55-yaf php56-snappy
    php55-yaml php56-solr
    php55-yar php56-sphinx
    php55-yaz php56-spl-types
    php55-yp php56-ssh2
    php55-yrmcds php56-stats
    php55-zmq php56-stemmer
    php55-zookeeper php56-suhosin
    php56 php56-sundown
    php56-amqp php56-svm
    php56-apcu php56-swoole
    php56-augmentedtypes php56-thrift
    php56-binpack php56-tidy
    php56-blitz php56-timezonedb
    php56-boxwood php56-tokyotyrant
    php56-chdb php56-twig
    php56-couchbase php56-uploadprogress
    php56-crypto php56-uuid
    php56-dbase php56-varnish
    php56-dbus php56-vld
    php56-dmtx php56-wbxml
    php56-eio php56-xcache
    php56-ev php56-xdebug
    php56-event php56-xhgui
    php56-gearman php56-xhp
    php56-geoip php56-xhprof
    php56-gmagick php56-xmldiff
    php56-graphdat php56-yac
    php56-htscanner php56-yaf
    php56-http php56-yaml
    php56-igbinary php56-yar
    php56-imagick php56-yaz
    php56-inclued php56-yp
    php56-jsmin php56-yrmcds
    php56-judy php56-zmq
    php56-leveldb php56-zookeeper
    php56-libevent phpcpd
    php56-libvirt phpdocumentor
    php56-lz4 phpdox
    php56-lzf phpenv
    php56-mailparse phplint
    php56-mcrypt phploc
    php56-memcache phpmd
    php56-memcached phpmyadmin
    phppgadmin phpunit-skeleton-generator
    phpsh virtphp
    phpunit
    Searching taps...
    homebrew/nginx/php-session-nginx-module
    ergatea
        4
    ergatea  
       2014-11-10 01:02:26 +08:00   ❤️ 1
    brew install phpXX

    sudo ln -sf /usr/local/bin/php /usr/bin/php
    sudo ln -sf /usr/local/sbin/php-fpm /usr/sbin/php-fpm

    XX is you need php version
    coldear
        5
    coldear  
       2014-11-10 03:43:21 +08:00
    homebrew +1
    iiusky
        6
    iiusky  
    OP
       2014-11-10 09:19:55 +08:00
    @ergatea [ooo@macbook Cellar]$ brew install php54
    ==> Installing php54 from homebrew/homebrew-php
    ==> Downloading http://www.php.net/get/php-5.4.33.tar.bz2/from/this/mirror
    Already downloaded: /Library/Caches/Homebrew/php54-5.4.33
    ==> ./configure --prefix=/usr/local/Cellar/php54/5.4.33 --localstatedir=/usr/loc
    ==> make
    ==> make install
    make install

    Installing PHP SAPI module: apache2handler
    mkdir: /private/etc/apache2: Permission denied
    make: *** [install-sapi] Error 1

    READ THIS: https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Troubleshooting.md#troubleshooting
    If reporting this issue please do so at (not Homebrew/homebrew):
    https://github.com/homebrew/homebrew-php/issues

    [ooo@macbook Cellar]$ brew install php54
    ==> Installing php54 from homebrew/homebrew-php
    ==> Downloading http://www.php.net/get/php-5.4.33.tar.bz2/from/this/mirror
    Already downloaded: /Library/Caches/Homebrew/php54-5.4.33
    ==> ./configure --prefix=/usr/local/Cellar/php54/5.4.33 --localstatedir=/usr/loc
    ==> make
    ==> make install
    make install

    Installing PHP SAPI module: apache2handler
    mkdir: /private/etc/apache2: Permission denied
    make: *** [install-sapi] Error 1

    READ THIS: https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Troubleshooting.md#troubleshooting
    If reporting this issue please do so at (not Homebrew/homebrew):
    https://github.com/homebrew/homebrew-php/issues

    [sky@hack Cellar]$ brew install php55
    ==> Installing php55 from homebrew/homebrew-php
    ==> Downloading http://www.php.net/get/php-5.5.18.tar.bz2/from/this/mirror
    ######################################################################## 100.0%
    ==> ./configure --prefix=/usr/local/Cellar/php55/5.5.18 --localstatedir=/usr/loc
    ==> make
    ==> make install
    make install

    Installing PHP SAPI module: apache2handler
    mkdir: /private/etc/apache2: Permission denied
    make: *** [install-sapi] Error 1

    READ THIS: https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Troubleshooting.md#troubleshooting
    If reporting this issue please do so at (not Homebrew/homebrew):
    https://github.com/homebrew/homebrew-php/issues
    skydiver
        7
    skydiver  
       2014-11-10 10:18:19 +08:00 via Android
    加-v看详细报错…然后哪错修哪儿…缺文件夹的自己建文件夹
    ergatea
        8
    ergatea  
       2014-11-10 13:18:03 +08:00
    mkdir: /private/etc/apache2: Permission denied 很清楚 建立目录权限不足。

    加sudo 执行命令,或者降低目录权限。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5733 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 03:33 · PVG 11:33 · LAX 19:33 · JFK 22:33
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.