ubuntu - 在 Ubuntu 上安装 GitLab:“无法解析主机:packages.gitlab.com”
问题描述
这是我的系统(全新安装):
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial
我已经安装了 OpenSSH 和 Postfix 并添加了 GitLab 存储库,但是当我尝试安装 GitLab 时,这就是我得到的:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
gitlab-ce
0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.
Need to get 743 MB of archives.
After this operation, 1,961 MB of additional disk space will be used.
Err:1 https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu xenial/main amd64 gitlab-ce amd64 12.8.1-ce.0
Could not resolve host: packages.gitlab.com
E: Failed to fetch https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/pool/xenial/main/g/gitlab-ce/gitlab-ce_12.8.1-ce.0_amd64.deb Could not resolve host: packages.gitlab.com
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
我尝试了这两个建议,甚至尝试更改网络,希望是学校的 Wi-Fi。
解决方案
尝试在浏览器中首先访问https://packages.gitlab.com/gitlab/gitlab-ce 。
如果这也失败了,则可能是域被防火墙阻止了。
推荐阅读
- ruby-on-rails - `redirect_to @article` 在 Blog::ArticlesController#create 中抛出 `NoMethodError` 错误
- node.js - 在现有 kubernetes pod 中按需创建容器
- office-js - 使用带有 VueJS 的 on-send 加载项 Office Outlook 2002 构建
- java - 为什么即使使用 CascadeType.ALL 也会出现 DataIntegrityViolationException?
- python - 使用 Python 为 Valve QC 文件生成代码
- elasticsearch - 如何在 Elasticsearch 中存储国家/州/城市信息
- ios - 通过 Xcode 在我自己的设备上安装应用程序
- r - 通过 ODBC 连接到 Firebird DB
- active-directory - 以编程方式将 RoleAssignment 添加到资源组
- python - 如何创建一个可以从终端访问的模块?