我正在尝试安装composer。我使用Windows安装程序下载了它。 我的composer.json看起来像这样
{
"require": {
"monolog/monolog": "1.2.*"
}
}
现在当我尝试运行命令composer install时,它给了我以下错误。
C:\ProgramData\Composer\bin>php composer.phar install
Loading composer repositories with package information
Installing dependencies (including require-dev)
- Installing monolog/monolog (1.2.1)
Downloading: 100%
Downloading: 100%
Downloading: connection...
Could not fetch http://nodeload.github.com/Seldaek/monolog/zip/1.2.1, enter your GitHub credentials to access private repos
The credentials will be swapped for an OAuth token stored in C:/Users/RUMMAN/AppData/Roaming/Composer/config.json, your password will not be stored
To revoke access to this token you can visit https://github.com/settings/applications
Username:
Password:
如果我把它们留空,则会出现以下错误
[Composer\Downloader\TransportException]
The "https://api.github.com/authorizations" file could not be downloaded: Unable to find the wrapper "https" - did you forget to enable it when you configured PHP?
failed to open stream: Invalid argument
install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader]
提到我已经在我的php设置中启用了开放SSL。
答案 0 :(得分:2)
如果您确实为php CLI启用了openSSL,那么当您在终端中运行php -m
时,它应该会显示出来。如果没有,则运行php --ini
并编辑显示在此命令输出中的php.ini。