Home >Backend Development >PHP Tutorial >How to solve the problem of changing php version and -bash command on mac

How to solve the problem of changing php version and -bash command on mac

WBOY
WBOYOriginal
2016-07-29 08:55:311392browse

版Mac PHP version changes, such as php7.0.0 mamp

vi

.bash_profile

export Path = "/Applications/MAMP/BIN/PHP/PHP7.0.0/Bin: $ PATH"

. .

bash_profile-bash command failure repair method

For example:

-bash: ls :command not found

step1.

Enter in the terminal:

export PATH="/usr/ bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin"

Then the command can be used temporarily,

step2.

Hurry up and use open -e ~/. bash_profile Open the .bash_profile file in a text editor:

step3.

Change the PATH environment variable setting and add this line,

export PATH="/usr/bin:/bin:/usr/sbin:/sbin :/usr/local/bin:/usr/X11/bin"

Then save it and there will be no problem.


The above introduces the solution to changing the php version on Mac and the -bash command failure, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn