I'm using a Canonical-provided Amazon AMI as a baseline for a new AMI, but when I attempt to install the libsnmp-dev
package (which I need in order to have access to net-snmp-config
for some reason, even though you certainly don't need to be developing SNMP code in order to want to configure an SNMP user and key), everything blows up with non-existent dependencies.
The AMI is configured with whatever the default repos are in /etc/apt/sources.list
. If finds libsnmp-dev
without difficulty, but all of its dependencies fail with 404 errors - and looking at the repos in question, they all have packages with the correct name, but different version numbers. I'm new to Ubuntu, and so far pretty much hating it because of this problem. Isn't the whole point of package management systems to avoid these kinds of problems.
- What do I need to do to resolve the dependencies?
- Why are the official Ubuntu repos serving up versions of packages for which they do not have valid dependencies?
I've wasted the better part of an 8 hour day just trying to install this trivial little command line utility.
# apt-get install libsnmp-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libc-dev-bin libc6-dev libpci-dev libsensors4-dev libssl-dev libssl-doc libudev-dev libwrap0-dev linux-libc-dev
manpages-dev zlib1g-dev
Suggested packages:
glibc-doc
The following NEW packages will be installed:
libc-dev-bin libc6-dev libpci-dev libsensors4-dev libsnmp-dev libssl-dev libssl-doc libudev-dev libwrap0-dev
linux-libc-dev manpages-dev zlib1g-dev
0 upgraded, 12 newly installed, 0 to remove and 0 not upgraded.
Need to get 3,264 kB/8,949 kB of archives.
After this operation, 42.4 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Err:1 http://security.ubuntu.com/ubuntu xenial-security/main amd64 linux-libc-dev amd64 4.4.0-103.126
404 Not Found [IP: 34.229.132.181 80]
Ign:2 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libssl-dev amd64 1.0.2g-1ubuntu4.9
Ign:3 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libssl-doc all 1.0.2g-1ubuntu4.9
Err:1 http://security.ubuntu.com/ubuntu xenial-security/main amd64 linux-libc-dev amd64 4.4.0-103.126
404 Not Found [IP: 34.229.132.181 80]
Err:2 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libssl-dev amd64 1.0.2g-1ubuntu4.9
404 Not Found [IP: 34.229.132.181 80]
Err:3 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libssl-doc all 1.0.2g-1ubuntu4.9
404 Not Found [IP: 34.229.132.181 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/l/linux/linux-libc-dev_4.4.0-103.126_amd64.deb 404 Not Found [IP: 34.229.132.181 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl-dev_1.0.2g-1ubuntu4.9_amd64.deb 404 Not Found [IP: 34.229.132.181 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl-doc_1.0.2g-1ubuntu4.9_all.deb 404 Not Found [IP: 34.229.132.181 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
My repos list:
## Note, this file is written by cloud-init on first boot of an instance
## modifications made here will not survive a re-bundle.
## if you wish to make changes you can:
## a.) add 'apt_preserve_sources_list: true' to /etc/cloud/cloud.cfg
## or do the same in user-data
## b.) add sources in /etc/apt/sources.list.d
## c.) make changes to template file /etc/cloud/templates/sources.list.tmpl
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ xenial main restricted
deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ xenial main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ xenial universe
deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ xenial universe
deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ xenial-updates universe
deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ xenial-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ xenial multiverse
deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu xenial-security main restricted
deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://security.ubuntu.com/ubuntu xenial-security universe
deb-src http://security.ubuntu.com/ubuntu xenial-security universe
deb http://security.ubuntu.com/ubuntu xenial-security multiverse
deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu xenial partner
# deb-src http://archive.canonical.com/ubuntu xenial partner
The AMI is simply the latest 16.04 AMI released by Canonical: ami-3dec9947
.
sudo apt update
recently? – fkraiem Dec 20 '17 at 01:3734.229.132.181
is not the address ofsecurity.ubuntu.com
. – fkraiem Dec 20 '17 at 01:41whois 34.229.132.181
is indeed registered to Amazon's cloud computing infrastructure. – David Foerster Dec 20 '17 at 03:4034.229.132.181
a.k.a.us-east-1.ec2.archive.ubuntu.com
and found that contains very few binary packages for Xenial for whatever reason. That repository "mirror" is practically useless. I don't know if that's intentional or if Canonical is responsible for it, which means I can't tell if this question is on topic. If you're paying money to Canonical for this server instance I recommend that you contact their support for help. – David Foerster Dec 20 '17 at 03:49sudo apt-get download linux-libc-dev
to get the files and then install them with something likesudo dpkg -i ./$FILENAME.deb
. – pbhj Dec 23 '17 at 23:31