如何修复“ apt-get更新”(Docker)上的“无法获取”错误

时间:2019-08-17 22:02:45

标签: linux docker apt-get

每次我执行“ apt-get update”时,都会收到我的vps无法获取“ https://download.docker.com”的错误。 我尝试删除docker,因为我不再需要它,但错误仍然显示。

如何从更新中删除该程序,或者如何将其完全删除?

我已经显示了所有已安装的软件包,并且试图完全删除Docker。

这是“ apt-get更新”的结果:

Ign https://download.docker.com jessie Release
Hit http://download.webmin.com sarge/contrib amd64 Packages
Err https://download.docker.com jessie/stable amd64 Packages
  HttpError404
Fetched 6,177 B in 4s (1,520 B/s)
W: Failed to fetch https://download.docker.com/linux/ubuntu/dists/jessie/stable/binary-amd64/Packages  HttpError404

E: Some index files failed to download. They have been ignored, or old ones used instead."```

1 个答案:

答案 0 :(得分:0)

要完全删除您的软件包及其相关名称,您需要执行以下操作:

import datetime
import pytest
from freezegun import freeze_time


@pytest.fixture
def fast_forward_to_2038():
    # use me to test the year 2038 problem
    with freeze_time('2038-01-19 03:14:08'):
        # year 2038 problem should be reproducible now
        yield


@pytest.mark.usefixtures('fast_forward_to_2038')
def test_2038_problem():
    assert datetime.datetime.now() == datetime.datetime(2038, 1, 19, 03, 14, 08)
    ...

这将删除有关软件包 docker 的所有内容,但不会删除安装时随其安装的依赖项

现在,解决问题的推荐方法是将包裹放在保留

sudo apt-get purge docker OR sudo apt-get remove --purge docker