【问题标题】:error install laravel v 5.4 with composer in ubuntu在 ubuntu 中使用 composer 安装 laravel v 5.4 时出错
【发布时间】:2018-03-25 17:35:27
【问题描述】:

安装 laravel v-5.4 时出现错误

得到错误:

无法下载“http://packagist.org/p/provider-2016%24e217873bdc8408956b33b1eb317ad1182d3a82fde9a746cc5e7def6135696f96.json”文件(HTTP/1.1 500 内部服务器错误) http://packagist.org 无法完全加载,包信息是从本地缓存加载的,可能已过期 安装 laravel/laravel (v5.5.0) - 安装 laravel/laravel (v5.5.0):从缓存加载 在博客中创建项目 @php -r "file_exists('.env') || 复制('.env.example', '.env');" 使用包信息加载作曲家存储库 更新依赖(包括require-dev)

解码响应失败:zlib_decode():数据错误 使用降级模式重试,查看https://getcomposer.org/doc/articles/troubleshooting.md#degraded-mode 了解更多信息 您的需求无法解析为一组可安装的软件包。

Problem 1
- phpunit/phpunit 6.4.1 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- phpunit/phpunit 6.4.0 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- phpunit/phpunit 6.3.1 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- phpunit/phpunit 6.3.0 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- phpunit/phpunit 6.2.4 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- phpunit/phpunit 6.2.3 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- phpunit/phpunit 6.2.2 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- phpunit/phpunit 6.2.1 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- phpunit/phpunit 6.2.0 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- phpunit/phpunit 6.1.4 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- phpunit/phpunit 6.1.3 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- phpunit/phpunit 6.1.2 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- phpunit/phpunit 6.1.1 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- phpunit/phpunit 6.1.0 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- phpunit/phpunit 6.0.9 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- phpunit/phpunit 6.0.8 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- phpunit/phpunit 6.0.7 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- phpunit/phpunit 6.0.6 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- phpunit/phpunit 6.0.5 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- phpunit/phpunit 6.0.4 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- phpunit/phpunit 6.0.3 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- phpunit/phpunit 6.0.2 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- phpunit/phpunit 6.0.13 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- phpunit/phpunit 6.0.12 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- phpunit/phpunit 6.0.11 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- phpunit/phpunit 6.0.10 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- phpunit/phpunit 6.0.1 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- phpunit/phpunit 6.0.0 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- Installation request for phpunit/phpunit ~6.0 -> satisfiable by phpunit/phpunit[6.0.0, 6.0.1, 6.0.10, 6.0.11, 6.0.12, 6.0.13, 6.0.2, 6.0.3, 6.0.4, 6.0.5, 6.0.6, 6.0.7, 6.0.8, 6.0.9, 6.1.0, 6.1.1, 6.1.2, 6.1.3, 6.1.4, 6.2.0, 6.2.1, 6.2.2, 6.2.3, 6.2.4, 6.3.0, 6.3.1, 6.4.0, 6.4.1].

请帮我解决这个问题。我试过但没有结果。

【问题讨论】:

  • 你为什么不首先安装ext-dom 包以开始:sudo apt-get install php-xml。之后,您可以访问提供的链接并开始以这种方式进行故障排除。如果您在访问了链接并尝试了提供的解决方案后仍有问题,请告诉我。
  • 看起来phpunit/phpunit 6.4.1需要ext-dom
  • 我认为您的系统中缺少请求的 PHP 扩展 dom

标签: laravel laravel-5.4


【解决方案1】:

如果您使用的是 PHP 7 或更高版本,您可以通过运行以下命令来安装 ext-dom

sudo apt-get install php7.0-xml // for PHP 7
sudo apt-get install php7.1-xml // for PHP 7

【讨论】:

  • 但我检查了 php 版本。我已经有那个版本的php了。
  • 需要重新安装吗
  • 不一定。
猜你喜欢
  • 2014-12-01
  • 2021-06-25
  • 2017-07-13
  • 2019-06-03
  • 2021-09-10
  • 2014-01-12
  • 1970-01-01
  • 2016-07-04
  • 1970-01-01
相关资源
最近更新 更多