Answer the question
In order to leave comments, you need to log in
Did you press something and break everything?
Good afternoon!
I tried to update the PHP version on a Mac, but now I'm generally surprised that it (Mac) is still working ..
PHP version "5.6.30" was installed
But the devil pulled it to install 7.1
After a short search, an article was found in which there was the following line:
curl -s http://php-osx.liip.ch/install.sh | bash -s 7.1
Detected macOS Sierra 10.12. All ok.
Get packager.tgz
Unpack packager.tgz
Please type in your password, as we want to install this into /usr/local
Password:
tar: Error opening archive: Failed to open '/tmp/packager.tgz'
Start packager (may take some time) using /usr/bin/python2.7
/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't open file '/usr/local/packager/packager.py': [Errno 2] No such file or directory
Finished.
export PATH=”$(brew — prefix homebrew/php/php71)/bin:$PATH”
Error: Unknown command: —
-bash: brew: command not found
-bash: php: command not found
-bash: curl: command not found
Answer the question
In order to leave comments, you need to log in
I won’t tell you about this php installer,
but what happened next: you apparently broke the PATH environment variable, which is a list of paths along which bash will try to find executable files
if no commands work - this means that the paths to them are not in PATH variable
, that is, most likely you overwrote it with something strange , you
can check the contents of this variable like this:
echo $ PATH
, in theory, you can open another terminal and echo $ PATH there and compare the results,
I think they will differ
how to fix? two options
1) close the first terminal and all
those changes that you made exist only in that terminal session
in the new terminal everything will start from the beginning
2) copy the value of the PATH variable from the second terminal and do in the first one
export PATH=<all paths>
after that everything should return to normal
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question