Docker:Err http://archive.ubuntu.com trusty InRelease & E: Unable to locate package [name] 问题
2017-02-16 16:52
2501 查看
参考:
Docker containers can't resolve DNS on Ubuntu 14.04 Desktop HostUnable to locate package错误解决办法
问题:
运行:make -f docker.mk base-docker-image
时,出现如下错误:
Sending build context to Docker daemon 9.728 kB Step 1/25 : FROM ubuntu:14.04 ---> b969ab9f929b Step 2/25 : RUN apt-get update ---> Running in 652b2dccd5a0 Err http://archive.ubuntu.com trusty InRelease Err http://archive.ubuntu.com trusty-updates InRelease Err http://archive.ubuntu.com trusty-security InRelease Err http://archive.ubuntu.com trusty Release.gpg Could not resolve 'archive.ubuntu.com' Err http://archive.ubuntu.com trusty-updates Release.gpg Could not resolve 'archive.ubuntu.com' Err http://archive.ubuntu.com trusty-security Release.gpg Could not resolve 'archive.ubuntu.com' Reading package lists... W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/InRelease W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/InRelease W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-security/InRelease W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/Release.gpg Could not resolve 'archive.ubuntu.com' W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/Release.gpg Could not resolve 'archive.ubuntu.com' W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-security/Release.gpg Could not resolve 'archive.ubuntu.com' W: Some index files failed to download. They have been ignored, or old ones used instead. ---> 9f577de31291 Removing intermediate container 652b2dccd5a0 Step 3/25 : RUN apt-get install -y automake autopoint bison bridge-utils build-essential cmake ethtool flex g++ gdb git libboost-dev libboost-filesystem-dev libboost-program-options-dev libboost-system-dev libboost-test-dev libboost-thread-dev libedit-dev libev-dev libevent-dev libffi-dev libglib2.0-dev libgmp-dev libhiredis-dev libjson0 libjson0-dev libjudy-dev libnl-route-3-dev libpcap0.8 libpcap0.8-dev libpcap-dev libtool libssl-dev mktemp openssh-server packit pkg-config python-dev python-pip python-pygraph python-pygraphviz python-setuptools python-texttable python-thrift python-yaml quagga redis-server redis-tools subversion tcpdump texinfo tshark valgrind vim xterm ---> Running in 21e5ad980543 Reading package lists... Building dependency tree... Reading state information... Package mktemp is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: coreutils Package vim is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Unable to locate package automake E: Unable to locate package autopoint E: Unable to locate package bison E: Unable to locate package bridge-utils E: Unable to locate package build-essential E: Unable to locate package cmake E: Unable to locate package ethtool E: Unable to locate package flex E: Unable to locate package gdb E: Unable to locate package git E: Unable to locate package libboost-dev E: Unable to locate package libboost-filesystem-dev E: Unable to locate package libboost-program-options-dev E: Unable to locate package libboost-system-dev E: Unable to locate package libboost-test-dev E: Unable to locate package libboost-thread-dev E: Unable to locate package libedit-dev E: Unable to locate package libev-dev E: Unable to locate package libevent-dev E: Unable to locate package libffi-dev E: Unable to locate package libglib2.0-dev E: Couldn't find any package by regex 'libglib2.0-dev' E: Unable to locate package libgmp-dev E: Unable to locate package libhiredis-dev E: Unable to locate package libjson0-dev E: Unable to locate package libjudy-dev E: Unable to locate package libnl-route-3-dev E: Unable to locate package libpcap0.8 E: Couldn't find any package by regex 'libpcap0.8' E: Unable to locate package libpcap0.8-dev E: Couldn't find any package by regex 'libpcap0.8-dev' E: Unable to locate package libpcap-dev E: Unable to locate package libtool E: Unable to locate package libssl-dev E: Package 'mktemp' has no installation candidate E: Unable to locate package openssh-server E: Unable to locate package packit E: Unable to locate package pkg-config E: Unable to locate package python-dev E: Unable to locate package python-pip E: Unable to locate package python-pygraph E: Unable to locate package python-pygraphviz E: Unable to locate package python-setuptools E: Unable to locate package python-texttable E: Unable to locate package python-thrift E: Unable to locate package python-yaml E: Unable to locate package quagga E: Unable to locate package redis-server E: Unable to locate package redis-tools E: Unable to locate package subversion E: Unable to locate package tcpdump E: Unable to locate package texinfo E: Unable to locate package tshark E: Unable to locate package valgrind E: Package 'vim' has no installation candidate E: Unable to locate package xterm The command '/bin/sh -c apt-get install -y automake autopoint bison bridge-utils build-essential cmake ethtool flex g++ gdb git libboost-dev libboost-filesystem-dev libboost-program-options-dev libboost-system-dev libboost-test-dev libboost-thread-dev libedit-dev libev-dev libevent-dev libffi-dev libglib2.0-dev libgmp-dev libhiredis-dev libjson0 libjson0-dev libjudy-dev libnl-route-3-dev libpcap0.8 libpcap0.8-dev libpcap-dev libtool libssl-dev mktemp openssh-server packit pkg-config python-dev python-pip python-pygraph python-pygraphviz python-setuptools python-texttable python-thrift python-yaml quagga redis-server redis-tools subversion tcpdump texinfo tshark valgrind vim xterm' returned a non-zero code: 100 make: *** [base-docker-image] Error 100
解决方法:
该问题分为两个子问题,一个是Err http://archive.ubuntu.com trusty InRelease,另外一个是
E: Unable to locate package [name].
第一个问题其实并非是DNS问题,就原文来看,是Docker的bridge连接问题:
sudo apt-get install bridge-utils pkill docker iptables -t nat -F ifconfig docker0 down brctl delbr docker0 sudo service docker restart
It will force docker to recreate the bridge and reinit all the network rules
第二个问题 => tf serving docker build failed at apt-get update/install
This looks like a connectivity problem on your machine where Docker cannot access the network. Please make sure that your machine can access the internet, and if it still doesn't work I would recommend asking Docker support to help configure it to work with your proxy.
2017/2/17
相关文章推荐
- docker容器内运行apt-get报 Err http://archive.ubuntu.com trusty InRelease 错误
- Ubuntu中docker容器运行apt-get update失败 Err:1 http://archive.ubuntu.com/ubuntu xenial InRelease
- GPG error: http://cn.archive.ubuntu.com trusty InRelease: Clearsigned file isn’t valid, got ‘NODATA’
- GPG error: http://cn.archive.ubuntu.com trusty InRelease: Clearsigned file isn't valid, got 'NODATA'
- Ubuntu 安装源配置:Unable to locate package & unmet dependencies
- Ubuntu 16.04更新软件提示"需要安装不能信任的软件包" http://archive.ubuntukylin.com:10006/ubuntukylin xenial InRelease
- ubuntu 14.04 编译内核出现unable to locate package ncurses-devel 问题的解决
- Ubuntu 16.04更新软件提示"需要安装不能信任的软件包" http://archive.ubuntukylin.com:10006/ubuntukylin xenial InRelease
- 解决Ubuntu安装ftp服务出现的 Unable to locate package vsftpd问题(绝对有用!!!)
- Xubuntu15.04更新系统源时出现错误提示W: GPG 错误:http://archive.ubuntukylin.com:10006 xenial InRelease: 由于没有公钥,无法验证
- W: http://archive.ubuntukylin.com:10006/ubuntukylin/dists/xenial/InRelease: Signature by key 6CE35A4EBAB676094476BE7CD259B7555E1D3C58 uses weak digest algorithm (SHA1)
- Ubuntu 14.04 & ant: Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-7-openjdk-i386/lib/tools.jar
- 关于Ubuntu的Unable to locate package无法更新源问题解决方案
- Ubuntu系统下apt下载中的问题:unable to locate package;更新Ubuntu系统的软件源
- Ubuntu 16.04更新软件提示"需要安装不能信任的软件包" http://archive.ubuntukylin.com:10006/ubuntukylin xenial InRelease
- Ubuntu 14.04更新软件提示W: GPG error: http://archive.ubuntukylin.com:10006 xenial InRelease
- ubuntu -- Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap"
- Ubuntu 14.04更新软件提示W: GPG error: http://archive.ubuntukylin.com:10006 xenial InRelease
- ubuntu 14.04 编译内核出现unable to locate package ncurses-devel 问题的解决
- W: GPG 错误:http://archive.ubuntukylin.com:10006 xenial InRelease: 由于没有公钥,无法验证下