I want to learn about Laravel recently
When executing composer update, error:mcrypt required
will be prompted.After investigation, the PHP version of localhost is 5.6.2
Enter php -v in the terminal and the version displayed is 5.5.14
It is estimated that the problem is caused by different php versions
The osx used by localhost comes with apache and php
I have used brew to upgrade the php version before
Terminal use zsh
Execute the command in the terminal:
php -v get php 5.5.14
/usr/bin/php -v get php 5.5.14
/usr/local/php5/bin/php -v get php 5.6.2
I want to switch the terminal to php 5.6.2 version to install Laravel
How to switch the php version in the osx terminal to make it consistent with the environment version
Thank you so much~~~~(>_<)~~~~
brew info php55
底下有一块讲到这个:
✩✩✩✩ PHP CLI ✩✩✩✩
If you wish to swap the PHP you use on the command line, you should add the following to ~/.bashrc,
~/.zshrc, ~/.profile or your shell's equivalent configuration file: