Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Having trouble while installing composer on ubuntu

I've just installed apache, php and curl to my computer. But I think there is something wrong with cURL with Php5.6. Actually I can install composer with ignoring the warnings but I will not be able to use composer then.

I get this:

curl: (60) SSL certificate problem: unable to get local issuer certificate

When I run this:

curl -sS https://getcomposer.org/installer | php

Peace..

like image 757
Yusuf Ali Bozkır Avatar asked Nov 01 '22 04:11

Yusuf Ali Bozkır


1 Answers

Try to update your local certificates:

sudo update-ca-certificates 

or

cd /etc/ssl/certs
sudo wget http://curl.haxx.se/ca/cacert.pem

And then use this cert file on the command:

curl -sS https://getcomposer.org/installer | php -- --cafile=/etc/ssl/certs/cacert.pem

All in all: your pull new certs and use this on the cURL command on the CLI.


The next step is to get the cURL PHP extension working.

  • adjust php.ini
  • enable openssl extension
  • enable curl extension
  • curl.cainfo=/etc/ssl/certs/cacert.pem
  • openssl.cafile=/etc/ssl/certs/cacert.pem
like image 118
Jens A. Koch Avatar answered Nov 02 '22 17:11

Jens A. Koch