-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unable to install ubuntu packages. #1350
Comments
There is no apt cache yet (on purpose, since it would get outdated and takes up extra space); you'll need to |
apt-get wont' work properly |
when executing apt-get update we will get the following errors:
|
That sounds like a bad mirror or maybe a misbehaving proxy -- are you
behind any kind of firewall (corporate or otherwise)?
|
@tianon erics-MacBook-Air:~ sam$ docker pull ubuntu
Using default tag: latest
Pulling repository docker.io/library/ubuntu
af88597ec24b: Pulling dependent layers
af88597ec24b: Download complete
895b070402bd: Download complete
02e5bca4149b: Download complete
b2ae0a712b39: Download complete
Status: Downloaded newer image for ubuntu:latest
docker.io/library/ubuntu: this image was pulled from a legacy registry. Important: This registry version will not be supported in future versions of docker.
erics-MacBook-Air:~ sam$ docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
ubuntu latest af88597ec24b 11 days ago 187.9 MB
erics-MacBook-Air:~ sam$ docker run -t -i af8 /bin/bash
root@e86bc7318066:/# apt-get update
Ign http://archive.ubuntu.com trusty InRelease
Get:1 http://archive.ubuntu.com trusty-updates InRelease [64.4 kB]
Get:2 http://archive.ubuntu.com trusty-security InRelease [64.4 kB]
Hit http://archive.ubuntu.com trusty Release.gpg
Get:3 http://archive.ubuntu.com trusty-updates/main Sources [309 kB]
Get:4 http://archive.ubuntu.com trusty-updates/restricted Sources [5219 B]
Get:5 http://archive.ubuntu.com trusty-updates/universe Sources [183 kB]
Get:6 http://archive.ubuntu.com trusty-updates/main amd64 Packages [851 kB]
Get:7 http://archive.ubuntu.com trusty-updates/restricted amd64 Packages [23.4 kB]
Get:8 http://archive.ubuntu.com trusty-updates/universe amd64 Packages [421 kB]
Get:9 http://archive.ubuntu.com trusty-security/main Sources [129 kB]
Get:10 http://archive.ubuntu.com trusty-security/restricted Sources [3920 B]
Get:11 http://archive.ubuntu.com trusty-security/universe Sources [37.4 kB]
Get:12 http://archive.ubuntu.com trusty-security/main amd64 Packages [495 kB]
Get:13 http://archive.ubuntu.com trusty-security/restricted amd64 Packages [20.2 kB]
Get:14 http://archive.ubuntu.com trusty-security/universe amd64 Packages [158 kB]
Hit http://archive.ubuntu.com trusty Release
Get:15 http://archive.ubuntu.com trusty/main Sources [1335 kB]
Get:16 http://archive.ubuntu.com trusty/restricted Sources [5335 B]
Get:17 http://archive.ubuntu.com trusty/universe Sources [7926 kB]
Get:18 http://archive.ubuntu.com trusty/main amd64 Packages [1743 kB]
Get:19 http://archive.ubuntu.com trusty/restricted amd64 Packages [16.0 kB]
Get:20 http://archive.ubuntu.com trusty/universe amd64 Packages [7589 kB]
Fetched 21.4 MB in 21s (1018 kB/s)
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/source/Sources Hash Sum mismatch
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/universe/source/Sources Hash Sum mismatch
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/binary-amd64/Packages Hash Sum mismatch
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/universe/binary-amd64/Packages Hash Sum mismatch
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-security/main/source/Sources Hash Sum mismatch
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-security/main/binary-amd64/Packages Hash Sum mismatch
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-security/universe/binary-amd64/Packages Hash Sum mismatch
E: Some index files failed to download. They have been ignored, or old ones used instead. |
Debian version erics-MacBook-Air:~ sam$ docker pull debian
Using default tag: latest
latest: Pulling from library/debian
523ef1d23f22: Pull complete
140f9bdfeb97: Pull complete
Digest: sha256:dec98bbc4e5753d94d1f1b65f1c2414bf890570439bb8356fe8776c6bb6bd83f
Status: Downloaded newer image for debian:latest
erics-MacBook-Air:~ sam$ docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
debian latest 140f9bdfeb97 8 days ago 125.1 MB
ubuntu latest af88597ec24b 11 days ago 187.9 MB
erics-MacBook-Air:~ sam$ docker run -t -i 140 /bin/bash
root@f9f06b8695a3:/# apt-get update
Get:1 http://security.debian.org jessie/updates InRelease [63.1 kB]
Get:2 http://security.debian.org jessie/updates/main amd64 Packages [232 kB]
Ign http://httpredir.debian.org jessie-updates InRelease
Ign http://httpredir.debian.org jessie InRelease
Get:3 http://httpredir.debian.org jessie-updates Release.gpg [1554 B]
Get:4 http://httpredir.debian.org jessie Release.gpg [2373 B]
Get:5 http://httpredir.debian.org jessie-updates Release [135 kB]
Get:6 http://httpredir.debian.org jessie Release [148 kB]
Get:7 http://httpredir.debian.org jessie/main amd64 Packages [9035 kB]
Get:8 http://httpredir.debian.org jessie-updates/main amd64 Packages [3619 B]
Fetched 9621 kB in 46s (209 kB/s)
W: Failed to fetch http://security.debian.org/dists/jessie/updates/main/binary-amd64/Packages Hash Sum mismatch
E: Some index files failed to download. They have been ignored, or old ones used instead. |
Yeah that looks like a misbehaving/out-of-sync mirror for $ docker pull ubuntu
Using default tag: latest
latest: Pulling from library/ubuntu
Digest: sha256:b53bb7b0d18842214ac7472c2a8801e8682c247d30f1ba4bab0083a2e2e091ea
$ docker run -it ubuntu:latest
root@d54ef266652f:/# apt-get update
Ign http://archive.ubuntu.com trusty InRelease
Get:1 http://archive.ubuntu.com trusty-updates InRelease [64.4 kB]
Get:2 http://archive.ubuntu.com trusty-security InRelease [64.4 kB]
Hit http://archive.ubuntu.com trusty Release.gpg
Hit http://archive.ubuntu.com trusty Release
Get:3 http://archive.ubuntu.com trusty-updates/main Sources [311 kB]
Get:4 http://archive.ubuntu.com trusty-updates/restricted Sources [5219 B]
Get:5 http://archive.ubuntu.com trusty-updates/universe Sources [185 kB]
Get:6 http://archive.ubuntu.com trusty-updates/main amd64 Packages [857 kB]
Get:7 http://archive.ubuntu.com trusty-updates/restricted amd64 Packages [23.4 kB]
Get:8 http://archive.ubuntu.com trusty-updates/universe amd64 Packages [434 kB]
Get:9 http://archive.ubuntu.com trusty-security/main Sources [129 kB]
Get:10 http://archive.ubuntu.com trusty-security/restricted Sources [3920 B]
Get:11 http://archive.ubuntu.com trusty-security/universe Sources [37.4 kB]
Get:12 http://archive.ubuntu.com trusty-security/main amd64 Packages [502 kB]
Get:13 http://archive.ubuntu.com trusty-security/restricted amd64 Packages [20.2 kB]
Get:14 http://archive.ubuntu.com trusty-security/universe amd64 Packages [159 kB]
Get:15 http://archive.ubuntu.com trusty/main Sources [1335 kB]
Get:16 http://archive.ubuntu.com trusty/restricted Sources [5335 B]
Get:17 http://archive.ubuntu.com trusty/universe Sources [7926 kB]
Get:18 http://archive.ubuntu.com trusty/main amd64 Packages [1743 kB]
Get:19 http://archive.ubuntu.com trusty/restricted amd64 Packages [16.0 kB]
Get:20 http://archive.ubuntu.com trusty/universe amd64 Packages [7589 kB]
Fetched 21.4 MB in 11s (1832 kB/s)
Reading package lists... Done
root@d54ef266652f:/# Random suggestion, try rebooting the docker VM ( |
confused. |
@yosifkit how can i fix this problem? |
Same issue here. None of the advice on this problem in older threads seems to fix this particular issue. |
I'm having a similar issue, and as far as I can tell, it's not a network or firewall issue.
Is there a way to tell |
Hmm, it might be dlite/xhyve? I'm able to |
As far as I can tell apt only fetches the
Sometimes rebooting the docker VM on OSX can solve networking issues, especially if OSX has gone to sleep or changed networks. |
I have same issue.
but when i use ubuntu:latest, it works. |
Hi @vaporize93, |
Seems to be an external issue to do with the networks, rather than a docker library. Closing this issue for now: if the issue persists for users and there's strong evidence that it's the province of docker library and the official images, we'll reopen. |
I faced the same error running docker for Mac. Possibly related with docker engine as suggested before. My fix was to restart docker engine and the image was built after the restart. |
any one please help guys stucked due to this [root@indretest-3 docker]# docker build -t utomcat:0.0.2 . Get:14 http://archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages [176 kB] |
@Erarunkumar, that seems to be just an out-of-date/misbehaving mirror or network config and usually resolves itself, if external, or may require a reboot of VM and/or host. |
fyi - same issue here - docker restart does not help. Like @junshoong I am in South Korea. no firewall. Using |
@yosifkit Scenario is I am running a virtual machine on my desktop and same VM is imported in VMware farm of DC, in virtual machine on my desktop, docker pull is working fine whereas the exactly same VM imported to VMware farm in DC docker pull stop working due to some Hash mismatch. |
root@a9607cb2a2a4:~# apt-get install libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
build-essential : Depends: libc6-dev but it is not going to be installed or
libc-dev
Depends: gcc (>= 4:4.4.3) but it is not going to be installed
g++ : Depends: cpp (>= 4:4.8.2-1ubuntu6) but it is not going to be installed
Depends: gcc (>= 4:4.8.2-1ubuntu6) but it is not going to be installed
Depends: g++-4.8 (>= 4.8.2-5~) but it is not going to be installed
Depends: gcc-4.8 (>= 4.8.2-5~) but it is not going to be installed
libcairo2-dev : Depends: libfontconfig1-dev (>= 2.2.95) but it is not going to be installed
Depends: libfreetype6-dev (>= 2.1.10) but it is not going to be installed
Depends: libpng-dev
Depends: libglib2.0-dev but it is not going to be installed
libjpeg8-dev : Depends: libjpeg-turbo8-dev (>= 1.1.90+svn722-1ubuntu6) but it is not going to be installed
libpango1.0-dev : Depends: libglib2.0-dev (>= 2.34.0) but it is not going to be installed
Depends: libfreetype6-dev but it is not going to be installed
Depends: libxft-dev but it is not going to be installed
Depends: libfontconfig1-dev (>= 2.10.91) but it is not going to be installed
Recommends: debhelper but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
The text was updated successfully, but these errors were encountered: