【发布时间】:2014-06-25 11:00:55
【问题描述】:
我正在尝试在我的 macbook (Yosemite 10.9.3) 上安装 php-cgi,因为当我尝试在浏览器中打开内容时,PhpStorm IDE 不断返回给我“找不到 php-cgi”。我尝试使用更新版本的 php 解释器,因为当前版本是 5.4。但我只能在 php.net 站点中找到这些软件包,但我不知道如何安装它。我也尝试下载自制软件,但又不知道如何从那里开始。我尝试使用 MacPort 通过以下行安装 fastcgi: sudo 端口安装 php5 +fastcgi
但它会返回:
---> Dependencies to be installed: autoconf213 gawk gettext expat libiconv ncurses readline m4 perl5 perl5.16 gdbm bzip2 gsed libtool libxml2 xz zlib mhash pcre libedit pkgconfig
---> Fetching archive for expat
---> Attempting to fetch expat-2.1.0_0.darwin_13.x86_64.tbz2 from http://packages.macports.org/expat
---> Attempting to fetch expat-2.1.0_0.darwin_13.x86_64.tbz2.rmd160 from http://packages.macports.org/expat
---> Installing expat @2.1.0_0
---> Activating expat @2.1.0_0
Error: org.macports.activate for port expat returned: Image error: /opt/local/bin/xmlwf already exists and does not belong to a registered port. Unable to activate port expat. Use 'port -f activate expat' to force the activation.
Error: Failed to install expat
Please see the log file for port expat for details: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_textproc_expat/expat/main.log
Error: The following dependencies were not installed: autoconf213 gawk gettext expat libiconv ncurses readline m4 perl5 perl5.16 gdbm bzip2 gsed libtool libxml2 xz zlib mhash pcre libedit pkgconfig
To report a bug, follow the instructions in the guide:http://guide.macports.org/#project.tickets
Error: Processing of port php5 failed
我已经使用 MacPort 运行自我更新(版本 2.3.0)。任何人都可以帮忙吗?太感谢了!
附:对于 PhpStorm,当我尝试在浏览器中查看代码时,我不得不使用内置的 Web 服务器。如果有人有办法在没有内置服务器的情况下做到这一点,那也很棒。我已经安装了一个 zend 服务器。
附:我现在正在使用 NetBeans。但我想在我处理其他事情的同时确保我解决了这样的事情是件好事。
【问题讨论】:
标签: php cgi phpstorm fastcgi macports