Try to install default-jdk on Ubuntu But got connection failed - linux

I tried to install default-jdk on ubuntu 20 but got connection failed in the middle of the process
sudo apt install default-jdk
Need to get 267 MB of archives.
After this operation, 422 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Ign:1 http://a.docker-registry.ir/ubuntu focal/main amd64 java-common all 0.72
Ign:2 http://a.docker-registry.ir/ubuntu focal-updates/main amd64 openjdk-11-jre-headless amd64 11.0.17+8-1ubuntu2~20.04
Err:3 http://a.docker-registry.ir/ubuntu focal/main amd64 default-jre-headless amd64 2:1.11-72
Connection failed [IP: 5.253.27.159 80]
Ign:4 http://a.docker-registry.ir/ubuntu focal/main amd64 ca-certificates-java all 20190405ubuntu1
Ign:5 http://a.docker-registry.ir/ubuntu focal-updates/main amd64 openjdk-11-jre amd64 11.0.17+8-1ubuntu2~20.04
Err:6 http://a.docker-registry.ir/ubuntu focal/main amd64 default-jre amd64 2:1.11-72
Connection failed [IP: 5.253.27.159 80]
I have tried using VPN but it didn't solve my problem.
Can someone come up with a solution for that?

Related

Does docker-compose insert a backdoor in it's containers?

I was poking around in my docker container recently and I noticed some ports open and listening in it that I didn't set up myself. That concerns me as it could be an indication of some sort of supply-chain attack in action.
Here's how you can reproduce what I saw:
docker-compose.yml:
version: '3.3'
services:
vis:
image: ubuntu:22.04
$ docker-compose run vis bash -c 'apt update && apt install -y net-tools && netstat -tulpn'
Creating repo_vis_run ... done
Get:1 http://archive.ubuntu.com/ubuntu jammy InRelease [270 kB]
Get:2 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Get:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [114 kB]
Get:4 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [305 kB]
Get:5 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [99.8 kB]
Get:6 http://archive.ubuntu.com/ubuntu jammy/restricted amd64 Packages [164 kB]
Get:7 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages [1792 kB]
Get:8 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 Packages [4644 B]
Get:9 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages [276 kB]
Get:10 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [129 kB]
Get:11 http://archive.ubuntu.com/ubuntu jammy/multiverse amd64 Packages [266 kB]
Get:12 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages [17.5 MB]
Get:13 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [354 kB]
Get:14 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages [7791 B]
Get:15 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [253 kB]
Get:16 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [631 kB]
Get:17 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 Packages [5814 B]
Fetched 22.3 MB in 6s (3609 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
net-tools
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 204 kB of archives.
After this operation, 819 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu jammy/main amd64 net-tools amd64 1.60+git20181103.0eebece-1ubuntu5 [204 kB]
Fetched 204 kB in 3s (58.6 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package net-tools.
(Reading database ... 4395 files and directories currently installed.)
Preparing to unpack .../net-tools_1.60+git20181103.0eebece-1ubuntu5_amd64.deb ...
Unpacking net-tools (1.60+git20181103.0eebece-1ubuntu5) ...
Setting up net-tools (1.60+git20181103.0eebece-1ubuntu5) ...
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.11:40581 0.0.0.0:* LISTEN -
udp 0 0 127.0.0.11:49119 0.0.0.0:* -
Notice the two open ports. They seem to be different on every run of the container, but they're always binded to 127.0.0.11. That apparently is a loopback address, which theoretically means these ports are only open to my machine, but a similar exploit on my machine could relay info to the outside world.
Also note that running the same thing directly in a docker container (without docker-compose) does not result in open ports.
[andromodon#potens vis_container]$ docker run -it ubuntu:22.04 bash -c "apt update && apt install -y net-tools && netstat -tulpn"
Get:1 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Get:2 http://archive.ubuntu.com/ubuntu jammy InRelease [270 kB]
Get:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [114 kB]
Get:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [99.8 kB]
Get:5 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 Packages [4644 B]
Get:6 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages [17.5 MB]
Get:7 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages [276 kB]
Get:8 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [129 kB]
Get:9 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [305 kB]
Get:10 http://archive.ubuntu.com/ubuntu jammy/restricted amd64 Packages [164 kB]
Get:11 http://archive.ubuntu.com/ubuntu jammy/multiverse amd64 Packages [266 kB]
Get:12 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages [1792 kB]
Get:13 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [354 kB]
Get:14 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [253 kB]
Get:15 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages [7791 B]
Get:16 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [631 kB]
Get:17 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 Packages [5814 B]
Fetched 22.3 MB in 7s (3407 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
net-tools
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 204 kB of archives.
After this operation, 819 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu jammy/main amd64 net-tools amd64 1.60+git20181103.0eebece-1ubuntu5 [204 kB]
Fetched 204 kB in 2s (96.1 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package net-tools.
(Reading database ... 4395 files and directories currently installed.)
Preparing to unpack .../net-tools_1.60+git20181103.0eebece-1ubuntu5_amd64.deb ...
Unpacking net-tools (1.60+git20181103.0eebece-1ubuntu5) ...
Setting up net-tools (1.60+git20181103.0eebece-1ubuntu5) ...
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
Does anyone know what's going on here and what these ports are for? If you can point to the code that's opening them I'll feel much more secure about this.
Thanks in advance for taking a look.

Trying to install handbrake CLI but I keep getting a gstreamer install issue. Do I have add some additional ppa for this?

I am on an ubuntu-18.04 machine.
Firstly I am adding the handbrake ppa repository in this manner
sudo add-apt-repository ppa:stebbins/handbrake-releases
Post that I am running the installation using the following commands
sudo apt -y update
sudo apt install -y handbrake-gtk handbrake-cli --fix-missing
But I constantly keep getting this error
Err:17 http://security.ubuntu.com/ubuntu bionic-updates/main amd64 libgstreamer-plugins-good1.0-0 amd64 1.14.5-0ubuntu1~18.04.2
404 Not Found [IP: 91.189.91.38 80]
Get:27 http://archive.ubuntu.com/ubuntu bionic/main amd64 libtag1v5 amd64 1.11.1+dfsg.1-0.2build2 [10.9 kB]
Get:28 http://archive.ubuntu.com/ubuntu bionic/main amd64 libtwolame0 amd64 0.3.13-3 [46.7 kB]
Get:29 http://archive.ubuntu.com/ubuntu bionic/main amd64 libv4lconvert0 amd64 1.14.2-1 [76.1 kB]
Get:30 http://archive.ubuntu.com/ubuntu bionic/main amd64 libv4l-0 amd64 1.14.2-1 [41.7 kB]
Get:31 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libvpx5 amd64 1.7.0-3ubuntu0.18.04.1 [796 kB]
Get:32 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libwavpack1 amd64 5.1.0-2ubuntu1.5 [76.8 kB]
Ign:33 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gstreamer1.0-plugins-good amd64 1.14.5-0ubuntu1~18.04.2
Get:34 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gstreamer1.0-x amd64 1.14.5-0ubuntu1~18.04.3 [74.3 kB]
Err:33 http://security.ubuntu.com/ubuntu bionic-updates/main amd64 gstreamer1.0-plugins-good amd64 1.14.5-0ubuntu1~18.04.2
404 Not Found [IP: 91.189.91.38 80]
Fetched 6,538 kB in 3s (1,908 kB/s)
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/g/gst-plugins-good1.0/libgstreamer-plugins-good1.0-0_1.14.5-0ubuntu1~18.04.2_amd64.deb 404 Not Found [IP: 91.189.91.38 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/g/gst-plugins-good1.0/gstreamer1.0-plugins-good_1.14.5-0ubuntu1~18.04.2_amd64.deb 404 Not Found [IP: 91.189.91.38 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
I checked the file in the repository but it doesn't seem to exist.
How can I update the libgstreamer download link? Do I need to add some other ppa for this?

Issues installing gdal-bin (libmysqlclient21 dependency) on 20.04.3 (databricks job clusters)

I've had, in the past, gdal utilities installed successfully on a Databricks Cluster running 20.04.3 LTS (focal).
$ cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.3 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.3 LTS"
VERSION_ID="20.04"
$ sudo apt-get install -y gdal-bin
Each time a databricks job cluster startups, my sample notebook attempts to install GDAL. I've attempted a series of apt-get updates/upgrades; and just when I think the issue has gone away; the next day it comes back again (no change of code, cluster spec, etc.)
Most recently the issue occurs once it hits installation for libmysqlclient21, e.g:
Err:27 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libmysqlclient21 amd64 8.0.26-0ubuntu0.20.04.3
404 Not Found [IP: 91.189.88.142 80]
My understanding is that these issues arise when the packaging versions are no longer supported, and noticed that libmysqlclient21 has come out with a recent patch as of the 25th of October (when the issue started arising).
I've noticed when I run %sh sudo apt-get --fix-missing -y update and apt policy libmysqlclient21, prior to a successful installation, I can see it's found 8.0.27-0ubuntu0.20.04.1:
Get:1 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:3 https://repos.azul.com/zulu/deb stable InRelease
Get:4 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:5 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [628 kB]
Get:6 http://archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
Get:7 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1,635 kB]
Get:8 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [801 kB]
Get:9 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [1,183 kB]
Get:10 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [1,086 kB]
Get:11 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 Packages [33.4 kB]
Get:12 http://archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [679 kB]
Fetched 6,374 kB in 19s (329 kB/s)
Reading package lists...
libmysqlclient21:
Installed: (none)
Candidate: 8.0.27-0ubuntu0.20.04.1
Version table:
8.0.27-0ubuntu0.20.04.1 500
500 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
8.0.19-0ubuntu5 500
500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
On an unsuccessful run, it's returning:
Hit:1 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:3 https://repos.azul.com/zulu/deb stable InRelease
Hit:4 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:5 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Reading package lists...
libmysqlclient21:
Installed: (none)
Candidate: 8.0.26-0ubuntu0.20.04.3
Version table:
8.0.26-0ubuntu0.20.04.3 500
500 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
8.0.26-0ubuntu0.20.04.2 500
500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
8.0.19-0ubuntu5 500
500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
I've been scratching my head trying to understand what could be causing this, and what else to do to work around the problem. I'd prefer it to handle the installation automatically without having to hardcode specific versions (in case other issues were to arise); but not against targeting specific versions if I know they'll be supported on the current platform.
Any advice appreciated.
I had success by putting
sudo apt clean && sudo apt update --fix-missing -y && sudo apt install -y libmysqlclient21
before trying to install gdal and it seems to be working now....
...nevermind began failing the next day again...

Error while trying to mount S3 bucket into Ubuntu 14.04 EC2 instance

I have tried the following link to mount S3 bucket into EC2 :
https://forums.aws.amazon.com/message.jspa?messageID=313009
I started typing the following commands :
wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/s3fs/s3fs-1.74.tar.gz
tar zxf s3fs-1.74.tar.gz
The next command to type is this :
apt-get install build-essential libxml2-dev libfuse-dev libcurl4-openssl-dev
But, when I type this, I get the following response :
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
binutils cpp cpp-5 dpkg-dev fakeroot g++ g++-5 gcc gcc-5 icu-devtools libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan2 libatomic1
libc-dev-bin libc6-dev libcc1-0 libcilkrts5 libcurl3 libdpkg-perl libfakeroot libfile-fcntllock-perl libgcc-5-dev libgomp1 libicu-dev libisl15 libitm1 liblsan0
libmpc3 libmpx0 libpcre16-3 libpcre3-dev libpcre32-3 libpcrecpp0v5 libquadmath0 libselinux1-dev libsepol1-dev libstdc++-5-dev libtsan0 libubsan0 linux-libc-dev make
manpages-dev
Suggested packages:
binutils-doc cpp-doc gcc-5-locales debian-keyring g++-multilib g++-5-multilib gcc-5-doc libstdc++6-5-dbg gcc-multilib autoconf automake libtool flex bison gdb
gcc-doc gcc-5-multilib libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg libasan2-dbg liblsan0-dbg libtsan0-dbg libubsan0-dbg libcilkrts5-dbg libmpx0-dbg
libquadmath0-dbg glibc-doc libcurl4-doc libcurl3-dbg libidn11-dev libkrb5-dev libldap2-dev librtmp-dev libssl-dev pkg-config zlib1g-dev icu-doc libstdc++-5-doc
make-doc
The following NEW packages will be installed:
binutils build-essential cpp cpp-5 dpkg-dev fakeroot g++ g++-5 gcc gcc-5 icu-devtools libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl
libasan2 libatomic1 libc-dev-bin libc6-dev libcc1-0 libcilkrts5 libcurl3 libcurl4-openssl-dev libdpkg-perl libfakeroot libfile-fcntllock-perl libfuse-dev
libgcc-5-dev libgomp1 libicu-dev libisl15 libitm1 liblsan0 libmpc3 libmpx0 libpcre16-3 libpcre3-dev libpcre32-3 libpcrecpp0v5 libquadmath0 libselinux1-dev
libsepol1-dev libstdc++-5-dev libtsan0 libubsan0 libxml2-dev linux-libc-dev make manpages-dev
0 upgraded, 48 newly installed, 0 to remove and 0 not upgraded.
Need to get 49.5 MB of archives.
After this operation, 196 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 libpcrecpp0v5 amd64 2:8.38-3.1 [15.2 kB]
Get:2 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 libmpc3 amd64 1.0.3-1 [39.7 kB]
Get:3 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-updates/main amd64 binutils amd64 2.26.1-1ubuntu1~16.04.3 [2,310 kB]
Get:4 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 libc-dev-bin amd64 2.23-0ubuntu3 [68.7 kB]
Err:5 http://security.ubuntu.com/ubuntu xenial-security/main amd64 linux-libc-dev amd64 4.4.0-45.66
404 Not Found [IP: 54.87.136.115 80]
Get:6 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 libc6-dev amd64 2.23-0ubuntu3 [2,084 kB]
Get:7 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 libisl15 amd64 0.16.1-1 [524 kB]
Ign:8 http://security.ubuntu.com/ubuntu xenial-security/main amd64 cpp-5 amd64 5.4.0-6ubuntu1~16.04.2
Get:9 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 cpp amd64 4:5.3.1-1ubuntu1 [27.7 kB]
Ign:10 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libcc1-0 amd64 5.4.0-6ubuntu1~16.04.2
Ign:11 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libgomp1 amd64 5.4.0-6ubuntu1~16.04.2
Ign:12 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libitm1 amd64 5.4.0-6ubuntu1~16.04.2
Ign:13 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libatomic1 amd64 5.4.0-6ubuntu1~16.04.2
Ign:14 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libasan2 amd64 5.4.0-6ubuntu1~16.04.2
Err:5 http://security.ubuntu.com/ubuntu xenial-security/main amd64 linux-libc-dev amd64 4.4.0-45.66
404 Not Found [IP: 54.87.136.115 80]
Ign:15 http://security.ubuntu.com/ubuntu xenial-security/main amd64 liblsan0 amd64 5.4.0-6ubuntu1~16.04.2
Ign:16 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libtsan0 amd64 5.4.0-6ubuntu1~16.04.2
Ign:17 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libubsan0 amd64 5.4.0-6ubuntu1~16.04.2
Ign:18 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libcilkrts5 amd64 5.4.0-6ubuntu1~16.04.2
Ign:19 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libmpx0 amd64 5.4.0-6ubuntu1~16.04.2
Err:8 http://security.ubuntu.com/ubuntu xenial-security/main amd64 cpp-5 amd64 5.4.0-6ubuntu1~16.04.2
404 Not Found [IP: 54.87.136.115 80]
Ign:20 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libquadmath0 amd64 5.4.0-6ubuntu1~16.04.2
Ign:21 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libgcc-5-dev amd64 5.4.0-6ubuntu1~16.04.2
Ign:22 http://security.ubuntu.com/ubuntu xenial-security/main amd64 gcc-5 amd64 5.4.0-6ubuntu1~16.04.2
Get:23 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 gcc amd64 4:5.3.1-1ubuntu1 [5,244 B]
Ign:24 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libstdc++-5-dev amd64 5.4.0-6ubuntu1~16.04.2
Err:10 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libcc1-0 amd64 5.4.0-6ubuntu1~16.04.2
404 Not Found [IP: 54.87.136.115 80]
Ign:25 http://security.ubuntu.com/ubuntu xenial-security/main amd64 g++-5 amd64 5.4.0-6ubuntu1~16.04.2
Get:26 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 g++ amd64 4:5.3.1-1ubuntu1 [1,504 B]
Get:27 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 make amd64 4.1-6 [151 kB]
Get:28 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libdpkg-perl all 1.18.4ubuntu1.1 [195 kB]
Get:29 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-updates/main amd64 dpkg-dev all 1.18.4ubuntu1.1 [584 kB]
Get:30 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 build-essential amd64 12.1ubuntu2 [4,758 B]
Get:31 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 libfakeroot amd64 1.20.2-1ubuntu1 [25.5 kB]
Get:32 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 fakeroot amd64 1.20.2-1ubuntu1 [61.8 kB]
Err:11 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libgomp1 amd64 5.4.0-6ubuntu1~16.04.2
404 Not Found [IP: 54.87.136.115 80]
Get:33 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 icu-devtools amd64 55.1-7 [165 kB]
Get:34 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 libalgorithm-diff-perl all 1.19.03-1 [47.6 kB]
Get:35 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 libalgorithm-diff-xs-perl amd64 0.04-4build1 [11.0 kB]
Get:36 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 libalgorithm-merge-perl all 0.08-3 [12.0 kB]
Ign:37 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libcurl3 amd64 7.47.0-1ubuntu2.1
Ign:38 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libcurl4-openssl-dev amd64 7.47.0-1ubuntu2.1
Get:39 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 libfile-fcntllock-perl amd64 0.22-3 [32.0 kB]
Get:40 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 libsepol1-dev amd64 2.4-2 [249 kB]
Get:41 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 libpcre16-3 amd64 2:8.38-3.1 [144 kB]
Get:42 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 libpcre32-3 amd64 2:8.38-3.1 [136 kB]
Get:43 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 libpcre3-dev amd64 2:8.38-3.1 [525 kB]
Err:12 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libitm1 amd64 5.4.0-6ubuntu1~16.04.2
404 Not Found [IP: 54.87.136.115 80]
Get:44 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 libselinux1-dev amd64 2.4-3build2 [122 kB]
Get:45 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libfuse-dev amd64 2.9.4-1ubuntu3.1 [105 kB]
Get:46 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 libicu-dev amd64 55.1-7 [8,546 kB]
Err:13 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libatomic1 amd64 5.4.0-6ubuntu1~16.04.2
404 Not Found [IP: 54.87.136.115 80]
Err:14 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libasan2 amd64 5.4.0-6ubuntu1~16.04.2
404 Not Found [IP: 54.87.136.115 80]
Get:47 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libxml2-dev amd64 2.9.3+dfsg1-1ubuntu0.1 [743 kB]
Err:15 http://security.ubuntu.com/ubuntu xenial-security/main amd64 liblsan0 amd64 5.4.0-6ubuntu1~16.04.2
404 Not Found [IP: 54.87.136.115 80]
Err:16 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libtsan0 amd64 5.4.0-6ubuntu1~16.04.2
404 Not Found [IP: 54.87.136.115 80]
Err:17 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libubsan0 amd64 5.4.0-6ubuntu1~16.04.2
404 Not Found [IP: 54.87.136.115 80]
Get:48 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 manpages-dev all 4.04-2 [2,048 kB]
Err:18 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libcilkrts5 amd64 5.4.0-6ubuntu1~16.04.2
404 Not Found [IP: 54.87.136.115 80]
Err:19 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libmpx0 amd64 5.4.0-6ubuntu1~16.04.2
404 Not Found [IP: 54.87.136.115 80]
Err:20 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libquadmath0 amd64 5.4.0-6ubuntu1~16.04.2
404 Not Found [IP: 54.87.136.115 80]
Err:21 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libgcc-5-dev amd64 5.4.0-6ubuntu1~16.04.2
404 Not Found [IP: 54.87.136.115 80]
Err:22 http://security.ubuntu.com/ubuntu xenial-security/main amd64 gcc-5 amd64 5.4.0-6ubuntu1~16.04.2
404 Not Found [IP: 54.87.136.115 80]
Err:24 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libstdc++-5-dev amd64 5.4.0-6ubuntu1~16.04.2
404 Not Found [IP: 54.87.136.115 80]
Err:25 http://security.ubuntu.com/ubuntu xenial-security/main amd64 g++-5 amd64 5.4.0-6ubuntu1~16.04.2
404 Not Found [IP: 54.87.136.115 80]
Err:37 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libcurl3 amd64 7.47.0-1ubuntu2.1
404 Not Found [IP: 54.87.136.115 80]
Err:38 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libcurl4-openssl-dev amd64 7.47.0-1ubuntu2.1
404 Not Found [IP: 54.87.136.115 80]
Fetched 19.0 MB in 1s (11.5 MB/s)
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/l/linux/linux-libc-dev_4.4.0-45.66_amd64.deb 404 Not Found [IP: 54.87.136.115 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/g/gcc-5/cpp-5_5.4.0-6ubuntu1~16.04.2_amd64.deb 404 Not Found [IP: 54.87.136.115 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/g/gcc-5/libcc1-0_5.4.0-6ubuntu1~16.04.2_amd64.deb 404 Not Found [IP: 54.87.136.115 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/g/gcc-5/libgomp1_5.4.0-6ubuntu1~16.04.2_amd64.deb 404 Not Found [IP: 54.87.136.115 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/g/gcc-5/libitm1_5.4.0-6ubuntu1~16.04.2_amd64.deb 404 Not Found [IP: 54.87.136.115 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/g/gcc-5/libatomic1_5.4.0-6ubuntu1~16.04.2_amd64.deb 404 Not Found [IP: 54.87.136.115 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/g/gcc-5/libasan2_5.4.0-6ubuntu1~16.04.2_amd64.deb 404 Not Found [IP: 54.87.136.115 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/g/gcc-5/liblsan0_5.4.0-6ubuntu1~16.04.2_amd64.deb 404 Not Found [IP: 54.87.136.115 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/g/gcc-5/libtsan0_5.4.0-6ubuntu1~16.04.2_amd64.deb 404 Not Found [IP: 54.87.136.115 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/g/gcc-5/libubsan0_5.4.0-6ubuntu1~16.04.2_amd64.deb 404 Not Found [IP: 54.87.136.115 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/g/gcc-5/libcilkrts5_5.4.0-6ubuntu1~16.04.2_amd64.deb 404 Not Found [IP: 54.87.136.115 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/g/gcc-5/libmpx0_5.4.0-6ubuntu1~16.04.2_amd64.deb 404 Not Found [IP: 54.87.136.115 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/g/gcc-5/libquadmath0_5.4.0-6ubuntu1~16.04.2_amd64.deb 404 Not Found [IP: 54.87.136.115 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/g/gcc-5/libgcc-5-dev_5.4.0-6ubuntu1~16.04.2_amd64.deb 404 Not Found [IP: 54.87.136.115 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/g/gcc-5/gcc-5_5.4.0-6ubuntu1~16.04.2_amd64.deb 404 Not Found [IP: 54.87.136.115 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/g/gcc-5/libstdc++-5-dev_5.4.0-6ubuntu1~16.04.2_amd64.deb 404 Not Found [IP: 54.87.136.115 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/g/gcc-5/g++-5_5.4.0-6ubuntu1~16.04.2_amd64.deb 404 Not Found [IP: 54.87.136.115 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/c/curl/libcurl3_7.47.0-1ubuntu2.1_amd64.deb 404 Not Found [IP: 54.87.136.115 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/c/curl/libcurl4-openssl-dev_7.47.0-1ubuntu2.1_amd64.deb 404 Not Found [IP: 54.87.136.115 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Is this an error? Why is it showing this?
make sure to update apt-get before installing any lib
$ apt-get update
$ apt-get install build-essential libxml2-dev libfuse-dev libcurl4-openssl-dev

AWS/Ubuntu archive server appears to be down?

I am brand new to both AWS and nginx (OSS version). I just created my free-tier (micro t2) EC2 Ubuntu instance and am trying to install nginx on it. So I run sudo apt-get upgrade and then sudo apt-get install nginx and I get the following errors:
Get:1 http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty/main fonts-dejavu-core all 2.34-1ubuntu1 [1,024 kB]
Get:2 http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main fontconfig-config all 2.11.0-0ubuntu4.1 [47.4 kB]
Get:3 http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main libfontconfig1 amd64 2.11.0-0ubuntu4.1 [123 kB]
Get:4 http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty/main libjpeg-turbo8 amd64 1.3.0-0ubuntu2 [104 kB]
Get:5 http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty/main libjpeg8 amd64 8c-2ubuntu8 [2,194 B]
Get:6 http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main libjbig0 amd64 2.0-2ubuntu4.1 [26.1 kB]
Get:7 http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main libtiff5 amd64 4.0.3-7ubuntu0.3 [143 kB]
Get:8 http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty/main libvpx1 amd64 1.3.0-2 [556 kB]
Get:9 http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty/main libxpm4 amd64 1:3.5.10-1 [38.3 kB]
Get:10 http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty/main libgd3 amd64 2.1.0-3 [147 kB]
Get:11 http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty/main libxslt1.1 amd64 1.1.28-2build1 [145 kB]
Err http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main nginx-common all 1.4.6-1ubuntu3.3
404 Not Found [IP: <someIp> 80]
Err http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main nginx-core amd64 1.4.6-1ubuntu3.3
404 Not Found [IP: <someIp> 80]
Err http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main nginx all 1.4.6-1ubuntu3.3
404 Not Found [IP: <someIp> 80]
Fetched 2,356 kB in 1s (1,871 kB/s)
E: Failed to fetch http://us-west-2.ec2.archive.ubuntu.com/ubuntu/pool/main/n/nginx/nginx-common_1.4.6-1ubuntu3.3_all.deb 404 Not Found [IP: <someIp> 80]
E: Failed to fetch http://us-west-2.ec2.archive.ubuntu.com/ubuntu/pool/main/n/nginx/nginx-core_1.4.6-1ubuntu3.3_amd64.deb 404 Not Found [IP: <someIp> 80]
E: Failed to fetch http://us-west-2.ec2.archive.ubuntu.com/ubuntu/pool/main/n/nginx/nginx_1.4.6-1ubuntu3.3_all.deb 404 Not Found [IP: <someIp> 80]
In reality, <someIp> is an actual IP address, but I'm not sure if that's my IP address or some AWS/Ubuntu archive server. If it's not my IP, I can provide it so long as someone can explain to me what it is and perhaps cite a reference.
I can't tell whether this is an AWS error, and AWS configuration error (maybe I need to tweak some firewall settings, etc.), an nginx error or an issue with apt-get. Any ideas?
Turns out I just needed to run sudo apt-get update. Not sure why that worked, and nobody on the AWS/EC2 forum was able to offer an explanation either.
I experienced problems with apt-get resolving hostnames once too, though I don't remember the exact error and it doesn't ALWAYS happen. So, try the below?
There appears to be a problem with archive.ubuntu.com (where updates are retrieved from) in Amazon's DNS. So, per instructions here (https://serverfault.com/questions/545188/amazon-ec2-instance-cannot-resolve-hostnames), we need to edit the server's DNS.
We can't do that from within Ubuntu, it needs to be done from the console.
In order to do that:
Go to the VPC service
Click "DHCP Options Set" on the left side
Click the blue "Create DHCP Options Set" button at the top
Pick a unique name (e.g. "Google DNS")
Enter "8.8.8.8, 8.8.4.4" in the "Domain Name Servers field
Additional Info:
http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html#AmazonDNS

Resources