I got stack about 6 hours to install composer. Searched & tried all possible ways but couldn't fix. Can anyone please help me?
Main two of the tried links are below-
- https://apple.stackexchange.com/questions/126830/how-to-upgrade-openssl-in-os-x
- https://superuser.com/questions/324616/how-should-i-set-the-path-variable-on-my-mac-so-the-hombrew-installed-tools-are
Updates
I've used the following commands-
brew update
brew install openssl
brew link --force openssl
openssl version -a
which openssl
And put /usr/local/bin above /usr/bin as follows-
- On OS X, open Terminal
- Type the command: sudo vi /etc/paths
- Enter your password if you're asked for it
- You will see a list of paths.
- Edit them so that /usr/local/bin path is entered above the /usr/bin path
- Save and quit and Restart Terminal
After following these steps I'm trying to install composer by the command
curl -sS https://getcomposer.org/installer | php
but it showing the following message-
The OpenSSL library (0.9.8y) used by PHP does not support TLSv1.2 or TLSv1.1.
If possible you should upgrade OpenSSL to version 1.0.1 or above.