osx - El Capitan php version update using brew -


i updated mac os x el capitan 10.11.5. stable version of php 5.5.34. need newer 5.6.21.

first step did update php is:

brew install php56. brew installs packages under dir: /usr/local/cellar.

os x el capitan path php usr/bin

i tried creating symbolic link php version cellar dir points 1 of el capitan:

sudo ln -sv /usr/local/cellar/php56/5.6.21/bin/php /usr/bin/php 

but error message:

ln: /usr/bin/php: operation not permitted  

and there nothing can do...?

maybe there way of updating php version on mack rather brew , symbolic link.

also when want check php.ini php --ini this:

configuration file (php.ini) path: /etc loaded configuration file:         (none) 

you can either @ user level bash_profile or @ system level if have multiple users of machine paths file.

bash profile method

this common method, add or edit existing bash_profile file with

vi ~/.bash_profile 

and add following line

export path=/usr/local/bin:/usr/bin:$path 

its hierarchical order left right, can see check in /usr/local/bin first, /usr/bin , @ original rest of path variable.

system path file method

because system file need sudo power edit file, run

sudo vi /etc/paths 

then edit file on first line add /usr/local/bin

the final of file should be

/usr/local/bin /usr/bin /bin /usr/sbin /sbin 

Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -