php - 无法使用作曲家安装 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"
}
我错过了什么?
解决方案
更正存储库的链接后,不要忘记重新创建 composer.lock 文件。可能最简单的方法是删除它并运行composer install
推荐阅读
- python - python中的HTML表格抓取-在某些页面上找不到表格
- angular - 如何证明 Angular 一个类是 Angular 修饰的?
- firebase - 为什么我在 Firebase Cloud Firestore 模拟器 UI 中看不到数据?
- r - 不同用户的滚动计数
- angular - 无法绑定到“ngModel”,因为它不是“输入”的已知属性
- python - python中缺少参数
- java - 当我尝试从创建帐户页面切换到登录页面时,Android 应用程序崩溃
- operating-system - 为什么我们需要用户级和内核级线程
- neural-network - 用 keras 拟合表面
- c++ - 使用 const bool 删除调试信息时的编译器优化