Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Composer errors on OS X and OpenSSL used by PHP

Tags:

php

macos

perl

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.

like image 248
AhmedEls Avatar asked Jan 27 '16 15:01

AhmedEls


2 Answers

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.

like image 157
Monty Rohde Avatar answered Nov 15 '22 16:11

Monty Rohde


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)

  1. cd
  2. sudo nano .bash_profile you will have new .bash_profile. add below statement
  3. export PATH=/Applications/XAMPP/xamppfiles/bin:$PATH hit "enter" >> "control-X">> "Y" (saving)>> "enter"

  4. quit terminal and reopen terminal

  5. cd "/Applications/XAMPP/htdocs"
  6. curl -sS http://getcomposer.org/installer | php
  7. 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/

like image 38
Rezwan Anjum Nibir Avatar answered Nov 15 '22 17:11

Rezwan Anjum Nibir