【问题标题】:Docker build rocker/r-ver:3.4.4 failDocker 构建 rocker/r-ver:3.4.4 失败
【发布时间】:2019-03-21 17:10:58
【问题描述】:

我一直在努力构建

FROM rocker/r-ver:3.4.4
MAINTAINER Dennis Leão
RUN apt-get -y update && \
 apt-get install -y build-essential curl openssl 

但我收到以下错误

Err:1 http://security-cdn.debian.org/debian-security stretch/updates InRelease
  Could not connect to security-cdn.debian.org:80 (151.101.252.204). - connect (111: Connection refused)
Err:2 http://cdn-fastly.deb.debian.org/debian stretch InRelease
  Could not connect to cdn-fastly.deb.debian.org:80 (151.101.252.204). - connect (111: Connection refused)
Err:3 http://cdn-fastly.deb.debian.org/debian stretch-updates InRelease
  Unable to connect to cdn-fastly.deb.debian.org:http:
Reading package lists...
W: Failed to fetch http://deb.debian.org/debian/dists/stretch/InRelease  Could not connect to cdn-fastly.deb.debian.org:80 (151.101.252.204). - connect (111: Connection refused)
W: Failed to fetch http://security.debian.org/debian-security/dists/stretch/updates/InRelease  Could not connect to security-cdn.debian.org:80 (151.101.252.204). - connect (111: Connection refused)
W: Failed to fetch http://deb.debian.org/debian/dists/stretch-updates/InRelease  Unable to connect to cdn-fastly.deb.debian.org:http:
W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package build-essential
E: Unable to locate package curl

我正在使用 Macos Mojave,但我能够在 ubuntu 16 上构建。我该怎么办?

【问题讨论】:

  • 搜索“xquartz docker.com macos”的结果可能有一些想法可以尝试:fredrikaverpil.github.io/2016/07/31/…。如果成功,您可以将结果写成答案,如果没有,您可以将结果添加到您的问题中。
  • 您有网络问题:https://twitter.com/nprmusic/status/1108782830253801474Could not connect to cdn-fastly.deb.debian.org:80 (151.101.252.204)
  • 但这仅发生在该 Dockerfile 上,我有其他使用 ubuntu:16 的图像在我的 mac 上运行良好。这是唯一一个给我这些错误事件的事件,尽管它适用于 ubuntu。

标签: r docker debian apt-get


【解决方案1】:

嗯,最后,这是一个 DNS 问题,更改我的 Mac 的 DNS 解决了这个问题。

【讨论】:

    猜你喜欢
    • 2021-08-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-01-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多