Solved

UBUNTU: sudo apt-get update error

Posted on 2011-09-29
25
1,366 Views
Last Modified: 2013-12-15
I am having errors whenever I use "sudo apt-get update" this is a clean ubuntu 10.0.4 installation and I need to install Java (JRE6) and other softwares.

A snapshot of the error message is attached below.

 beginning of error end of error messageThanks
0
Comment
Question by:speak2ab
  • 9
  • 8
  • 3
  • +3
25 Comments
 
LVL 21

Expert Comment

by:Papertrip
ID: 36815567
Are you able to reach the internet from that machine?

Paste output from the following:
ifconfig -a
netstat -rn
cat /etc/resolv.conf

Open in new window

0
 
LVL 5

Author Comment

by:speak2ab
ID: 36815683
Yes I can reach the internet from the machine.

I have even tried export proxy but still get same result.
0
 
LVL 21

Assisted Solution

by:Papertrip
Papertrip earned 100 total points
ID: 36815701
Along with the commands in my first answer, paste output from this as well.
nslookup security.ubuntu.com

Open in new window

0
 
LVL 5

Author Comment

by:speak2ab
ID: 36815840
I will do that once i am back on the system tomorrow. Thanks.

0
 
LVL 14

Expert Comment

by:fmarzocca
ID: 36816232
it could also be a temporary problem on repositories site.
0
 
LVL 18

Expert Comment

by:TobiasHolm
ID: 36817804
Looks like a DNS error. Can you ping the servers in your /etc/apt/sources.list ?

Regards, Tobias
0
 
LVL 10

Expert Comment

by:pfrancois
ID: 36890246
The hostnames seem to exist, but some directories are unexisting. Anyway, we will still need to see the file /etc/apt/sources.list
0
 
LVL 5

Author Comment

by:speak2ab
ID: 36892581
@PaperTrip: The result of nslookup security.ubuntu.com
** server can't find security.ubuntu.com: NXDOMAIN
All the others were fine.

@ pfrancois and TobiasHolm: Result of /etc/apt/sources.list

#############################################################
################### OFFICIAL UBUNTU REPOS ###################
#############################################################

###### Ubuntu Main Repos
deb http://fr.archive.ubuntu.com/ubuntu/ natty main restricted universe
deb-src http://fr.archive.ubuntu.com/ubuntu/ natty main restricted universe

###### Ubuntu Update Repos
deb http://fr.archive.ubuntu.com/ubuntu/ natty-security main restricted universe
deb http://fr.archive.ubuntu.com/ubuntu/ natty-updates main restricted universe
deb-src http://fr.archive.ubuntu.com/ubuntu/ natty-security main restricted universe
deb-src http://fr.archive.ubuntu.com/ubuntu/ natty-updates main restricted universe

@fmarzocca: I changed the repository to FR from US

I'm still stuck with the problem, Any ideas?
0
 
LVL 9

Expert Comment

by:crazedsanity
ID: 36892696
Looks like the server is having some DNS resolution issues.  More information would be nice.  For instance, when I do a lookup, it shows the server I'm polling:
user@server:~$ nslookup secxurity.ubuntu.com
Server:         10.1.0.3
Address:        10.1.0.3#53

** server can't find secxurity.ubuntu.com: NXDOMAIN

Open in new window

0
 
LVL 14

Expert Comment

by:fmarzocca
ID: 36893064
are you behind a proxy?
0
 
LVL 5

Author Comment

by:speak2ab
ID: 36893679
@crazedsanity: I'll do that on monday.

@fmarzocca: Yes i am behind a proxy.
0
 
LVL 5

Author Comment

by:speak2ab
ID: 36908312
@Crazedsanity and @PaperTrip

Server:		10.55.128.5
Address:	10.55.128.5#53

** server can't find secxurity.ubuntu.com: NXDOMAIN

Open in new window



0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 18

Expert Comment

by:TobiasHolm
ID: 36908533
The servername is misspelled: secxurity.ubuntu.com
Should be security.ubuntu.com

Did you have Ubuntu 10.4 ? Then try another /etc/apt/sources.list
0
 
LVL 5

Author Comment

by:speak2ab
ID: 36908560
Thanks for pointing that out. The result is thesame for both cases (i.e nslookup security.ubuntu.com)

No I am using Ubuntu 11.04 - the Natty Narwhal .

The result of /etc/apt/sources.list his still the same with the one I submitted in my earlier post I guess:

#############################################################
################### OFFICIAL UBUNTU REPOS ###################
#############################################################

###### Ubuntu Main Repos
deb http://fr.archive.ubuntu.com/ubuntu/ natty main restricted universe 
deb-src http://fr.archive.ubuntu.com/ubuntu/ natty main restricted universe 

###### Ubuntu Update Repos
deb http://fr.archive.ubuntu.com/ubuntu/ natty-security main restricted universe 
deb http://fr.archive.ubuntu.com/ubuntu/ natty-updates main restricted universe 
deb-src http://fr.archive.ubuntu.com/ubuntu/ natty-security main restricted universe 
deb-src http://fr.archive.ubuntu.com/ubuntu/ natty-updates main restricted universe 

##############################################################
##################### UNOFFICIAL  REPOS ######################
##############################################################

###### 3rd Party Binary Repos

#### Audacity - http://audacity.sourceforge.net/
## Run this command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys     1024R/BB901940
deb http://ppa.launchpad.net/audacity-team/daily/ubuntu natty main 

#### Chromium Project - http://code.google.com/chromium/
## Run this command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4E5E17B5
deb http://ppa.launchpad.net/chromium-daily/ppa/ubuntu natty main

Open in new window


Any further ideas?
0
 
LVL 18

Expert Comment

by:TobiasHolm
ID: 36908611
Try this /etc/apt/sources.list (from a newly installed 10.04):
#deb cdrom:[Ubuntu 10.04.3 LTS _Lucid Lynx_ - Release i386 (20110720.1)]/ lucid main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.

deb http://se.archive.ubuntu.com/ubuntu/ lucid main restricted
deb-src http://se.archive.ubuntu.com/ubuntu/ lucid main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://se.archive.ubuntu.com/ubuntu/ lucid-updates main restricted
deb-src http://se.archive.ubuntu.com/ubuntu/ lucid-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://se.archive.ubuntu.com/ubuntu/ lucid universe
deb-src http://se.archive.ubuntu.com/ubuntu/ lucid universe
deb http://se.archive.ubuntu.com/ubuntu/ lucid-updates universe
deb-src http://se.archive.ubuntu.com/ubuntu/ lucid-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://se.archive.ubuntu.com/ubuntu/ lucid multiverse
deb-src http://se.archive.ubuntu.com/ubuntu/ lucid multiverse
deb http://se.archive.ubuntu.com/ubuntu/ lucid-updates multiverse
deb-src http://se.archive.ubuntu.com/ubuntu/ lucid-updates multiverse

## Uncomment the following two lines to add software from the 'backports'
## repository.
## 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://se.archive.ubuntu.com/ubuntu/ lucid-backports main restricted universe multiverse
# deb-src http://se.archive.ubuntu.com/ubuntu/ lucid-backports main restricted universe 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 lucid partner
# deb-src http://archive.canonical.com/ubuntu lucid partner

deb http://security.ubuntu.com/ubuntu lucid-security main restricted
deb-src http://security.ubuntu.com/ubuntu lucid-security main restricted
deb http://security.ubuntu.com/ubuntu lucid-security universe
deb-src http://security.ubuntu.com/ubuntu lucid-security universe
deb http://security.ubuntu.com/ubuntu lucid-security multiverse
deb-src http://security.ubuntu.com/ubuntu lucid-security multiverse

Open in new window

0
 
LVL 18

Expert Comment

by:TobiasHolm
ID: 36908613
ahh, didn't see your last post before my last one...
0
 
LVL 18

Expert Comment

by:TobiasHolm
ID: 36908617
Can you ping security.ubuntu.com ?
0
 
LVL 18

Expert Comment

by:TobiasHolm
ID: 36908627
Try adding a line to your /etc/hosts:
91.189.92.171 security.ubuntu.com

Open in new window

0
 
LVL 5

Author Comment

by:speak2ab
ID: 36908680
At first the Ping result was
ping: unknown host security.ubuntu.com

Open in new window


After adding the line the result is now
  icmp_seq=74 Destination Host Unreachable

--- security.ubuntu.com ping statistics ---
74 packets transmitted, 0 received, +20 errors, 100% packet loss, time 149328ms

Open in new window


Thanks for your prompt responses.
AB
0
 
LVL 9

Assisted Solution

by:crazedsanity
crazedsanity earned 150 total points
ID: 36909848
@TobiasHolm: I should have been clearer about my post.  I'd intentionally misspelled the hostname to show the error and illustrate that the DNS server I was querying was listed.

It seems like there are more serious issues than just DNS.  Can the machine connect to anything inside/outside its network?  Can anything connect to it?  Consider posting the output of this command:

route -n

Open in new window

0
 
LVL 18

Expert Comment

by:TobiasHolm
ID: 36910243
Maybe this machine are blocked from the net other than through Firefox using proxy?
0
 
LVL 5

Accepted Solution

by:
speak2ab earned 0 total points
ID: 36910399
A colleague helped me to resolve this. I will try to reimplement his solution on another machine myself and let you know if it is a standard solution or just a fix for my particular case.

Summarily what he did was to create/modify a configuration file in the apt folder (apt.conf) by inserting  with the line to
acquire:: http::proxy

Open in new window


Then using gedit he added these two lines to the bash.bash.rc
export http_proxy 

Open in new window

and
export ftp_proxy

Open in new window


Apart from these, we also edited the network proxy with a bluecoat proxy set to system wide.

These are the changes we made (In reverse order) to get it finally working.

Why they worked I have not yet tried to figure out. Now I am moving to the next challenge of installing JRE6.

Some closing questions before I distribute the points: Can someone explain what happened and what the fixes mean? Secondly, my first attempts to install JRE6 has failed so if you know a working approach to get that done I will apreciate.

Thanks,
AB
0
 
LVL 18

Assisted Solution

by:TobiasHolm
TobiasHolm earned 250 total points
ID: 36910734
The fixes makes apt to use your proxy on the network.

For the second question I don't know the answer.
0
 
LVL 9

Expert Comment

by:crazedsanity
ID: 36911408
Can you be more specific about the errors you encountered when installing JRE6?
0
 
LVL 5

Author Closing Comment

by:speak2ab
ID: 36947326
Thanks
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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…

757 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now