我使用的是 OSX Lion 10.7.5。正如建议的如何在 Mac OS X 中升级 PHP? https://stackoverflow.com/questions/2526085/how-do-i-upgrade-php-in-mac-os-x?s=fdcf34c5-b2d0-4b37-8d92-d8317880189c, 我用了:
curl -s http://php-osx.liip.ch/install.sh | bash -s 5.4
一切似乎都很顺利,没有错误,我使用的是 64 位系统等,但是当我运行“php -v”时,我仍然看到与之前相同的版本(5.3.15)。在 1-10 的范围内,当谈到通过命令行安装东西时,我可能是 2,所以,请在任何响应中考虑到这一点。
更新:运行后我仔细查看了终端输出curl -s http://php-osx.liip.ch/install.sh | bash -s 5.4
我注意到以下几点:
Installing package tools-memcached into root /
./pkg/pre-install
pkg/pre-install
Skipping existing directory
Skipping existing directory usr/
Skipping existing directory usr/local/
...然后在安装结束时:
Create symlink /usr/local/php5/entropy-php.conf /etc/apache2/other/+php-osx.conf
Removed /usr/lib from DYLD_LIBRARY_PATH in /usr/sbin/envvars
Restarting Apache
httpd: Could not reliably determine the server's fully qualified domain name
谁能详细解释一下这意味着什么?正如评论中所解释的,我似乎已经安装了文件,但是,我在解决 $PATH 问题时遇到了麻烦。
创建一个指向新 php 安装路径的符号链接,如下所示:
ln -s /usr/local/php5/bin/php php
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)