Docker:Err http://archive.ubuntu.com trusty InRelease & E: Unable to locate package [name] 问题
参考:
Docker containers can't resolve DNS on Ubuntu 14.04 Desktop Host
Unable 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:Err http://archive.ubuntu.com trusty InRelease & E: Unable to locate package [name] 问题的更多相关文章
- Ubuntu : 解决更新时出现 Unable to locate package update
当用apt-get更新软件包时常出现错误提示Unable to locate package update, 尤其是在ubuntu server上,解决方法是: 先更新apt-get ...
- Ubuntu下,如何解决Unable to locate package
在虚拟机上新装了一个ubuntu 12.10,想在上面装一个Git,却发生了以下错误信息 我觉得原因可能是我换了163的源,没有更新所以找不到这个包. 这时候就要使用 sudo apt-get upd ...
- 【转】ubuntu 11.04使用apt-get安装软件时一直提示E:unable to locate package
问题: VMware虚拟机安装了ubuntu 11.04,在使用apt-get安装软件时一直提示E:Unable to locate package. 百度了原因,说是要更新源,使用命令:sudo a ...
- Ubuntu的Unable to locate package无法更新源问题解决方案
https://blog.csdn.net/long19910605/article/details/47017889/ 问题: 更新源时提示不能联网(does the network require ...
- ubuntu 安装nginx, 出现 Unable to locate package
今天在初始化一台新的ubuntu 服务器时,敲上了 sudo apt-get install nginx 来安装nginx, 却发现提示: Reading package lists... Done ...
- linux -- Ubuntu报错“unable to locate package...”
有时候在Ubuntu命令行中执行安装某个文件的时候,如:sudo apt-get install xinit ,报 “unable to locate package...” 错误,解决办法如下 1. ...
- Ubuntu install 错误 E:Unable to locate package
今天在 Ubuntu 上执行 sudo apt install sl 命令,结果报错:E:Unable to locate package sl 上网查询了一下,先更新一下 apt-get,执行:su ...
- Ubuntu:Unable to locate package ***
在Ubuntu 上使用apt-get 安装包时遇到 Unable to locate package 的信息 解决方案: 更细apt-get然后重新安装 #sudo apt-get update ...
- Ubuntu Server安装telnet服务时"Unable to locate package telnetd"解决方法
装好Ubuntu Server 12.04后,用apt-get安装telnetd报"E: Unable to locate package telnetd",解决方法如下: 虚拟机 ...
随机推荐
- SPOJ - DQUERY
题目链接:传送门 题目大意:一个容量 n 的数组, m次询问,每次询问 [x,y]内不同数的个数 题目思路:主席树(注意不是权值线段树而是位置线段树) 也就是按一般线段树的逻辑来写只是用主席树实现而已 ...
- gradle多项目构建及依赖
上项目结构图: idea里面一个project其实相当于eclipse的一个workspace,这样一来就很好理解了,我们新建了两个module,相当于eclipse的两个项目工程 主要看配置:bui ...
- BeginnerAdmin后台框架的使用!
基于layui的后台框架,我比较喜欢使用BeginnerAdmin模板.但是在构建的时候可能会遇到一些问题. 问题一:侧栏出不来: 报错是这样的: 这个错误:说明的是 navbar.js没有引进来. ...
- 170714、springboot编程之多数据源切换(动态)
(1)新建maven java project; 新建一个maven project,取名为:spring-boot-multi-ds (2)在pom.xml添加依赖包: 在pom.xml文件中加入依 ...
- Jmeter,常见参数 vars、prev、ctx 、props 类的api--beanshell
http://www.cnblogs.com/fnng/p/5827577.html---------jmeter 性能测试 jmeter常见参数 vars.prev.ctx .props 类的api ...
- Ultra-QuickSort---poj2299 (归并排序.逆序数.树状数组.离散化)
题目链接:http://poj.org/problem?id=2299 题意就是求把数组按从小到大的顺序排列,每次只能交换相邻的两个数, 求至少交换了几次 就是求逆序数 #include<std ...
- (2.10)Mysql之SQL基础——约束及主键重复处理
(2.10)Mysql之SQL基础——约束及主键重复处理 关键词:mysql约束,批量插入数据主键冲突 [1]查看索引: show index from table_name; [2]查看有约束的列: ...
- Frame 框架的创建
Qt 创建Frame框架的例子: QFrame * frm = new QFrame(this); //创建一个框架 frm->setFrameStyle(QFrame::StyledPanel ...
- char *strstr(const char *str1, const char *str2);
[FROM MSDN && 百科] 原型:char *strstr(const char *str1, const char *str2); #include<string.h& ...
- 已有模板与tp框架的结合 (前台)
已有模板与tp框架的结合 具体步骤 A.复制模板文件到view指定目录 B. 复合css .js.img.静态资源文件到系统指定目录 C. 把静态资源(css,js,img)文件的路径设置为“常量 ...