我在 ubuntu 中使用 Composer 安装 Larevel 时出错

我在 ubuntu 中使用 Composer 安装 Larevel 时出错
/opt/lampp/htdocs# composer create-project laravel/laravel sampleApp --prefer-dist



  [Composer\Downloader\TransportException]                                     
  The "https://packagist.org/packages.json" file could not be downloaded: SSL  
   operation failed with code 1. OpenSSL Error messages:                       
  error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify   
  failed                                                                       
  Failed to enable crypto                                                      
  failed to open stream: operation failed                                      



create-project [-s|--stability="..."] [--prefer-source] [--prefer-dist] [--repository-url="..."] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [--keep-vcs] [--no-install] [--ignore-platform-reqs] [package] [directory] [version]

--> 请帮助我解决这个问题

答案1

如果您拥有最新的作曲家,并且在代理后面工作,那么这对我有用:

export http_proxy=http://ip:port
export HTTP_PROXY=http://ip
export https_proxy=
export HTTPS_PROXY=

相关内容