PHP使用的OS X和OpenSSL上的Composer错误
I deleted my old Xampp local server and installed latest one it's include
- Apache/2.4.18 (Unix)
- OpenSSL/1.0.2e
- PHP/7.0.1
- mod_perl/2.0.8-dev
- Perl/v5.16.3
But when I try to install it by:
curl -sS https://getcomposer.org/installer | php
It says:
Some settings on your machine may cause stability issues with Composer.
If you encounter issues, try to change the following:
The OpenSSL library (0.9.8zc) used by PHP does not support TLSv1.2 or TLSv1.1.
If possible you should upgrade OpenSSL to version 1.0.1 or above.
Downloading...
Composer successfully installed to: /Users/hammodgrimmie/composer.phar
Use it: php composer.phar
Help please.
我删除了旧的Xampp本地服务器并安装了最新版本的服务器 p>
- Apache / 2.4.18(Unix) li>
- OpenSSL / 1.0.2e li>
- PHP / 7.0.1 li>
- mod_perl / 2.0.8-dev li>
- Perl / v5.16.3 li>
ul>
但是当我尝试安装它时: p >
curl -sS https://getcomposer.org/installer | php code> pre>
它说: p>
机器上的一些设置 可能会导致Composer出现稳定性问题。 如果遇到问题,请尝试更改以下内容: PHP使用的OpenSSL库(0.9.8zc)不支持TLSv1.2或TLSv1.1。 如果可能,您应该升级 OpenSSL到1.0.1或更高版本。 下载... 组件成功安装到:/Users/hammodgrimmie/composer.phar 使用它:php composer.phar code> pre>
请帮忙。 p> div>
First there is the link here, the solution requires you to have brew installed: https://apple.stackexchange.com/questions/126830/how-to-upgrade-openssl-in-os-x
If the proper version does not appear when you enter into the console: openssl version -a
This will help you switch versions. Update OpenSSL on OS X with Homebrew
If you want a quick fix refer to Felipe Micaroni Lalli's answer on Mar 21 '14.
You don't need to delete XAMPP. If you are using XAMPP for larval 5.2, it will be much better. In short XAMPP has all the updates for your work. Mac has built in PHP and other things but larval 5.1/5.2 needs an upgraded version of PHP and OpenSSL. So follow these steps,(hope you have latest XAMPP in your mac)
cd
-
sudo nano .bash_profile
you will have new .bash_profile. add below statement export PATH=/Applications/XAMPP/xamppfiles/bin:$PATH
hit "enter" >> "control-X">> "Y" (saving)>> "enter"quit terminal and reopen terminal
cd "/Applications/XAMPP/htdocs"
curl -sS http://getcomposer.org/installer | php
php composer.phar create-project laravel/laravel --prefer-dist
That's it. Further checking your steps you can follow this link: http://www.kaanburaksener.com/blog/installing-laravel-on-mac-os-x-with-xampp/