首页 > 解决方案 > 在 ubuntu 上使用代理后面的作曲家时出现 OpenSSl 错误

问题描述

当我尝试在 ubuntu 18.04 上运行 composer install 时,我得到了这个:

The "https://packagist.org/packages.json" file could not be downloaded: SSL  
operation failed with code 1. OpenSSL Error messages:                       
error:1408F10B:SSL routines:ssl3_get_record:wrong version number             
Failed to enable crypto                                                      
failed to open stream: operation failed

我在我的 /etc/apt/apt.conf 和 /etc/profile 上得到了正确的代理配置,但是错误一直在继续,不管我做什么。

标签: proxycomposer-php

解决方案


使用 composer 所需的代理配置位于 /etc/enviroment 文件中。

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"

http_proxy="http://username:password@10.4.1.20:3128"
https_proxy="http://username:password@10.4.1.20:3128" 

推荐阅读