php - 无法下载 dompdf/dompdf Laravel Composer
问题描述
我正在通过 XAMPP 从我的本地机器上运行它。我尝试安装了几次,它仍然给我同样的错误。尝试 ping google.com,并没有显示错误(要清楚我自己这不是 DNS 问题)。在 GitHub 问题上没有发现任何与此相关的具体内容。
当我尝试通过 Composer 要求 barryvdh/laravel-dompdf 时,我收到此错误。
Failed to download dompdf/dompdf from dist: The "https://api.github.com/repos/dompdf/dompdf/zipball/5113accd9ae5d466077cce5208dcf3fb871bf8f6" file could not be downloaded: php_network_getaddresses: getaddrinfo failed: No such host is known.
failed to open stream: php_network_getaddresses: getaddrinfo failed: No such host is known.
以下是从 bash 复制的详细信息。
$ composer require barryvdh/laravel-dompdf
Using version ^0.8.2 for barryvdh/laravel-dompdf
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 5 installs, 0 updates, 0 removals
- Installing sabberworm/php-css-parser (8.1.0): Downloading (100%)
- Installing phenx/php-svg-lib (v0.3.2): Downloading (100%)
- Installing phenx/php-font-lib (0.5.1): Downloading (100%)
- Installing dompdf/dompdf (v0.8.2): Downloading (90%)
Downloading (failed)
Downloading (failed) Failed to download dompdf/dompdf from dist: The "https://api.github.com/repos/dompdf/dompdf/zipball/5113accd9ae5d466077cce5208dcf3fb871bf8f6" file could not be downloaded: php_network_getaddresses: getaddrinfo failed: No such host is known.
failed to open stream: php_network_getaddresses: getaddrinfo failed: No such host is known.
Now trying to download from source
- Installing dompdf/dompdf (v0.8.2): Cloning 5113accd9a
[RuntimeException]
Failed to clone https://github.com/dompdf/dompdf.git via https, ssh protocols, aborting.
- https://github.com/dompdf/dompdf.git
Cloning into 'D:\xampp\htdocs\rtdo\vendor\dompdf\dompdf'...
fatal: unable to access 'https://github.com/dompdf/dompdf.git/': Could not resolve host: github.com
- git@github.com:dompdf/dompdf.git
Cloning into 'D:\xampp\htdocs\rtdo\vendor\dompdf\dompdf'...
ssh: Could not resolve hostname github.com: Name or service not known
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
如果您需要更多详细信息,请告诉我。谢谢你!
解决方案
推荐阅读
- python - 如何聚合多个列并输出为行?
- django - 如果它们已经存在于数据库中,则选择过滤和删除
- javascript - 我应该使用状态还是调用函数以获得更好的性能?
- microsoft-graph-api - 像 Google 这样的更简单的 MSAL.js 身份验证?(不使用缓存系统)
- javascript - 如何
- c - 重新定义 + 冲突类型错误,但没有重新定义或实际冲突
- python - 在运算符中使用 XCOM 值
- php - 如何添加随机名称以使文件不会替换 php
- python - 如何使用自定义数据加载器在 fastai 数据包中加载测试集?
- javascript - 使用 PHP 和 JS 确认更改 SELECT