Ubuntu (14.04.1) sudo apt-get update Error

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
rmtogetherAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dr. KlahnPrincipal Software EngineerCommented:
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.
rmtogetherAuthor Commented:
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

Dr. KlahnPrincipal Software EngineerCommented:
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.
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

rmtogetherAuthor Commented:
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

David SankovskySenior SysAdminCommented:
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!
Prabhin MPEngineer-TechOPSCommented:
Hi,
can you please share me what is the exact error. So i can go through it.
rmtogetherAuthor Commented:
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.
David SankovskySenior SysAdminCommented:
@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!
Prabhin MPEngineer-TechOPSCommented:
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.
rmtogetherAuthor Commented:
@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

Prabhin MPEngineer-TechOPSCommented:
Seem like you have DNS issue in your network. Can you share me resolv.conf file contents.
rmtogetherAuthor Commented:
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

Prabhin MPEngineer-TechOPSCommented:
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.
rmtogetherAuthor Commented:
@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

Prabhin MPEngineer-TechOPSCommented:
Any HTTP proxy configured for performing update and upgrade??
rmtogetherAuthor Commented:
@Prabhin MP, Could you please teach me how to find our this (HTTP proxy )
Prabhin MPEngineer-TechOPSCommented:
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"
rmtogetherAuthor Commented:
@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.
rmtogetherAuthor Commented:
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
Prabhin MPEngineer-TechOPSCommented:
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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rmtogetherAuthor Commented:
Hi Prabhin MP

thank you so much for your help!!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.