小牛PHP版本问题


0

我刚刚运行下面的命令来更新我的系统上的PHP(两次,忘记我之前运行过它)。

curl -s http://php-osx.liip.ch/install.sh | bash -s 5.5

产量

Detected OS X Mavericks 10.9 All ok.
Get packager.tgz
Unpack packager.tgz
Please type in your password, as we want to install this into /usr/local
Password:
Start packager (may take some time)
downloading http://php-osx.liip.ch/install/5.5-10.8-frontenddev-latest.dat
downloading http://php-osx.liip.ch/install/5.5-10.8/frontenddev/5.5-10.8-frontenddev-5.5.27-20150710-221744.tar.bz2

Installing package 5.5-10.8-frontenddev into root /
Package 5.5-10.8-frontenddev is already installed at version 5.5.27-20150710-221744. You wanted to install version 5.5.27-20150710-221744.

但是,当我跑 php --version 我明白了

PHP 5.4.17 (cli) (built: Aug 25 2013 02:03:38) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies

which php tells me `/usr/bin/php`

如何让我的系统使用5.5?

Answers:


1

尝试

/usr/local/php5/bin/php --version

如果您希望在命令行键入php时该php成为默认值,请运行以下命令:

echo "alias php='/usr/local/php5/bin/php'">>~/.bash_profile

然后关闭终端并打开一个新终端或运行

. ~/.bash_profile
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.