我在构建我的Dockerfile (在OS上)时遇到了问题,得到了多个库的上述错误。我尝试过添加google服务器和下面的sources.list解决方案,但是我在网上发现的任何东西都解决不了我的问题。
::sources.list“修复”
RUN echo "deb http://archive.ubuntu.com/ubuntu/ $(lsb_release -sc) main universe Trusty-updates" >> /etc/apt/sources.list*码头文件的一部分
FROM ubuntu:14.10
RUN echo exit 101 > /usr/sbin/policy-rc.d && chmod +x /usr/sbin/policy-rc.d
RUN apt-get install -y --fix-missing software-properties-common
RUN apt-get update*建造产出
Step 15 : RUN apt-get install -y --fix-missing software-properties-common
---> Running in 6067adba2748
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
ca-certificates gir1.2-glib-2.0 iso-codes krb5-locales libasn1-8-heimdal
libcurl3-gnutls libdbus-glib-1-2 libgcrypt20 libgirepository-1.0-1
libglib2.0-0 libglib2.0-data libgssapi-krb5-2 libgssapi3-heimdal
libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal
libhx509-5-heimdal libidn11 libk5crypto3 libkeyutils1 libkrb5-26-heimdal
libkrb5-3 libkrb5support0 libldap-2.4-2 libroken18-heimdal librtmp1
libsasl2-2 libsasl2-modules libsasl2-modules-db libwind0-heimdal libxml2
openssl python-apt-common python3-apt python3-dbus python3-gi python3-pycurl
python3-software-properties sgml-base shared-mime-info unattended-upgrades
xdg-user-dirs xml-core xz-utils
Suggested packages:
isoquery rng-tools krb5-doc krb5-user libsasl2-modules-otp
libsasl2-modules-ldap libsasl2-modules-sql libsasl2-modules-gssapi-mit
libsasl2-modules-gssapi-heimdal python3-apt-dbg python-apt-doc
python-dbus-doc python3-dbus-dbg libcurl4-gnutls-dev python-pycurl-doc
python3-pycurl-dbg sgml-base-doc bsd-mailx mail-transport-agent debhelper
The following NEW packages will be installed:
ca-certificates gir1.2-glib-2.0 iso-codes krb5-locales libasn1-8-heimdal
libcurl3-gnutls libdbus-glib-1-2 libgcrypt20 libgirepository-1.0-1
libglib2.0-0 libglib2.0-data libgssapi-krb5-2 libgssapi3-heimdal
libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal
libhx509-5-heimdal libidn11 libk5crypto3 libkeyutils1 libkrb5-26-heimdal
libkrb5-3 libkrb5support0 libldap-2.4-2 libroken18-heimdal librtmp1
libsasl2-2 libsasl2-modules libsasl2-modules-db libwind0-heimdal libxml2
openssl python-apt-common python3-apt python3-dbus python3-gi python3-pycurl
python3-software-properties sgml-base shared-mime-info
software-properties-common unattended-upgrades xdg-user-dirs xml-core
xz-utils
0 upgraded, 45 newly installed, 0 to remove and 0 not upgraded.
Need to get 8227 kB of archives.
After this operation, 45.4 MB of additional disk space will be used.
Err http://archive.ubuntu.com/ubuntu/ utopic/main libroken18-heimdal amd64 1.6~rc2+dfsg-8
Unable to connect to archive.ubuntu.com:http: [IP: 209.6.3.210 80]
Err http://archive.ubuntu.com/ubuntu/ utopic/main libasn1-8-heimdal amd64 1.6~rc2+dfsg-8
Unable to connect to archive.ubuntu.com:http: [IP: 209.6.3.210 80]
Err http://archive.ubuntu.com/ubuntu/ utopic/main libkrb5support0 amd64 1.12.1+dfsg-10
Unable to connect to archive.ubuntu.com:http: [IP: 209.6.3.210 80]
...
Unable to correct missing packages.
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/h/heimdal/libroken18- heimdal_1.6~rc2+dfsg-8_amd64.deb Unable to connect to archive.ubuntu.com:http: [IP: 209.6.3.210 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/h/heimdal/libasn1-8- heimdal_1.6~rc2+dfsg-8_amd64.deb Unable to connect to archive.ubuntu.com:http: [IP: 209.6.3.210 80]
Unable to connect to archive.ubuntu.com:http: [IP: 209.6.3.210 80]
...
E: Aborting install.
2014/12/12 10:24:32 The command [/bin/sh -c apt-get install -y --fix-missing software- properties-common] returned a non-zero code: 100发布于 2014-12-13 12:37:42
为什么要在apt-get update之后运行apt-get install?我认为您遇到的问题是存储库缓存有一个死服务器,您无法连接到它。这个Dockerfile现在正在工作:
FROM ubuntu:14.10
RUN echo exit 101 > /usr/sbin/policy-rc.d && chmod +x /usr/sbin/policy-rc.d
RUN apt-get update
RUN apt-get install -y --fix-missing software-properties-common https://stackoverflow.com/questions/27449605
复制相似问题