gpt4 book ai didi

docker apt-get install 无法获取文件

转载 作者:行者123 更新时间:2023-12-04 18:59:13 25 4
gpt4 key购买 nike

我在 DockerFile 中有以下命令

# Use the official image as a parent image.
FROM ubuntu:18.04
#FROM node:10.18.0


# Install Node.js
RUN apt-get update && apt-get install -y \
wget \
build-essential \
software-properties-common


# install node version 10.18, need to use this specific
# version since it is the version that works with mapnik

RUN wget https://nodejs.org/dist/v10.18.0/node-v10.18.0-linux-x64.tar.xz

RUN tar -xJf node-v10.18.0-linux-x64.tar.xz -C /usr/local --strip-components=1 --no-same-owner \
&& rm node-v10.18.0-linux-x64.tar.xz \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs \
&& node --version \
&& npm --version

# install gdal
RUN add-apt-repository ppa:ubuntugis/ppa

RUN apt-get update && apt-get install -y --no-install-recommends \
gdal-bin \
cmake \
build-essential \
git \
ca-certificates \
libgdal-dev
它失败并出现以下错误:
et:151 http://archive.ubuntu.com/ubuntu bionic/main amd64 unixodbc-dev amd64 2.3.4-1.1ubuntu3 [217 kB]
Err:152 http://ppa.launchpad.net/ubuntugis/ppa/ubuntu bionic/main amd64 libgeos-c1v5 amd64 3.7.1-1~bionic0
Could not connect to ppa.launchpad.net:80 (91.189.95.85), connection timed out [IP: 91.189.95.85 80]
Err:153 http://ppa.launchpad.net/ubuntugis/ppa/ubuntu bionic/main amd64 proj-data all 5.2.0-1~bionic0
Unable to connect to ppa.launchpad.net:http: [IP: 91.189.95.85 80]
Err:154 http://ppa.launchpad.net/ubuntugis/ppa/ubuntu bionic/main amd64 libproj13 amd64 5.2.0-1~bionic0
Unable to connect to ppa.launchpad.net:http: [IP: 91.189.95.85 80]
Err:155 http://ppa.launchpad.net/ubuntugis/ppa/ubuntu bionic/main amd64 libgeotiff2 amd64 1.4.2-2build1+bionic0
Unable to connect to ppa.launchpad.net:http: [IP: 91.189.95.85 80]
Err:156 http://ppa.launchpad.net/ubuntugis/ppa/ubuntu bionic/main amd64 libogdi4.1 amd64 4.1.0+ds-1~bionic0
Unable to connect to ppa.launchpad.net:http: [IP: 91.189.95.85 80]
Err:157 http://ppa.launchpad.net/ubuntugis/ppa/ubuntu bionic/main amd64 libspatialite7 amd64 4.3.0a-5build1+bionic1
Unable to connect to ppa.launchpad.net:http: [IP: 91.189.95.85 80]
Err:158 http://ppa.launchpad.net/ubuntugis/ppa/ubuntu bionic/main amd64 libgdal20 amd64 2.4.2+dfsg-1~bionic0
Unable to connect to ppa.launchpad.net:http: [IP: 91.189.95.85 80]
Err:159 http://ppa.launchpad.net/ubuntugis/ppa/ubuntu bionic/main amd64 gdal-bin amd64 2.4.2+dfsg-1~bionic0
Unable to connect to ppa.launchpad.net:http: [IP: 91.189.95.85 80]
Err:160 http://ppa.launchpad.net/ubuntugis/ppa/ubuntu bionic/main amd64 libgeos-dev amd64 3.7.1-1~bionic0
Unable to connect to ppa.launchpad.net:http: [IP: 91.189.95.85 80]
Err:161 http://ppa.launchpad.net/ubuntugis/ppa/ubuntu bionic/main amd64 libgeotiff-dev amd64 1.4.2-2build1+bionic0
Unable to connect to ppa.launchpad.net:http: [IP: 91.189.95.85 80]
Err:162 http://ppa.launchpad.net/ubuntugis/ppa/ubuntu bionic/main amd64 libogdi-dev amd64 4.1.0+ds-1~bionic0
Unable to connect to ppa.launchpad.net:http: [IP: 91.189.95.85 80]
Err:163 http://ppa.launchpad.net/ubuntugis/ppa/ubuntu bionic/main amd64 libproj-dev amd64 5.2.0-1~bionic0
Unable to connect to ppa.launchpad.net:http: [IP: 91.189.95.85 80]
Err:164 http://ppa.launchpad.net/ubuntugis/ppa/ubuntu bionic/main amd64 libspatialite-dev amd64 4.3.0a-5build1+bionic1
Unable to connect to ppa.launchpad.net:http: [IP: 91.189.95.85 80]
Err:165 http://ppa.launchpad.net/ubuntugis/ppa/ubuntu bionic/main amd64 libgdal-dev amd64 2.4.2+dfsg-1~bionic0
Unable to connect to ppa.launchpad.net:http: [IP: 91.189.95.85 80]
Fetched 61.7 MB in 33s (1896 kB/s)
E: Failed to fetch http://ppa.launchpad.net/ubuntugis/ppa/ubuntu/pool/main/g/geos/libgeos-c1v5_3.7.1-1~bionic0_amd64.deb Could not connect to ppa.launchpad.net:80 (91.189.95.85), connection timed out [IP: 91.189.95.85 80]
E: Failed to fetch http://ppa.launchpad.net/ubuntugis/ppa/ubuntu/pool/main/p/proj/proj-data_5.2.0-1~bionic0_all.deb Unable to connect to ppa.launchpad.net:http: [IP: 91.189.95.85 80]
E: Failed to fetch http://ppa.launchpad.net/ubuntugis/ppa/ubuntu/pool/main/p/proj/libproj13_5.2.0-1~bionic0_amd64.deb Unable to connect to ppa.launchpad.net:http: [IP: 91.189.95.85 80]
E: Failed to fetch http://ppa.launchpad.net/ubuntugis/ppa/ubuntu/pool/main/libg/libgeotiff-dfsg/libgeotiff2_1.4.2-2build1+bionic0_amd64.deb Unable to connect to ppa.launchpad.net:http: [IP: 91.189.95.85 80]
E: Failed to fetch http://ppa.launchpad.net/ubuntugis/ppa/ubuntu/pool/main/o/ogdi-dfsg/libogdi4.1_4.1.0+ds-1~bionic0_amd64.deb Unable to connect to ppa.launchpad.net:http: [IP: 91.189.95.85 80]
E: Failed to fetch http://ppa.launchpad.net/ubuntugis/ppa/ubuntu/pool/main/s/spatialite/libspatialite7_4.3.0a-5build1+bionic1_amd64.deb Unable to connect to ppa.launchpad.net:http: [IP: 91.189.95.85 80]
E: Failed to fetch http://ppa.launchpad.net/ubuntugis/ppa/ubuntu/pool/main/g/gdal/libgdal20_2.4.2+dfsg-1~bionic0_amd64.deb Unable to connect to ppa.launchpad.net:http: [IP: 91.189.95.85 80]
E: Failed to fetch http://ppa.launchpad.net/ubuntugis/ppa/ubuntu/pool/main/g/gdal/gdal-bin_2.4.2+dfsg-1~bionic0_amd64.deb Unable to connect to ppa.launchpad.net:http: [IP: 91.189.95.85 80]
E: Failed to fetch http://ppa.launchpad.net/ubuntugis/ppa/ubuntu/pool/main/g/geos/libgeos-dev_3.7.1-1~bionic0_amd64.deb Unable to connect to ppa.launchpad.net:http: [IP: 91.189.95.85 80]
E: Failed to fetch http://ppa.launchpad.net/ubuntugis/ppa/ubuntu/pool/main/libg/libgeotiff-dfsg/libgeotiff-dev_1.4.2-2build1+bionic0_amd64.deb Unable to connect to ppa.launchpad.net:http: [IP: 91.189.95.85 80]
E: Failed to fetch http://ppa.launchpad.net/ubuntugis/ppa/ubuntu/pool/main/o/ogdi-dfsg/libogdi-dev_4.1.0+ds-1~bionic0_amd64.deb Unable to connect to ppa.launchpad.net:http: [IP: 91.189.95.85 80]
E: Failed to fetch http://ppa.launchpad.net/ubuntugis/ppa/ubuntu/pool/main/p/proj/libproj-dev_5.2.0-1~bionic0_amd64.deb Unable to connect to ppa.launchpad.net:http: [IP: 91.189.95.85 80]
E: Failed to fetch http://ppa.launchpad.net/ubuntugis/ppa/ubuntu/pool/main/s/spatialite/libspatialite-dev_4.3.0a-5build1+bionic1_amd64.deb Unable to connect to ppa.launchpad.net:http: [IP: 91.189.95.85 80]
E: Failed to fetch http://ppa.launchpad.net/ubuntugis/ppa/ubuntu/pool/main/g/gdal/libgdal-dev_2.4.2+dfsg-1~bionic0_amd64.deb Unable to connect to ppa.launchpad.net:http: [IP: 91.189.95.85 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
我可以直接访问这些文件,例如将此链接粘贴到浏览器中, http://ppa.launchpad.net/ubuntugis/ppa/ubuntu/pool/main/g/gdal/libgdal-dev_2.4.2+dfsg-1~bionic0_amd64.deb您将下载该文件。
这曾经有效,但现在失败了。有任何想法吗?

最佳答案

在我的情况下,问题是 ipv6 没有从我的 docker 容器中启用,并且有问题的 ppa (ondre/php) 必须已经开始执行它。这花费了我一周的工作,使我的头撞到了很多墙上。实际上,我多次重新启动笔记本电脑时遇到了 Ubuntu 臭名昭著的持续低亮度错误 - 但这是另一回事。所以在包扎我的头、小睡、休息和祈祷之后,这就是我解决问题的方法:
之后列出的资源

  • 将 Ubuntu 升级到最新版本(我认为这是可选的 - 我只是全力以赴)
  • 清除并重新安装 Docker 到最新版本(现在 20)
  • 在我的调制解调器上找到我的 ipv6 设置并确保它们正常工作。 (他们是)。基本上,确保 ipv6 在 Docker 主机
  • 上工作。
  • 停止 docker 。 systemctl stop docker
  • /etc/docker 中创建 daemon.json 文件并添加以下内容:
  • {
    "data-root": "/home/user/docker/data",
    "ipv6": true,
    "fixed-cidr-v6": "fd00::/80"
    }
    最后两个属性是你关注的
  • 重启 Docker systemctl start docker .此时,您应该没有 docker 错误
  • 然后,这是关键,通过主机启用 docker 容器的 ipv6 访问:(在主机上运行)
  • ip6tables -t nat -A POSTROUTING -s fd00::/80 ! -o docker0 -j MASQUERADE
  • 使用任何你喜欢的方式坚持 #7

  • 资源:
  • How to enable IPv6 for Docker containers on Ubuntu 18.04
  • Iptables reload/restart on Ubuntu 18.04
  • Enable IPv6 support
  • 关于docker apt-get install 无法获取文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68764905/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com