首页 > 解决方案 > 在 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。

标签: ubuntugitlab

解决方案


尝试在浏览器中首先访问https://packages.gitlab.com/gitlab/gitlab-ce 。

如果这也失败了,则可能是域被防火墙阻止了。


推荐阅读