首页 > 解决方案 > 无法使用作曲家安装 log4php

问题描述

我正在尝试在我的 ubuntu 服务器上部署我的 PHP webapp。运行 composer install 以以下异常结束:

  [RuntimeException]                                                                                                                                                                                                    
  Failed to execute git clone --no-checkout 'https://git-wip- 
  us.apache.org/repos/asf/logging-log4php.git' 
  '/var/www/webapp/public_html/vendor/apache/log4php' && cd 
  '/var/www/webapp/public_html/vendor/apache/log4php' && git remote 
  add composer 'https://git-wip-us.apache.org/repos/asf/logging-log4php.git' && git fetch composer                                                                            

  Cloning into '/var/www/webapp/public_html/vendor/apache/log4php'...                                                                                                                                      
  fatal: repository 'https://git-wip-us.apache.org/repos/asf/logging-log4php.git/' not found  

我尝试如下向 composer.json 添加显式存储库,但没有任何进展

"repositories": [
  {
    "type": "vcs",
    "url": "https://github.com/apache/logging-log4php"
  }
],
"require": {
  "apache/log4php": "2.3.0",
  "phpmailer/phpmailer": "~6.0"
}

我错过了什么?

标签: phpcomposer-phplog4php

解决方案


他们刚刚迁移

更正存储库的链接后,不要忘记重新创建 composer.lock 文件。可能最简单的方法是删除它并运行composer install


推荐阅读