?
Solved

Ubuntu (14.04.1) sudo apt-get update Error

Posted on 2017-10-15
21
High Priority
?
206 Views
Last Modified: 2017-10-16
our lab recently has a new Ubuntu (14.04.1) machine but many of software package is out of date.
I try to update it before upgrade to Ubuntu 16.04. However, there is always problems for the command "sudo apt-get update"

I have googled this problem and change "/etc/apt/sources.list" several times, but the error still exists.
I am thinking the error may come from => Could not resolve 'hcapxb01'
I have no idea about the 'hcapxb01'.  My machine has internet connection but I can't ping or nslookup the  'hcapxb01'

Experts, please help me to slove "sudo apt-get update" error. Thank you
Snap1.png
0
Comment
Question by:rmtogether
  • 10
  • 7
  • 2
  • +1
21 Comments
 
LVL 32

Expert Comment

by:Dr. Klahn
ID: 42332213
Sounds like there is a problem in your sources.list file.

A typical Debian / Ubuntu sources.list file should look something like the one below:

deb http://ftp.us.debian.org/debian stable main contrib non-free
deb-src http://ftp.us.debian.org/debian stable main contrib non-free
deb http://ftp.us.debian.org/debian/ jessie-updates main contrib non-free
deb-src http://ftp.us.debian.org/debian/ jessie-updates main contrib non-free
deb http://security.debian.org/ jessie/updates main contrib non-free
deb-src http://security.debian.org/ jessie/updates main contrib non-free

Open in new window


Please post the contents of the affected system's /etc/apt/sources.list file, and we can then see about finding a solution.
0
 

Author Comment

by:rmtogether
ID: 42332245
Hi Dr. Klahn,

I copy and past your code to /etc/apt/sources.list and run "apt-get update" again. It still has the similar problem. the "Could not resolve 'hcapxb01'". please see my result below.

fujitsu@hcavfb11:~$ sudo apt-get update
[sudo] password for fujitsu:
Ign file:  InRelease
Get:1 file:  Release.gpg [819 B]
Get:2 file:  Release [574 B]
Ign file:  Translation-en_US
Ign file:  Translation-en
Err http://security.debian.org jessie/updates InRelease

Err http://security.debian.org jessie/updates Release.gpg
  Could not resolve 'hcapxb01'
Err http://ftp.us.debian.org stable InRelease

Err http://ftp.us.debian.org jessie-updates InRelease

Err http://ftp.us.debian.org stable Release.gpg
  Could not resolve 'hcapxb01'
Err http://ftp.us.debian.org jessie-updates Release.gpg
  Could not resolve 'hcapxb01'
Reading package lists... Done
W: Failed to fetch http://ftp.us.debian.org/debian/dists/stable/InRelease

W: Failed to fetch http://ftp.us.debian.org/debian/dists/jessie-updates/InRelease

W: Failed to fetch http://security.debian.org/dists/jessie/updates/InRelease

W: Failed to fetch http://security.debian.org/dists/jessie/updates/Release.gpg  Could not resolve 'hcapxb01'

W: Failed to fetch http://ftp.us.debian.org/debian/dists/stable/Release.gpg  Could not resolve 'hcapxb01'

W: Failed to fetch http://ftp.us.debian.org/debian/dists/jessie-updates/Release.gpg  Could not resolve 'hcapxb01'

W: Some index files failed to download. They have been ignored, or old ones used instead.

Open in new window

0
 
LVL 32

Expert Comment

by:Dr. Klahn
ID: 42332247
No, no, no.  You cannot use that file on Ubuntu.  It is a Debian file.  Your file should look something like that one but they are not interchangeable parts.  It is extremely fortunate that the downloads failed, because if any had succeeded it would have completely corrupted your system's apt database and you would have to restore it from the most recent full backup.

Please show us the content of your system's file.
0
Evaluating UTMs? Here's what you need to know!

Evaluating a UTM appliance and vendor can prove to be an overwhelming exercise.  How can you make sure that you're getting the security that your organization needs without breaking the bank? Check out our UTM Buyer's Guide for more information on what you should be looking for!

 

Author Comment

by:rmtogether
ID: 42332265
Thank you for letting me know Dr. Klahn

are you saying my original "/etc/apt/sources.list" file?

it only has 1 line as below
 
#deb file:/var/tmp/repo_forZDL/ ./

Open in new window

0
 
LVL 8

Expert Comment

by:David Sankovsky
ID: 42332349
It seems that your entire repo is based on a local file located at /var/tmp/repo_forZDL which is strange... Not because it's a file, but rather because of the location...

If the machine is brand new and did not come preinstalled with various software from a certain vendor, you can use the following one-liner to restore the source list to a default Ubuntu config:

printf 'deb http://archive.ubuntu.com/ubuntu %s main multiverse universe restricted\n' $(lsb_release -sc){,-security} > /etc/apt/sources.list

Open in new window


Please note, that if the server came preloaded with various software, using the method above is not recommended and you should contact the software vendor for assistance!
0
 
LVL 2

Expert Comment

by:Prabhin MP
ID: 42332392
Hi,
can you please share me what is the exact error. So i can go through it.
0
 

Author Comment

by:rmtogether
ID: 42332451
Hi, Thanks for the comments

@David Sankovsky, this is a brand new machine but with various preloaded software.
Software(Pre-installed):
- Ubuntu 14.04.1 LTS
- zabbix 3.0.7 (not activated)
- docker 1.13.0
- nvidia-docker 1.0.0-1
- TensorFlow 0.12.1
- Chainer v1.19.0
- Caffe rc3
- Jupiter 0.0.0

@Prabhin MP, I already posted the exact error in previous conversations.
0
 
LVL 8

Expert Comment

by:David Sankovsky
ID: 42332459
@rmtogether

Preloaded by who? Did you install all the software? or did you get eh machine from a certain software vendor who installed all of this.
If you got this from a vendor, contact them as the file might be something they use to implement version control or other functions!
0
 
LVL 2

Assisted Solution

by:Prabhin MP
Prabhin MP earned 3000 total points
ID: 42332461
For  ubuntu 14.04 , can you please try with the following repo's


deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty main restricted
deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty main restricted

deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty-updates main restricted
deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty-updates main restricted

deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty universe
deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty universe
deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty-updates universe
deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty-updates universe

deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty multiverse
deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty multiverse
deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty-updates multiverse

deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu trusty-security main
deb-src http://security.ubuntu.com/ubuntu trusty-security main
deb http://security.ubuntu.com/ubuntu trusty-security universe
deb-src http://security.ubuntu.com/ubuntu trusty-security universe

I hope this will solve your issue.
0
 

Author Comment

by:rmtogether
ID: 42332540
@David Sankovsky,  everything is preload by the vendor, but they only make sure hardware is running properly with very limited support for software.

@Prabhin MP, there is still same similar error like below

fujitsu@hcavfb11:~$ sudo apt-get update
[sudo] password for fujitsu:
Ign file:  InRelease
Get:1 file:  Release.gpg [819 B]
Get:2 file:  Release [574 B]
Ign file:  Translation-en_US
Ign file:  Translation-en
Err http://us-east-1.ec2.archive.ubuntu.com trusty InRelease

Err http://us-east-1.ec2.archive.ubuntu.com trusty-updates InRelease

Err http://us-east-1.ec2.archive.ubuntu.com trusty-backports InRelease

Err http://us-east-1.ec2.archive.ubuntu.com trusty Release.gpg
  Could not resolve 'hcapxb01'
Err http://us-east-1.ec2.archive.ubuntu.com trusty-updates Release.gpg
  Could not resolve 'hcapxb01'
Err http://us-east-1.ec2.archive.ubuntu.com trusty-backports Release.gpg
  Could not resolve 'hcapxb01'
Err http://security.ubuntu.com trusty-security InRelease

Err http://security.ubuntu.com trusty-security Release.gpg
  Could not resolve 'hcapxb01'
Reading package lists... Done
W: Failed to fetch http://us-east-1.ec2.archive.ubuntu.com/ubuntu/dists/trusty/InRelease

W: Failed to fetch http://us-east-1.ec2.archive.ubuntu.com/ubuntu/dists/trusty-updates/InRelease

W: Failed to fetch http://us-east-1.ec2.archive.ubuntu.com/ubuntu/dists/trusty-backports/InRelease

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/InRelease

W: Failed to fetch http://us-east-1.ec2.archive.ubuntu.com/ubuntu/dists/trusty/Release.gpg  Could not resolve 'hcapxb01'

W: Failed to fetch http://us-east-1.ec2.archive.ubuntu.com/ubuntu/dists/trusty-updates/Release.gpg  Could not resolve 'hcapxb01'

W: Failed to fetch http://us-east-1.ec2.archive.ubuntu.com/ubuntu/dists/trusty-backports/Release.gpg  Could not resolve 'hcapxb01'

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/Release.gpg  Could not resolve 'hcapxb01'

W: Some index files failed to download. They have been ignored, or old ones used instead.
fujitsu@hcavfb11:~$

Open in new window

0
 
LVL 2

Expert Comment

by:Prabhin MP
ID: 42332541
Seem like you have DNS issue in your network. Can you share me resolv.conf file contents.
0
 

Author Comment

by:rmtogether
ID: 42332555
Hi @Prabhin MP

there was no  DNS setting before. but I already add in the following

fujitsu@hcavfb11:~$ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 8.8.8.8
nameserver 8.8.4.4

Open in new window

0
 
LVL 2

Expert Comment

by:Prabhin MP
ID: 42332563
HI,
@rmtogether
Are you sure that you are able to access internet, I mean you are able to ping google.com.

If yes, due have  any proxy server for performing  update.
0
 

Author Comment

by:rmtogether
ID: 42332590
@Prabhin MP

Yes, Ping is no problem.

fujitsu@hcavfb11:~$ ping google.com
PING google.com (172.217.27.174) 56(84) bytes of data.
64 bytes from kix05s07-in-f14.1e100.net (172.217.27.174): icmp_seq=1 ttl=53 time=2.86 ms
64 bytes from kix05s07-in-f14.1e100.net (172.217.27.174): icmp_seq=2 ttl=53 time=2.63 ms
64 bytes from kix05s07-in-f14.1e100.net (172.217.27.174): icmp_seq=3 ttl=53 time=2.65 ms
64 bytes from kix05s07-in-f14.1e100.net (172.217.27.174): icmp_seq=4 ttl=53 time=2.68 ms
^C
--- google.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 2.636/2.710/2.865/0.090 ms

Open in new window

0
 
LVL 2

Expert Comment

by:Prabhin MP
ID: 42332603
Any HTTP proxy configured for performing update and upgrade??
0
 

Author Comment

by:rmtogether
ID: 42332619
@Prabhin MP, Could you please teach me how to find our this (HTTP proxy )
0
 
LVL 2

Assisted Solution

by:Prabhin MP
Prabhin MP earned 3000 total points
ID: 42332635
you can check in /etc/apt/apt.conf


One more thing which i need to ask you, Do you have any server on this hostname "hcapxb01"
1
 

Author Comment

by:rmtogether
ID: 42332645
@Prabhin MP, Thank you finally I found "hcapxb01". please see below. How should I do next?

fujitsu@hcavfb11:~$ cat /etc/apt/apt.conf
Acquire::ftp::proxy "ftp://hcapxb01:8080/";
Acquire::http::proxy "http://hcapxb01:8080/";
Acquire::https::proxy "https://hcapxb01:8080/";
fujitsu@hcavfb11:~$

Open in new window


the whole system is with 1 server (with docker install, is this matter?), 1 NAS, 2 switches.
0
 

Author Comment

by:rmtogether
ID: 42332648
I guess  hcapxb01 is the server when the vendor was doing configuration on their internal network. Now this server is move to our data center which is completed out of their network
0
 
LVL 2

Accepted Solution

by:
Prabhin MP earned 3000 total points
ID: 42332665
you can remove all the lines,
Acquire::ftp::proxy "ftp://hcapxb01:8080/";
Acquire::http::proxy "http://hcapxb01:8080/";
Acquire::https::proxy "https://hcapxb01:8080/";

and start update. It should work now.
0
 

Author Closing Comment

by:rmtogether
ID: 42332694
Hi Prabhin MP

thank you so much for your help!!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

601 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question