Composer安装: Connection Error [ERR_CONNECTION]: Unable to connect to getcomposer.org Request to...
2016-07-30 12:55
405 查看
Windows中Composer安装:
https://getcomposer.org/Composer-Setup.exe,下载安装包,运行安装,选择相应的php.ini(此处composer会将此php的路径加入到环境变量)注:若安装过程中:
Connection Error [ERR_CONNECTION]: Unable to connect to getcomposer.org Request to https://getcomposer.org/installer failed with errors: SSL: Handshake timed out. Failed to enable crypto. Failed to open stream: operation failed
出现以上错误导致安装不成功的解决办法:
下载ca-bundle.crt 文件 (https://raw.githubusercontent.com/bagder/ca-bundle/master/ca-bundle.crt)
将ca-bundle.crt 放到任意文件夹中(例如 c:/phpstudy/ca-bundle.crt)
找到安装Composer的 php.ini,打开文件,添加以下两行数据
curl.cainfo=c:/phpStudy/ca-bundle.crt
openssl.cafile=c:/phpStudy/ca-bundle.crt
重新安装Composer应该就能成功了。
composer常用命令:
composer self-update:将 Composer 自身升级到最新版本,只需要运行 self-update 命令。它将替换你的 composer.phar 文件到最新版本。
composer install:
从当前目录读取 composer.json 文件,处理了依赖关系,并把其安装到 vendor 目录下。如果当前目录下存在 composer.lock 文件,它会从此文件读取依赖版本,而不是根据 composer.json 文件去获取依赖。确保了该库的每个使用者都能得到相同的依赖版本。
composer global require “fxp/composer-asset-plugin:1.1.1” :
申明依赖,增加新的依赖包到当前目录的 composer.json 文件中。
相关文章推荐
- Composer安装出错——Unable to connect to getcomposer.org
- Composer安装出错——Unable to connect to getcomposer.org
- 安装redshift后Unable to connect to GeoClue. Unable to get location from provider.
- 安装redshift后Unable to connect to GeoClue. Unable to get location from provider.
- 安装Adobe Flash CS5出错的解决办法(Exit Code: 7 ERROR: Unable to get root from inChildPath)
- org.hibernate.HibernateException: Unable to get the default Bean Validation factor
- hibernate 错误:org.hibernate.HibernateException: Unable to get the default Bean Validation factory
- Ubuntu下安装OpenSSH Server使之可以被远程连接 ssh: connect to host 192.168.XX.XX port 22: Connection refused
- c:import Unable to get RequestDispatcher for Context
- org.hibernate.HibernateException: Unable to get the default Bean Validation factory
- hbase分布式部署问题之org.apache.hadoop.hbase.regionserver.HRegionServer: Unable to connect to master
- hibernate 错误:org.hibernate.HibernateException: Unable to get the default Bean Validation factory
- org.apache.http.conn.HttpHostConnectException: Connection to refused
- 安装ADT 提示 android ADT Unable to connect to repository
- 防火墙安装ssh: connect to host localhost port 22: Connection refused 问题
- 安装Adobe Flash CS5出错的解决办法(Exit Code: 7 ERROR: Unable to get root from inChildPath)
- The search request was unable to connect to the Search Service
- org.hibernate.HibernateException: Unable to get the default Bean Validation factory
- hibernate :org.hibernate.HibernateException: Unable to get the default Bean Validation factory