简体   繁体   中英

How to make “php” link to php5.5 on Mac (already created symlink on /usr/local/bin/php)?

I installed php version 5.5 through homebrew and I now want php on the command line to refer to this new version. In /usr/local/bin I ran ls -l and saw this line:

lrwxr-xr-x  1 myself  admin   37 Aug 26 13:06 php -> /usr/local/Cellar/php55/5.5.1/bin/php

but php -v tells me that I have PHP 5.3.15

Does anybody know what I need to do to have this point to version 5.5.x?

==UPDATE== It turned out the symlink was broken somehow, so I made brew fix it and now it works like a charm!

Excuse me for the confusion!

It turned out the symlink was broken somehow, so I made brew fix it and now it works like a charm!

Excuse me for the confusion!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM