LoginSignup
2
2

More than 5 years have passed since last update.

curl -sS https://getcomposer.org/installer | php エラー回避方法

Posted at

curl -sS https://getcomposer.org/installer | php
で下記のエラーが出る場合、

yamato@ubuntu:~$ curl -sS https://getcomposer.org/installer | php
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.

-k をつけると回避できる。
curl -sS -k https://getcomposer.org/installer | php

yamato@ubuntu:~$ curl -sS -k https://getcomposer.org/installer | php
#!/usr/bin/env php
All settings correct for using Composer
PHP Notice:  Undefined variable: caBundle in - on line 792

Notice: Undefined variable: caBundle in - on line 792
Downloading...

Composer successfully installed to: /home/yamato/composer.phar
Use it: php composer.phar
yamato@ubuntu:~$
2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2