Composer 使用
$ php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
PHP Warning: copy(): Unable to find the wrapper "https" - did you forget to ena
ble it when you configured PHP? in Command line code on line 1
Warning: copy(): Unable to find the wrapper "https" - did you forget to enable i
t when you configured PHP? in Command line code on line 1
PHP Warning: copy(): Unable to find the wrapper "https" - did you forget to ena
ble it when you configured PHP? in Command line code on line 1
Warning: copy(): Unable to find the wrapper "https" - did you forget to enable i
t when you configured PHP? in Command line code on line 1
PHP Warning: copy(https://getcomposer.org/installer): failed to open stream: No
such file or directory in Command line code on line 1
Warning: copy(https://getcomposer.org/installer): failed to open stream: No such
file or directory in Command line code on line 1
https://stackoverflow.com/questions/292018...
vi php.iniextension=php_openssl.dll
$ php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
PHP Warning: copy(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify faile
d in Command line code on line 1
Warning: copy(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify faile
d in Command line code on line 1
PHP Warning: copy(): Failed to enable crypto in Command line code on line 1
Warning: copy(): Failed to enable crypto in Command line code on line 1
PHP Warning: copy(https://getcomposer.org/installer): failed to open stream: op
eration failed in Command line code on line 1
Warning: copy(https://getcomposer.org/installer): failed to open stream: operati
on failed in Command line code on line 1
wget http://curl.haxx.se/ca/cacert.pem
vi php.ini
openssl.cafile=/usr/local/openssl/ssl/certs/cacert.pem
$ php composer-setup.php
All settings correct for using Composer
Downloading...
Composer (version 1.6.5) successfully installed to: D:\code\composer.phar
Use it: php composer.phar
php -r "unlink('composer-setup.php');"
mv composer.phar composer
./composer -V
Composer version 1.6.5 2018-05-04 11:44:59
composer config -g repo.packagist composer https://packagist.laravel-china.org
composer g require psy/psysh:@stable
本作品采用《CC 协议》,转载必须注明作者和本文链接