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
Related
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?
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?
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...
I'm trying to configure Docker on an Azure VM (Ubuntu 18.04 LTS). The goal is to use Jenkins to deploy my applications to my Kubernetes cluster (following this tutorial).
But when I try to build a docker image inside this VM I got 403 errors during the "RUN apt-get update". While the VM itself can access those urls, it's only during the build of the docker image that I get 403 errors.
Sample of the output :
Err:33 http://archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages
403 Forbidden [IP: 91.189.88.149 80]
Ign:34 http://archive.ubuntu.com/ubuntu xenial-backports/main all Packages
Ign:35 http://archive.ubuntu.com/ubuntu xenial-backports/restricted amd64 Packages
Ign:36 http://archive.ubuntu.com/ubuntu xenial-backports/restricted all Packages
Ign:37 http://archive.ubuntu.com/ubuntu xenial-backports/universe amd64 Packages
Ign:38 http://archive.ubuntu.com/ubuntu xenial-backports/universe all Packages
Ign:39 http://archive.ubuntu.com/ubuntu xenial-backports/multiverse amd64 Packages
Ign:40 http://archive.ubuntu.com/ubuntu xenial-backports/multiverse all Packages
Reading package lists...
W: The repository 'http://archive.ubuntu.com/ubuntu xenial-updates Release' does not have a Release file.
W: The repository 'http://archive.ubuntu.com/ubuntu xenial-backports Release' does not have a Release file.
E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/xenial-security/main/binary-amd64/Packages 403 Forbidden [IP: 91.189.88.161 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/main/binary-amd64/Packages 403 Forbidden [IP: 91.189.88.149 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-updates/main/binary-amd64/Packages 403 Forbidden [IP: 91.189.88.149 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-backports/main/binary-amd64/Packages 403 Forbidden [IP: 91.189.88.149 80]
I have found some similar questions like this one but none of the answers worked or explains exactly what happens in Azure (firewall or transparent proxy not used properly by the network of docker I guess).
Is there a specific configuration for docker, azure VM, ...?
Thank you.
I am trying to install "ia32-libs" After doing google I did following steps. Yet not able to do it...
1st step i have added dpkg --add-architecture i386
2nd step added "deb http://archive.ubuntu.com/ubuntu/ raring main restricted universe multiverse" >ia32-libs-raring.list"
root#user:/etc/apt/sources.list.d# sudo dpkg --add-architecture i386
root#user:/etc/apt/sources.list.d# echo "deb http://archive.ubuntu.com/ubuntu/ raring main restricted universe multiverse" >ia32-libs-raring.list
root#user:/etc/apt/sources.list.d# apt-get update
Ign http://us-east-1.ec2.archive.ubuntu.com trusty InRelease
Ign http://security.ubuntu.com trusty-security InRelease
Ign http://archive.ubuntu.com raring InRelease
Ign http://us-east-1.ec2.archive.ubuntu.com trusty-updates InRelease
Hit http://security.ubuntu.com trusty-security Release.gpg
Ign http://archive.ubuntu.com raring Release.gpg
Hit http://us-east-1.ec2.archive.ubuntu.com trusty Release.gpg
Hit http://security.ubuntu.com trusty-security Release
Hit http://us-east-1.ec2.archive.ubuntu.com trusty-updates Release.gpg
Ign http://archive.ubuntu.com raring Release
Hit http://us-east-1.ec2.archive.ubuntu.com trusty Release
Hit http://us-east-1.ec2.archive.ubuntu.com trusty-updates Release
Hit http://security.ubuntu.com trusty-security/main Sources
Hit http://us-east-1.ec2.archive.ubuntu.com trusty/main Sources
Hit http://security.ubuntu.com trusty-security/universe Sources
Hit http://us-east-1.ec2.archive.ubuntu.com trusty/universe Sources
Hit http://security.ubuntu.com trusty-security/main amd64 Packages
Hit http://us-east-1.ec2.archive.ubuntu.com trusty/main amd64 Packages
Hit http://security.ubuntu.com trusty-security/universe amd64 Packages
Hit http://us-east-1.ec2.archive.ubuntu.com trusty/universe amd64 Packages
Hit http://security.ubuntu.com trusty-security/main i386 Packages
Hit http://us-east-1.ec2.archive.ubuntu.com trusty/main i386 Packages
Hit http://security.ubuntu.com trusty-security/universe i386 Packages
Hit http://us-east-1.ec2.archive.ubuntu.com trusty/universe i386 Packages
Hit http://security.ubuntu.com trusty-security/main Translation-en
Hit http://security.ubuntu.com trusty-security/universe Translation-en
Hit http://us-east-1.ec2.archive.ubuntu.com trusty/main Translation-en
Hit http://us-east-1.ec2.archive.ubuntu.com trusty/universe Translation-en
Hit http://us-east-1.ec2.archive.ubuntu.com trusty-updates/main Sources
Hit http://us-east-1.ec2.archive.ubuntu.com trusty-updates/universe Sources
Hit http://us-east-1.ec2.archive.ubuntu.com trusty-updates/main amd64 Packages
Hit http://us-east-1.ec2.archive.ubuntu.com trusty-updates/universe amd64 Packages
Hit http://us-east-1.ec2.archive.ubuntu.com trusty-updates/main i386 Packages
Hit http://us-east-1.ec2.archive.ubuntu.com trusty-updates/universe i386 Packages
Hit http://us-east-1.ec2.archive.ubuntu.com trusty-updates/main Translation-en
Hit http://us-east-1.ec2.archive.ubuntu.com trusty-updates/universe Translation-en
Ign http://us-east-1.ec2.archive.ubuntu.com trusty/main Translation-en_US
Ign http://us-east-1.ec2.archive.ubuntu.com trusty/universe Translation-en_US
Err http://archive.ubuntu.com raring/main amd64 Packages
404 Not Found [IP: 91.189.91.13 80]
Err http://archive.ubuntu.com raring/restricted amd64 Packages
404 Not Found [IP: 91.189.91.13 80]
Err http://archive.ubuntu.com raring/universe amd64 Packages
404 Not Found [IP: 91.189.91.13 80]
Err http://archive.ubuntu.com raring/multiverse amd64 Packages
404 Not Found [IP: 91.189.91.13 80]
Err http://archive.ubuntu.com raring/main i386 Packages
404 Not Found [IP: 91.189.91.13 80]
Err http://archive.ubuntu.com raring/restricted i386 Packages
404 Not Found [IP: 91.189.91.13 80]
Err http://archive.ubuntu.com raring/universe i386 Packages
404 Not Found [IP: 91.189.91.13 80]
Err http://archive.ubuntu.com raring/multiverse i386 Packages
404 Not Found [IP: 91.189.91.13 80]
Ign http://archive.ubuntu.com raring/main Translation-en_US
Ign http://archive.ubuntu.com raring/main Translation-en
Ign http://archive.ubuntu.com raring/multiverse Translation-en_US
Ign http://archive.ubuntu.com raring/multiverse Translation-en
Ign http://archive.ubuntu.com raring/restricted Translation-en_US
Ign http://archive.ubuntu.com raring/restricted Translation-en
Ign http://archive.ubuntu.com raring/universe Translation-en_US
Ign http://archive.ubuntu.com raring/universe Translation-en
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/raring/main/binary-amd64/Packages 404 Not Found [IP: 91.189.91.13 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/raring/restricted/binary-amd64/Packages 404 Not Found [IP: 91.189.91.13 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/raring/universe/binary-amd64/Packages 404 Not Found [IP: 91.189.91.13 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/raring/multiverse/binary-amd64/Packages 404 Not Found [IP: 91.189.91.13 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/raring/main/binary-i386/Packages 404 Not Found [IP: 91.189.91.13 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/raring/restricted/binary-i386/Packages 404 Not Found [IP: 91.189.91.13 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/raring/universe/binary-i386/Packages 404 Not Found [IP: 91.189.91.13 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/raring/multiverse/binary-i386/Packages 404 Not Found [IP: 91.189.91.13 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
Try these steps:
sudo apt-get install libc6:i386
sudo -i
cd /etc/apt/sources.list.d
echo "deb http://archive.ubuntu.com/ubuntu/ raring main restricted universe multiverse" >ia32-libs-raring.list
apt-get update
apt-get install ia32-libs
rm /etc/apt/sources.list.d/ia32-libs-raring.list
apt-get update
exit
sudo apt-get install gcc-multilib
Reference: This thread.