Impossible to apt install on Ubuntu's bash windows 10 version - windows

I installed Ubuntu's unix bash on Windows 10 (this : https://www.microsoft.com/fr-fr/p/ubuntu/9nblggh4msv6#activetab=pivot:overviewtab )
it installed well but I can't "apt install" (yes, on this version it's just "apt install")
After typing my pw I have this :
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
binutils binutils-common binutils-x86-64-linux-gnu cpp cpp-7 gcc-7 gcc-7-base libasan4 libatomic1 libbinutils
libc-dev-bin libc6-dev libcc1-0 libcilkrts5 libgcc-7-dev libgomp1 libisl19 libitm1 liblsan0 libmpc3 libmpx2
libquadmath0 libtsan0 libubsan0 linux-libc-dev manpages-dev
Suggested packages:
binutils-doc cpp-doc gcc-7-locales gcc-multilib make autoconf automake libtool flex bison gdb gcc-doc gcc-7-multilib
gcc-7-doc libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg libasan4-dbg liblsan0-dbg libtsan0-dbg libubsan0-dbg
libcilkrts5-dbg libmpx2-dbg libquadmath0-dbg glibc-doc
The following NEW packages will be installed:
binutils binutils-common binutils-x86-64-linux-gnu cpp cpp-7 gcc gcc-7 gcc-7-base libasan4 libatomic1 libbinutils
libc-dev-bin libc6-dev libcc1-0 libcilkrts5 libgcc-7-dev libgomp1 libisl19 libitm1 liblsan0 libmpc3 libmpx2
libquadmath0 libtsan0 libubsan0 linux-libc-dev manpages-dev
0 upgraded, 27 newly installed, 0 to remove and 0 not upgraded.
Need to get 26.9 MB of archives.
After this operation, 115 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Ign:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 binutils-common amd64 2.30-20ubuntu2~18.04
Ign:2 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libbinutils amd64 2.30-20ubuntu2~18.04
Err:1 http://security.ubuntu.com/ubuntu bionic-updates/main amd64 binutils-common amd64 2.30-20ubuntu2~18.04
Connection failed [IP: 91.189.88.152 80]
Ign:3 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 binutils-x86-64-linux-gnu amd64 2.30-20ubuntu2~18.04
Ign:4 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 binutils amd64 2.30-20ubuntu2~18.04
Err:2 http://security.ubuntu.com/ubuntu bionic-updates/main amd64 libbinutils amd64 2.30-20ubuntu2~18.04
Connection failed [IP: 91.189.91.23 80]
Err:5 http://archive.ubuntu.com/ubuntu bionic/main amd64 gcc-7-base amd64 7.3.0-16ubuntu3
Connection failed [IP: 91.189.88.161 80]
Err:6 http://archive.ubuntu.com/ubuntu bionic/main amd64 libisl19 amd64 0.19-1
Connection failed [IP: 91.189.88.152 80]
Err:3 http://security.ubuntu.com/ubuntu bionic-updates/main amd64 binutils-x86-64-linux-gnu amd64 2.30-20ubuntu2~18.04
Connection failed [IP: 91.189.88.149 80]
Err:4 http://security.ubuntu.com/ubuntu bionic-updates/main amd64 binutils amd64 2.30-20ubuntu2~18.04
Connection failed [IP: 91.189.88.162 80]
Err:7 http://archive.ubuntu.com/ubuntu bionic/main amd64 libmpc3 amd64 1.1.0-1
Connection failed [IP: 91.189.91.23 80]
Err:8 http://archive.ubuntu.com/ubuntu bionic/main amd64 cpp-7 amd64 7.3.0-16ubuntu3
Connection failed [IP: 91.189.88.149 80]
Err:9 http://archive.ubuntu.com/ubuntu bionic/main amd64 cpp amd64 4:7.3.0-3ubuntu2
Connection failed [IP: 91.189.88.162 80]
Err:10 http://archive.ubuntu.com/ubuntu bionic/main amd64 libcc1-0 amd64 8-20180414-1ubuntu2
Connection failed [IP: 91.189.88.161 80]
Err:11 http://archive.ubuntu.com/ubuntu bionic/main amd64 libgomp1 amd64 8-20180414-1ubuntu2
Connection failed [IP: 91.189.88.152 80]
Err:12 http://archive.ubuntu.com/ubuntu bionic/main amd64 libitm1 amd64 8-20180414-1ubuntu2
Connection failed [IP: 91.189.91.23 80]
(and then it continues until "Err:30")
then :
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
same when i try to update (and same for the fix missing option)
Do you have an idea of how to solve this ? I searched on google for hours without finding anything
tryed on different connections, with antivirus OFF etc, same.
thank you for your time !

I've seen this problem occur in the past with some computers that are using an IPv6 address. is your computer using one? Also There was a discussion a while back with this same error on another stackoverflow, I can't find the link to it now. In the end it was a corporate network issue blocking apt install. Check your firewall settings and also try to disable any third part anti virus/firewall you may be running. Refer to these links as well they should help.
https://github.com/Microsoft/WSL/issues/1720
https://www.reddit.com/r/bashonubuntuonwindows/comments/6h71ku/bash_aptget_wont_work/

Related

I can't able to installing CodeLite following their documentation

I am getting the following errors when i am trying to installing Codelite following documentations. How to solve this issues?
Get:1 http://packages.microsoft.com/repos/code stable InRelease [10.4 kB]
Err:2 http://bd.old-releases.ubuntu.com/ubuntu focal InRelease
Could not resolve 'bd.old-releases.ubuntu.com'
Err:3 http://bd.old-releases.ubuntu.com/ubuntu focal-updates InRelease
Could not resolve 'bd.old-releases.ubuntu.com'
Err:4 http://bd.old-releases.ubuntu.com/ubuntu focal-backports InRelease
Could not resolve 'bd.old-releases.ubuntu.com'
Get:5 http://packages.microsoft.com/repos/code stable/main amd64 Packages [86.2 kB]
Hit:6 https://packages.microsoft.com/repos/vscode stable InRelease
Hit:7 https://dl.google.com/linux/chrome/deb stable InRelease
Ign:8 http://old-releases.ubuntu.com/ubuntu focal-security InRelease
Err:9 http://old-releases.ubuntu.com/ubuntu focal-security Release
404 Not Found [IP: 91.189.91.124 80]
Hit:10 https://repos.codelite.org/ubuntu jammy InRelease
Ign:11 https://repos.codelite.org/ubuntu ubuntu InRelease
Hit:12 https://repos.codelite.org/ubuntu focal InRelease
Err:13 https://repos.codelite.org/ubuntu ubuntu Release
404 Not Found [IP: 79.143.189.67 443]
Hit:14 https://download.sublimetext.com apt/stable/ InRelease
Ign:15 http://ppa.launchpad.net/damien-moore/codeblocks-stable/ubuntu focal InRelease
Hit:16 http://ppa.launchpad.net/yannubuntu/boot-repair/ubuntu focal InRelease
Err:17 http://ppa.launchpad.net/damien-moore/codeblocks-stable/ubuntu focal Release
404 Not Found [IP: 185.125.190.52 80]
Reading package lists... Done
E: The repository 'http://old-releases.ubuntu.com/ubuntu focal-security Release' does
not have a Release file.

heroku-buildpack-apt; Unable to locate package

I am using the buildpack located at https://github.com/heroku/heroku-buildpack-apt.git to install required packages using the Aptfile. Everything worked fine for a while, but now every package gives an "Unable to locate package" error. This is with the exact same files on the exact same heroku stack. Did the buildpack for using Aptfile deprecate or is there a workaround?
Full build log:
-----> Using buildpacks:
1. https://github.com/heroku/heroku-buildpack-apt.git
2. heroku/python
3. https://github.com/heroku/heroku-buildpack-python.git
4. https://github.com/matt-bertoncello/python-pyodbc-buildpack.git
-----> Apt app detected
-----> Detected Aptfile or Stack changes, flushing cache
-----> Updating apt caches
Get:1 http://archive.ubuntu.com/ubuntu focal InRelease [265 kB]
Get:2 http://apt.postgresql.org/pub/repos/apt focal-pgdg InRelease [81.6 kB]
Get:3 http://archive.ubuntu.com/ubuntu focal-security InRelease [109 kB]
Get:4 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:5 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages [1,275 kB]
Get:6 http://apt.postgresql.org/pub/repos/apt focal-pgdg/main amd64 Packages [311 kB]
Get:7 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages [11.3 MB]
Get:8 http://archive.ubuntu.com/ubuntu focal-security/main amd64 Packages [786 kB]
Get:9 http://archive.ubuntu.com/ubuntu focal-security/universe amd64 Packages [699 kB]
Get:10 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1,203 kB]
Get:11 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [965 kB]
Fetched 17.2 MB in 2s (7,544 kB/s)
Reading package lists...
-----> Fetching .debs for unixodbc
Reading package lists...
Building dependency tree...
E: Unable to locate package unixodbc
! Push rejected, failed to compile Apt app.
! Push failed```

Can't install libgl1-mesa-dri 32bit

When I run the command sudo apt install libgl1-mesa-dri I get this:
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:
libgl1-mesa-dri:i386 : Depends: libc6:i386 (>= 2.27) but it is not going to be installed
Depends: libdrm-amdgpu1:i386 (>= 2.4.99+git1907300630.6652cf~oibaf~b) but it is not going to be installed
Depends: libdrm-intel1:i386 (>= 2.4.38) but it is not going to be installed
Depends: libdrm-nouveau2:i386 (>= 2.4.66) but it is not going to be installed
Depends: libdrm-radeon1:i386 (>= 2.4.31) but it is not going to be installed
Depends: libdrm2:i386 (>= 2.4.75) but it is not going to be installed
Depends: libelf1:i386 (>= 0.142) but it is not going to be installed
Depends: libexpat1:i386 (>= 2.0.1) but it is not going to be installed
Depends: libgcc1:i386 (>= 1:4.2) but it is not going to be installed
Depends: libglapi-mesa:i386 but it is not going to be installed
Depends: libllvm8:i386 (>= 1:8~svn298832-1~) but it is not going to be installed
Depends: libsensors4:i386 (>= 1:3.0.0) but it is not going to be installed
Depends: libstdc++6:i386 (>= 5.2) but it is not going to be installed
Depends: zlib1g:i386 (>= 1:1.1.4) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
And sudo aptitude install libgl1-mesa-dri:i386 did this...
gcc-4.7-base:i386{a} libbsd0:i386{ab} libc6:i386{ab} libdrm-amdgpu1:i386{ab} libdrm-intel1:i386{a} libdrm-nouveau2:i386{ab}
libdrm-radeon1:i386{ab} libdrm2:i386{ab} libedit2:i386{ab} libelf1:i386{ab} libexpat1:i386{ab} libffi6:i386{ab}
libgcc1:i386{ab} libgl1-mesa-dri:i386{b} libglapi-mesa:i386{ab} libllvm8:i386{ab} libpciaccess0:i386{ab}
libsensors4:i386{ab} libtinfo5:i386{ab} zlib1g:i386{ab}
0 packages upgraded, 20 newly installed, 0 to remove and 0 not upgraded.
Need to get 27.0 MB of archives. After unpacking 283 MB will be used.
The following packages have unmet dependencies:
libdrm-nouveau2 : Breaks: libdrm-nouveau2:i386 (!= 2.4.97-1ubuntu1~18.04.1) but 2.4.99+git1907300630.6652cf~oibaf~b is to be installed
libdrm-nouveau2:i386 : Breaks: libdrm-nouveau2 (!= 2.4.99+git1907300630.6652cf~oibaf~b) but 2.4.97-1ubuntu1~18.04.1 is installed
libllvm8:i386 : Depends: libatomic1:i386 (>= 4.8) which is a virtual package and is not provided by any available package
Depends: libstdc++6:i386 (>= 6) but it is not going to be installed
Depends: libtinfo5:i386 (>= 6) but 5.9-10ubuntu4 is to be installed
Breaks: libllvm8 (!= 1:8.0.1~+rc3-1ubuntu1~oibaf~b) but 1:8-3~ubuntu18.04.1 is installed
libllvm8 : Breaks: libllvm8:i386 (!= 1:8-3~ubuntu18.04.1) but 1:8.0.1~+rc3-1ubuntu1~oibaf~b is to be installed
libpciaccess0 : Breaks: libpciaccess0:i386 (!= 0.14-1) but 0.13.1-2 is to be installed
libpciaccess0:i386 : Breaks: libpciaccess0 (!= 0.13.1-2) but 0.14-1 is installed
libglapi-mesa : Breaks: libglapi-mesa:i386 (!= 19.0.2-1ubuntu1.1~18.04.2) but 19.2~git1908020730.54fbc6~oibaf~b is to be installed
libglapi-mesa:i386 : Breaks: libglapi-mesa (!= 19.2~git1908020730.54fbc6~oibaf~b) but 19.0.2-1ubuntu1.1~18.04.2 is installed
libelf1 : Breaks: libelf1:i386 (!= 0.170-0.4ubuntu0.1) but 0.153-2ubuntu1 is to be installed
libelf1:i386 : Breaks: libelf1 (!= 0.153-2ubuntu1) but 0.170-0.4ubuntu0.1 is installed
libbsd0 : Breaks: libbsd0:i386 (!= 0.8.7-1) but 0.4.2-1ubuntu1 is to be installed
libbsd0:i386 : Breaks: libbsd0 (!= 0.4.2-1ubuntu1) but 0.8.7-1 is installed
zlib1g : Breaks: zlib1g:i386 (!= 1:1.2.11.dfsg-0ubuntu2) but 1:1.2.7.dfsg-13ubuntu2 is to be installed
zlib1g:i386 : Breaks: zlib1g (!= 1:1.2.7.dfsg-13ubuntu2) but 1:1.2.11.dfsg-0ubuntu2 is installed
libc6 : Breaks: libc6:i386 (!= 2.27-3ubuntu1) but 2.17-0ubuntu5 is to be installed
libc6:i386 : Breaks: libc6 (!= 2.17-0ubuntu5) but 2.27-3ubuntu1 is installed
libexpat1 : Breaks: libexpat1:i386 (!= 2.2.5-3ubuntu0.1) but 2.1.0-2 is to be installed
libexpat1:i386 : Breaks: libexpat1 (!= 2.1.0-2) but 2.2.5-3ubuntu0.1 is installed
libgcc1 : Breaks: libgcc1:i386 (!= 1:8.3.0-6ubuntu1~18.04.1) but 1:4.7.3-1ubuntu1 is to be installed
libgcc1:i386 : Breaks: libgcc1 (!= 1:4.7.3-1ubuntu1) but 1:8.3.0-6ubuntu1~18.04.1 is installed
libdrm-amdgpu1:i386 : Breaks: libdrm-amdgpu1 (!= 2.4.99+git1907300630.6652cf~oibaf~b) but 2.4.97-1ubuntu1~18.04.1 is installed
libdrm-amdgpu1 : Breaks: libdrm-amdgpu1:i386 (!= 2.4.97-1ubuntu1~18.04.1) but 2.4.99+git1907300630.6652cf~oibaf~b is to be installed
libtinfo5 : Breaks: libtinfo5:i386 (!= 6.1-1ubuntu1.18.04) but 5.9-10ubuntu4 is to be installed
libtinfo5:i386 : Breaks: libtinfo5 (!= 5.9-10ubuntu4) but 6.1-1ubuntu1.18.04 is installed
libdrm2 : Breaks: libdrm2:i386 (!= 2.4.97-1ubuntu1~18.04.1) but 2.4.99+git1907300630.6652cf~oibaf~b is to be installed
libdrm2:i386 : Breaks: libdrm2 (!= 2.4.99+git1907300630.6652cf~oibaf~b) but 2.4.97-1ubuntu1~18.04.1 is installed
libgl1-mesa-dri : Breaks: libgl1-mesa-dri:i386 (!= 19.0.2-1ubuntu1.1~18.04.2) but 19.2~git1908020730.54fbc6~oibaf~b is to be installed
libgl1-mesa-dri:i386 : Depends: libc6:i386 (>= 2.27) but 2.17-0ubuntu5 is to be installed
Depends: libstdc++6:i386 (>= 5.2) but it is not going to be installed
Breaks: libgl1-mesa-dri (!= 19.2~git1908020730.54fbc6~oibaf~b) but 19.0.2-1ubuntu1.1~18.04.2 is installed
libedit2 : Breaks: libedit2:i386 (!= 3.1-20170329-1) but 2.11-20080614-5ubuntu1 is to be installed
libedit2:i386 : Breaks: libedit2 (!= 2.11-20080614-5ubuntu1) but 3.1-20170329-1 is installed
libffi6 : Breaks: libffi6:i386 (!= 3.2.1-8) but 3.0.13-2ubuntu1 is to be installed
libffi6:i386 : Breaks: libffi6 (!= 3.0.13-2ubuntu1) but 3.2.1-8 is installed
libdrm-radeon1 : Breaks: libdrm-radeon1:i386 (!= 2.4.97-1ubuntu1~18.04.1) but 2.4.99+git1907300630.6652cf~oibaf~b is to be installed
libdrm-radeon1:i386 : Breaks: libdrm-radeon1 (!= 2.4.99+git1907300630.6652cf~oibaf~b) but 2.4.97-1ubuntu1~18.04.1 is installed
libsensors4 : Breaks: libsensors4:i386 (!= 1:3.4.0-4) but 1:3.3.2-2ubuntu1 is to be installed
libsensors4:i386 : Breaks: libsensors4 (!= 1:3.3.2-2ubuntu1) but 1:3.4.0-4 is installed```
Ok, so I made a clean new installation, did dpkg add-architecture i386 and when I run apt update I get this:
Hit:1 http://repo.steampowered.com/steam precise InRelease
Hit:2 http://ports.ubuntu.com/ubuntu-ports bionic InRelease
Get:3 http://ports.ubuntu.com/ubuntu-ports bionic-security InRelease
[88.7 kB]
Get:4 http://ports.ubuntu.com/ubuntu-ports bionic-updates InRelease
[88.7 kB]
Get:5 http://ports.ubuntu.com/ubuntu-ports bionic-backports InRelease
[74.6 kB]
Ign:6 http://ports.ubuntu.com/ubuntu-ports bionic/main i386 Packages
Ign:7 http://ports.ubuntu.com/ubuntu-ports bionic/multiverse i386
Packages
Ign:8 http://ports.ubuntu.com/ubuntu-ports bionic/universe i386
Packages
Ign:9 http://ports.ubuntu.com/ubuntu-ports bionic/restricted i386
Packages
Ign:6 http://ports.ubuntu.com/ubuntu-ports bionic/main i386 Packages
Ign:7 http://ports.ubuntu.com/ubuntu-ports bionic/multiverse i386
Packages
Ign:8 http://ports.ubuntu.com/ubuntu-ports bionic/universe i386
Packages
Ign:9 http://ports.ubuntu.com/ubuntu-ports bionic/restricted i386
Packages
Ign:6 http://ports.ubuntu.com/ubuntu-ports bionic/main i386 Packages
Ign:7 http://ports.ubuntu.com/ubuntu-ports bionic/multiverse i386
Packages
Ign:8 http://ports.ubuntu.com/ubuntu-ports bionic/universe i386
Packages
Ign:9 http://ports.ubuntu.com/ubuntu-ports bionic/restricted i386 Packages
Err:6 http://ports.ubuntu.com/ubuntu-ports bionic/main i386 Packages
404 Not Found [IP: 91.189.88.150 80]
Ign:7 http://ports.ubuntu.com/ubuntu-ports bionic/multiverse i386 Packages
Ign:8 http://ports.ubuntu.com/ubuntu-ports bionic/universe i386 Packages
Ign:9 http://ports.ubuntu.com/ubuntu-ports bionic/restricted i386 Packages
Ign:10 http://ports.ubuntu.com/ubuntu-ports bionic-security/main i386 Packages
Ign:11 http://ports.ubuntu.com/ubuntu-ports bionic-security/universe i386 Packages
Ign:12 http://ports.ubuntu.com/ubuntu-ports bionic-security/multiverse i386 Packages
Ign:13 http://ports.ubuntu.com/ubuntu-ports bionic-security/restricted i386 Packages
Ign:10 http://ports.ubuntu.com/ubuntu-ports bionic-security/main i386 Packages
Ign:11 http://ports.ubuntu.com/ubuntu-ports bionic-security/universe i386 Packages
Ign:12 http://ports.ubuntu.com/ubuntu-ports bionic-security/multiverse i386 Packages
Ign:13 http://ports.ubuntu.com/ubuntu-ports bionic-security/restricted i386 Packages
Ign:10 http://ports.ubuntu.com/ubuntu-ports bionic-security/main i386 Packages
Ign:11 http://ports.ubuntu.com/ubuntu-ports bionic-security/universe i386 Packages
Ign:12 http://ports.ubuntu.com/ubuntu-ports bionic-security/multiverse i386 Packages
Ign:13 http://ports.ubuntu.com/ubuntu-ports bionic-security/restricted i386 Packages
Err:10 http://ports.ubuntu.com/ubuntu-ports bionic-security/main i386 Packages
404 Not Found [IP: 91.189.88.150 80]
Ign:11 http://ports.ubuntu.com/ubuntu-ports bionic-security/universe i386 Packages
Ign:12 http://ports.ubuntu.com/ubuntu-ports bionic-security/multiverse i386 Packages
Ign:13 http://ports.ubuntu.com/ubuntu-ports bionic-security/restricted i386 Packages
Ign:14 http://ports.ubuntu.com/ubuntu-ports bionic-updates/multiverse i386 Packages
Get:15 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main armhf Packages [674 kB]
Ign:16 http://ports.ubuntu.com/ubuntu-ports bionic-updates/restricted i386 Packages
Ign:17 http://ports.ubuntu.com/ubuntu-ports bionic-updates/universe i386 Packages
Ign:18 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main i386 Packages
Ign:14 http://ports.ubuntu.com/ubuntu-ports bionic-updates/multiverse i386 Packages
Ign:16 http://ports.ubuntu.com/ubuntu-ports bionic-updates/restricted i386 Packages
Ign:17 http://ports.ubuntu.com/ubuntu-ports bionic-updates/universe i386 Packages
Ign:18 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main i386 Packages
Ign:14 http://ports.ubuntu.com/ubuntu-ports bionic-updates/multiverse i386 Packages
Ign:16 http://ports.ubuntu.com/ubuntu-ports bionic-updates/restricted i386 Packages
Ign:17 http://ports.ubuntu.com/ubuntu-ports bionic-updates/universe i386 Packages
Ign:18 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main i386 Packages
Err:14 http://ports.ubuntu.com/ubuntu-ports bionic-updates/multiverse i386 Packages
404 Not Found [IP: 91.189.88.150 80]
Ign:16 http://ports.ubuntu.com/ubuntu-ports bionic-updates/restricted i386 Packages
Ign:17 http://ports.ubuntu.com/ubuntu-ports bionic-updates/universe i386 Packages
Ign:18 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main i386 Packages
Ign:19 http://ports.ubuntu.com/ubuntu-ports bionic-backports/main i386 Packages
Ign:20 http://ports.ubuntu.com/ubuntu-ports bionic-backports/universe i386 Packages
Ign:19 http://ports.ubuntu.com/ubuntu-ports bionic-backports/main i386 Packages
Ign:20 http://ports.ubuntu.com/ubuntu-ports bionic-backports/universe i386 Packages
Ign:19 http://ports.ubuntu.com/ubuntu-ports bionic-backports/main i386 Packages
Ign:20 http://ports.ubuntu.com/ubuntu-ports bionic-backports/universe i386 Packages
Err:19 http://ports.ubuntu.com/ubuntu-ports bionic-backports/main i386 Packages
404 Not Found [IP: 91.189.88.150 80]
Ign:20 http://ports.ubuntu.com/ubuntu-ports bionic-backports/universe i386 Packages
Fetched 252 kB in 15s (16.7 kB/s)
Reading package lists... Done
E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/bionic/main/binary-i386/Packages 404 Not Found [IP: 91.189.88.150 80]
E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/bionic-security/main/binary-i386/Packages 404 Not Found [IP: 91.189.88.150 80]
E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/bionic-updates/multiverse/binary-i386/Packages 404 Not Found [IP: 91.189.88.150 80]
E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/bionic-backports/main/binary-i386/Packages 404 Not Found [IP: 91.189.88.150 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.

Docker build of Ubuntu 16.04 image fails - Connection failed, returned a non-zero code: 100

System details:
macOS High Sierra
IPv6 disabled
Personal network (No corporate network, firewall, proxy etc.)
Following is the Dockerfile:
FROM ubuntu:16.04
RUN apt-get update && \
apt-get install -y \
python3 python3-numpy firefox jq git-core curl python3-nose python3-pandas \
python3-pip python-wheel vim && \
pip3 install --upgrade setuptools
<Rest of the Dockerfile>
On running the command docker build -t ubuntu-docker . I am getting following output:
<< Long trace of output>>
<<....>>
Connection failed [IP: 91.189.88.152 80]
Get:348 http://archive.ubuntu.com/ubuntu xenial/main amd64 libsnappy1v5 amd64 1.1.3-2 [16.0 kB]
Get:349 http://archive.ubuntu.com/ubuntu xenial/universe amd64 python3-tables-lib amd64 3.2.2-2 [353 kB]
Get:350 http://archive.ubuntu.com/ubuntu xenial/universe amd64 python3-tables all 3.2.2-2 [325 kB]
Get:351 http://archive.ubuntu.com/ubuntu xenial/main amd64 python3-tk amd64 3.5.1-1 [25.1 kB]
Get:352 http://archive.ubuntu.com/ubuntu xenial/universe amd64 python3-wheel all 0.29.0-1 [48.1 kB]
Get:353 http://archive.ubuntu.com/ubuntu xenial/main amd64 rename all 0.20-4 [12.0 kB]
Get:354 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 vim-runtime all 2:7.4.1689-3ubuntu1.2 [5164 kB]
Get:355 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 vim amd64 2:7.4.1689-3ubuntu1.2 [1036 kB]
Get:356 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 xul-ext-ubufox all 3.4-0ubuntu0.16.04.2 [3302 B]
Get:357 http://archive.ubuntu.com/ubuntu xenial/universe amd64 python3-scipy amd64 0.17.0-1 [8327 kB]
Fetched 236 MB in 5min 36s (700 kB/s)
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/n/netbase/netbase_5.3_all.deb Connection failed [IP: 91.189.88.161 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/libe/libedit/libedit2_3.1-20150325-1ubuntu2_amd64.deb Connection failed [IP: 91.189.88.152 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/g/gtk+3.0/libgtk-3-common_3.18.9-1ubuntu3.3_all.deb Connection failed [IP: 91.189.88.161 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/libx/libxcb/libxcb-sync1_1.11.1-1ubuntu1_amd64.deb Connection failed [IP: 91.189.88.152 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/m/mesa/libgl1-mesa-dri_18.0.5-0ubuntu0~16.04.1_amd64.deb Connection failed [IP: 91.189.88.161 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/m/mesa/libwayland-egl1-mesa_18.0.5-0ubuntu0~16.04.1_amd64.deb Connection failed [IP: 91.189.88.149 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/libx/libxrandr/libxrandr2_1.5.0-1_amd64.deb Connection failed [IP: 91.189.88.162 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/d/dpkg/dpkg-dev_1.18.4ubuntu1.4_all.deb Connection failed [IP: 91.189.88.149 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/libg/libgphoto2/libgphoto2-port12_2.5.9-3_amd64.deb Connection failed [IP: 91.189.88.152 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/f/fakeroot/libfakeroot_1.20.2-1ubuntu1_amd64.deb Connection failed [IP: 91.189.88.161 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/universe/p/python-decorator/python3-decorator_4.0.6-1_all.deb Connection failed [IP: 91.189.88.152 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/p/python-setuptools/python3-setuptools_20.7.0-1_all.deb Connection failed [IP: 91.189.88.152 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
The command '/bin/sh -c apt-get update && apt-get install -y python3 python3-numpy firefox jq git-core curl python3-nose python3-pandas python3-pip python-wheel vim && pip3 install --upgrade setuptools' returned a non-zero code: 100
I have tried this command multiple times each after few minutes of interval. I am getting the same error after trying the build with --no-cache option.
Not sure if the non-zero code: 100 is a result of the connection failed [IP:..] error or it has some other reason altogether. This solution didn't help either. Any pointers?
Just add this
RUN sed -i'' 's/archive\.ubuntu\.com/us\.archive\.ubuntu\.com/' /etc/apt/sources.list

apt-get install build-essential not working on vagrant through provision

I have the following in my Vagrantfile. It install vim, but it does not install nodejs, git etc. How to change it so that it run apt-get install build-essential git-core python-software-properties nodejs? Or should I do this with puppet file?
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu32"
config.vm.provision :shell, path: './provision.sh'
config.vm.network "public_network"
end
provision.sh
apt-get update
apt-get install build-essential git-core python-software-properties nodejs
apt-get install vim -y
====
UPDATE: This is the outputs of vagrant up.
vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Importing base box 'ubuntu32'...
[default] Matching MAC address for NAT networking...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Available bridged network interfaces:
1) en1: Wi-Fi (AirPort)
2) en0: Ethernet
3) p2p0
What interface should the network bridge to? 1
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] Booting VM...
[default] Waiting for machine to boot. This may take a few minutes...
[default] Machine booted and ready!
[default] The guest additions on this VM do not match the installed version of
VirtualBox! In most cases this is fine, but in rare cases it can
cause things such as shared folders to not work properly. If you see
shared folder errors, please update the guest additions within the
virtual machine and reload your VM.
Guest Additions Version: 4.2.0
VirtualBox Version: 4.3
[default] Configuring and enabling network interfaces...
[default] Mounting shared folders...
[default] -- /vagrant
[default] Running provisioner: shell...
[default] Running: /var/folders/y0/dzf6yf9n5r1bsl3p94lmv2fr0000gp/T/vagrant-shell20131108-47487-13ypot
stdin: is not a tty
Ign http://security.ubuntu.com precise-security InRelease
Get:1 http://security.ubuntu.com precise-security Release.gpg [198 B]
Get:2 http://security.ubuntu.com precise-security Release [49.6 kB]
Get:3 http://security.ubuntu.com precise-security/main Sources [92.5 kB]
Get:4 http://security.ubuntu.com precise-security/restricted Sources [2,494 B]
Get:5 http://security.ubuntu.com precise-security/universe Sources [29.6 kB]
Ign http://us.archive.ubuntu.com precise InRelease
Get:6 http://security.ubuntu.com precise-security/multiverse Sources [1,804 B]
Ign http://us.archive.ubuntu.com precise-updates InRelease
Ign http://us.archive.ubuntu.com precise-backports InRelease
Get:7 http://us.archive.ubuntu.com precise Release.gpg [198 B]
Get:8 http://us.archive.ubuntu.com precise-updates Release.gpg [198 B]
Get:9 http://us.archive.ubuntu.com precise-backports Release.gpg [198 B]
Get:10 http://security.ubuntu.com precise-security/main i386 Packages [354 kB]
Get:11 http://us.archive.ubuntu.com precise Release [49.6 kB]
Get:12 http://security.ubuntu.com precise-security/restricted i386 Packages [4,620 B]
Get:13 http://us.archive.ubuntu.com precise-updates Release [49.6 kB]
Get:14 http://security.ubuntu.com precise-security/universe i386 Packages [88.4 kB]
Get:15 http://security.ubuntu.com precise-security/multiverse i386 Packages [2,640 B]
Get:16 http://us.archive.ubuntu.com precise-backports Release [49.6 kB]
Get:17 http://security.ubuntu.com precise-security/main TranslationIndex [74 B]
Get:18 http://security.ubuntu.com precise-security/multiverse TranslationIndex [72 B]
Get:19 http://security.ubuntu.com precise-security/restricted TranslationIndex [72 B]
Get:20 http://security.ubuntu.com precise-security/universe TranslationIndex [73 B]
Get:21 http://us.archive.ubuntu.com precise/main Sources [934 kB]
Get:22 http://security.ubuntu.com precise-security/main Translation-en [159 kB]
Get:23 http://security.ubuntu.com precise-security/multiverse Translation-en [1,299 B]
Get:24 http://security.ubuntu.com precise-security/restricted Translation-en [1,253 B]
Get:25 http://security.ubuntu.com precise-security/universe Translation-en [53.8 kB]
Get:26 http://us.archive.ubuntu.com precise/restricted Sources [5,470 B]
Get:27 http://us.archive.ubuntu.com precise/universe Sources [5,019 kB]
Get:28 http://us.archive.ubuntu.com precise/multiverse Sources [155 kB]
Get:29 http://us.archive.ubuntu.com precise/main i386 Packages [1,274 kB]
Get:30 http://us.archive.ubuntu.com precise/restricted i386 Packages [8,431 B]
Get:31 http://us.archive.ubuntu.com precise/universe i386 Packages [4,796 kB]
Get:32 http://us.archive.ubuntu.com precise/multiverse i386 Packages [121 kB]
Get:33 http://us.archive.ubuntu.com precise/main TranslationIndex [3,706 B]
Get:34 http://us.archive.ubuntu.com precise/multiverse TranslationIndex [2,676 B]
Get:35 http://us.archive.ubuntu.com precise/restricted TranslationIndex [2,596 B]
Get:36 http://us.archive.ubuntu.com precise/universe TranslationIndex [2,922 B]
Get:37 http://us.archive.ubuntu.com precise-updates/main Sources [424 kB]
Get:38 http://us.archive.ubuntu.com precise-updates/restricted Sources [7,006 B]
Get:39 http://us.archive.ubuntu.com precise-updates/universe Sources [99.2 kB]
Get:40 http://us.archive.ubuntu.com precise-updates/multiverse Sources [8,354 B]
Get:41 http://us.archive.ubuntu.com precise-updates/main i386 Packages [723 kB]
Get:42 http://us.archive.ubuntu.com precise-updates/restricted i386 Packages [11.4 kB]
Get:43 http://us.archive.ubuntu.com precise-updates/universe i386 Packages [225 kB]
Get:44 http://us.archive.ubuntu.com precise-updates/multiverse i386 Packages [14.2 kB]
Get:45 http://us.archive.ubuntu.com precise-updates/main TranslationIndex [3,564 B]
Get:46 http://us.archive.ubuntu.com precise-updates/multiverse TranslationIndex [2,605 B]
Get:47 http://us.archive.ubuntu.com precise-updates/restricted TranslationIndex [2,461 B]
Get:48 http://us.archive.ubuntu.com precise-updates/universe TranslationIndex [2,850 B]
Get:49 http://us.archive.ubuntu.com precise-backports/main Sources [4,233 B]
Get:50 http://us.archive.ubuntu.com precise-backports/restricted Sources [14 B]
Get:51 http://us.archive.ubuntu.com precise-backports/universe Sources [36.1 kB]
Get:52 http://us.archive.ubuntu.com precise-backports/multiverse Sources [5,311 B]
Get:53 http://us.archive.ubuntu.com precise-backports/main i386 Packages [2,838 B]
Get:54 http://us.archive.ubuntu.com precise-backports/restricted i386 Packages [14 B]
Get:55 http://us.archive.ubuntu.com precise-backports/universe i386 Packages [36.7 kB]
Get:56 http://us.archive.ubuntu.com precise-backports/multiverse i386 Packages [5,178 B]
Get:57 http://us.archive.ubuntu.com precise-backports/main TranslationIndex [72 B]
Get:58 http://us.archive.ubuntu.com precise-backports/multiverse TranslationIndex [72 B]
Get:59 http://us.archive.ubuntu.com precise-backports/restricted TranslationIndex [70 B]
Get:60 http://us.archive.ubuntu.com precise-backports/universe TranslationIndex [73 B]
Get:61 http://us.archive.ubuntu.com precise/main Translation-en [726 kB]
Get:62 http://us.archive.ubuntu.com precise/multiverse Translation-en [93.4 kB]
Get:63 http://us.archive.ubuntu.com precise/restricted Translation-en [2,395 B]
Get:64 http://us.archive.ubuntu.com precise/universe Translation-en [3,341 kB]
Get:65 http://us.archive.ubuntu.com precise-updates/main Translation-en [317 kB]
Get:66 http://us.archive.ubuntu.com precise-updates/multiverse Translation-en [8,136 B]
Get:67 http://us.archive.ubuntu.com precise-updates/restricted Translation-en [2,637 B]
Get:68 http://us.archive.ubuntu.com precise-updates/universe Translation-en [129 kB]
Get:69 http://us.archive.ubuntu.com precise-backports/main Translation-en [2,072 B]
Get:70 http://us.archive.ubuntu.com precise-backports/multiverse Translation-en [4,610 B]
Get:71 http://us.archive.ubuntu.com precise-backports/restricted Translation-en [14 B]
Get:72 http://us.archive.ubuntu.com precise-backports/universe Translation-en [26.9 kB]
Fetched 19.6 MB in 1min 21s (242 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
dpkg-dev fakeroot g++ g++-4.6 git git-man libalgorithm-diff-perl
libalgorithm-diff-xs-perl libalgorithm-merge-perl libc-ares2 libdpkg-perl
liberror-perl libev4 libicu48 libstdc++6-4.6-dev libv8-3.7.12.22 make patch
python-pycurl unattended-upgrades
Suggested packages:
debian-keyring g++-multilib g++-4.6-multilib gcc-4.6-doc libstdc++6-4.6-dbg
git-daemon-run git-daemon-sysvinit git-doc git-el git-arch git-cvs git-svn
git-email git-gui gitk gitweb libstdc++6-4.6-doc make-doc diffutils-doc
libcurl4-gnutls-dev python-pycurl-dbg bsd-mailx
The following NEW packages will be installed:
build-essential dpkg-dev fakeroot g++ g++-4.6 git git-core git-man
libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl
libc-ares2 libdpkg-perl liberror-perl libev4 libicu48 libstdc++6-4.6-dev
libv8-3.7.12.22 make nodejs patch python-pycurl python-software-properties
unattended-upgrades
0 upgraded, 24 newly installed, 0 to remove and 155 not upgraded.
Need to get 26.5 MB of archives.
After this operation, 72.3 MB of additional disk space will be used.
Do you want to continue [Y/n]? Abort.
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
libgpm2 libpython2.7 python2.7 python2.7-minimal vim-common vim-runtime
vim-tiny
Suggested packages:
gpm python2.7-doc binfmt-support ctags vim-doc vim-scripts indent
The following NEW packages will be installed:
libgpm2 libpython2.7 vim vim-runtime
The following packages will be upgraded:
python2.7 python2.7-minimal vim-common vim-tiny
4 upgraded, 4 newly installed, 0 to remove and 151 not upgraded.
Need to get 13.2 MB of archives.
After this operation, 27.8 MB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ precise/main libgpm2 i386 1.20.4-4 [16.9 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main python2.7 i386 2.7.3-0ubuntu3.4 [2,647 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main python2.7-minimal i386 2.7.3-0ubuntu3.4 [1,690 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main vim-tiny i386 2:7.3.429-2ubuntu2.1 [380 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main vim-common i386 2:7.3.429-2ubuntu2.1 [85.8 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main libpython2.7 i386 2.7.3-0ubuntu3.4 [1,148 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main vim-runtime all 2:7.3.429-2ubuntu2.1 [6,277 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main vim i386 2:7.3.429-2ubuntu2.1 [979 kB]
dpkg-preconfigure: unable to re-open stdin: No such file or directory
Fetched 13.2 MB in 49s (270 kB/s)
Selecting previously unselected package libgpm2.
(Reading database ... 29361 files and directories currently installed.)
Unpacking libgpm2 (from .../libgpm2_1.20.4-4_i386.deb) ...
Preparing to replace python2.7 2.7.3-0ubuntu3 (using .../python2.7_2.7.3-0ubuntu3.4_i386.deb) ...
Unpacking replacement python2.7 ...
Preparing to replace python2.7-minimal 2.7.3-0ubuntu3 (using .../python2.7-minimal_2.7.3-0ubuntu3.4_i386.deb) ...
Unpacking replacement python2.7-minimal ...
Processing triggers for man-db ...
Setting up python2.7-minimal (2.7.3-0ubuntu3.4) ...
(Reading database ... 29364 files and directories currently installed.)
Preparing to replace vim-tiny 2:7.3.429-2ubuntu2 (using .../vim-tiny_2%3a7.3.429-2ubuntu2.1_i386.deb) ...
Unpacking replacement vim-tiny ...
Preparing to replace vim-common 2:7.3.429-2ubuntu2 (using .../vim-common_2%3a7.3.429-2ubuntu2.1_i386.deb) ...
Unpacking replacement vim-common ...
Selecting previously unselected package libpython2.7.
Unpacking libpython2.7 (from .../libpython2.7_2.7.3-0ubuntu3.4_i386.deb) ...
Selecting previously unselected package vim-runtime.
Unpacking vim-runtime (from .../vim-runtime_2%3a7.3.429-2ubuntu2.1_all.deb) ...
Adding 'diversion of /usr/share/vim/vim73/doc/help.txt to /usr/share/vim/vim73/doc/help.txt.vim-tiny by vim-runtime'
Adding 'diversion of /usr/share/vim/vim73/doc/tags to /usr/share/vim/vim73/doc/tags.vim-tiny by vim-runtime'
Selecting previously unselected package vim.
Unpacking vim (from .../vim_2%3a7.3.429-2ubuntu2.1_i386.deb) ...
Processing triggers for man-db ...
Setting up libgpm2 (1.20.4-4) ...
Setting up python2.7 (2.7.3-0ubuntu3.4) ...
Setting up vim-common (2:7.3.429-2ubuntu2.1) ...
Setting up vim-tiny (2:7.3.429-2ubuntu2.1) ...
Setting up libpython2.7 (2.7.3-0ubuntu3.4) ...
Setting up vim-runtime (2:7.3.429-2ubuntu2.1) ...
Processing /usr/share/vim/addons/doc
Setting up vim (2:7.3.429-2ubuntu2.1) ...
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vim (vim) in auto mode.
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vimdiff (vimdiff) in auto mode.
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rvim (rvim) in auto mode.
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rview (rview) in auto mode.
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vi (vi) in auto mode.
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/view (view) in auto mode.
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/ex (ex) in auto mode.
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
I am running Vagrant 1.3.5 and VirtualBox 4.3.2 r90405 on Mac OSX Mavericks. I downgrade VirtualBox to 4.2.18 (I will change to 4.2.0) and installed vagrant-vbguest
vagrant plugin install vagrant-vbguest
Then I run this command.
$sudo /Library/StartupItems/VirtualBox/VirtualBox restart
Found at vagrant 'hostonlyif' create not working
I added -y to apt-get
apt-get update
apt-get -y install build-essential git-core python-software-properties nodejs
apt-get -y install vim
Then it installed all.

Resources