View Full Version : [SOLVED] Hardy Update
chrismine
November 15th, 2007, 01:38 AM
I cannot do any updates after yesterdays updates.
Update manager shows 11 updates available and then when I try to do the updates is just hangs.
When I try sudo apt-get update it gives me unable to resolve host ubuntu without even asking for my password.
My Internet is working.
Synaptic also does not start.
Any suggestions?
Breakage has started it seems!
23meg
November 15th, 2007, 03:52 AM
Any suggestions?
Wait until Alpha 1.
chrismine
November 15th, 2007, 08:00 AM
Ok but I assume I must download the ISO.
Is there no other way to fix this, because I do not have a lot of bandwith.
I started with Gutsy Tribe 5 and the idea is to end up with Hardy without reloading OS. So far I managed to do that.
This is a machine setup for Linux for me to learn and work with it so it is not a big deal.
Thanks.
ccw
November 15th, 2007, 08:21 AM
Ok but I assume I must download the ISO.
Is there no other way to fix this, because I do not have a lot of bandwith.
I started with Gutsy Tribe 5 and the idea is to end up with Hardy without reloading OS. So far I managed to do that.
This is a machine setup for Linux for me to learn and work with it so it is not a big deal.
Thanks.
what are the outputs of "apt-get -s upgrade" and "apt-get -s dist-upgrade"?
23meg
November 15th, 2007, 08:35 AM
You probably won't need to download the ISO; just install all updates as soon as Alpha 1 is out.
ccw
November 15th, 2007, 08:47 AM
When I try sudo apt-get update it gives me unable to resolve host ubuntu without even asking for my password.
Please provide your /etc/apt/sources.list
chrismine
November 15th, 2007, 04:35 PM
You probably won't need to download the ISO; just install all updates as soon as Alpha 1 is out.
Thanks but as I see it I cannot update because the terminal will not let me update with sudo apt-get upgrade nor the Software Sources GUI - maybe chrooting an option or will it also not work - never done it before.
chrismine
November 15th, 2007, 04:37 PM
Please provide your /etc/apt/sources.list
Oops cannot because of this error:
chrisjan@ubuntu:~$ sudo gedit /etc/apt/sources.lst
sudo: unable to resolve host ubuntu
chrismine
November 15th, 2007, 04:39 PM
what are the outputs of "apt-get -s upgrade" and "apt-get -s dist-upgrade"?
Error!
chrisjan@ubuntu:~$ sudo apt-get -s upgrade
sudo: unable to resolve host ubuntu
chrisjan@ubuntu:~$ sudo apt-get -s dist-upgrade
sudo: unable to resolve host ubuntu
chrisjan@ubuntu:~$
Seems I am stuck now!!!!!!
plun
November 15th, 2007, 05:38 PM
Have you tried another Ubuntu server ?
Meny System > Administration > Software Sources
eremini
November 15th, 2007, 07:58 PM
Do you have a root password set? That will allow you to do su and then avoid sudo's b0rkness.
My guess is that you need to edit /etc/hosts
and change
127.0.0.1 localhost
to
127.0.0.1 localhost ubuntu
elanthis
November 16th, 2007, 12:12 AM
Gotta love the blind leading the blind...
Check your /etc/hosts, /etc/resolv.conf, and /etc/hostname files. Possibly also your /etc/sudoers file. If these are indeed broken, you'll probably have to reboot into single user mode to fix them, since your sudo is toasted.
Sounds like your system used to be called 'ubuntu' and now isn't, and sudo is doing a host check when you attempt to use it. e.g., you might have a line like the following in your /etc/sudoers file:
%admin ubuntu=(ALL) ALL
That "ubuntu" should probably be set to ALL.
chrismine
November 16th, 2007, 05:22 AM
Do you have a root password set? That will allow you to do su and then avoid sudo's b0rkness.
My guess is that you need to edit /etc/hosts
and change
127.0.0.1 localhost
to
127.0.0.1 localhost ubuntu
Thankyou everybody for your responses - luckily I had a root password set and also setup to login to root GUI - made the change in /etc/hosts file:
127.0.0.1 localhost
127.0.0.1 ubuntu
#127.0.1.1 ubuntu.MSHOME
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
The commented line was the problem. Seems everything working again!
What a way to learn Linux - between me and the community we can solve anything!!!!!!!!
Downloading today's updates - let's see what breaks next.
This is fun!
pmolaughlin
December 3rd, 2007, 01:59 PM
I am having this problem as well (after upgrading to Hardy) but unfortunately I don't think I set a root password. Is there anything I can do?
chrismine
December 3rd, 2007, 02:45 PM
I do not know if this may work - try Alt+F2 to get the run box and type sudo nautilus - then navigate to the hosts file and change it.
If not working I cannot help.
Hopefully a better Ubuntu Guru seet his post and comes to the rescue.
eremini
December 3rd, 2007, 07:48 PM
But sudo is br0ken thats the whole problem :P
But, you can run boot from a live cd then edit the required file from there.
g2g591
December 9th, 2007, 10:43 PM
same problem same solution (except I hapened to have a root terminal open before I updated sudo and found its borkness, so I didn't have to use a live cd)
head_victim
December 10th, 2007, 06:20 PM
Thankyou everybody for your responses - luckily I had a root password set and also setup to login to root GUI - made the change in /etc/hosts file:
127.0.0.1 localhost
127.0.0.1 ubuntu
#127.0.1.1 ubuntu.MSHOME
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
The commented line was the problem. Seems everything working again!
What a way to learn Linux - between me and the community we can solve anything!!!!!!!!
Downloading today's updates - let's see what breaks next.
This is fun!
Thanks for your help solving this issue. I didn't have a password set up for root to log into the gui but it's really easy to fix now you've provided the fix for this fault (I had the exact same one). All you need to do if you don't have a root password is to reboot into recovery mode which already has an option to drop you into a root terminal. You can then just edit the /etc/hosts file without needing sudo or a root password.
ronacc
December 10th, 2007, 11:10 PM
a handy thing to have when you are testing is a puppy linux cd, boot puppy and you can mount any drive on your system and poke around and edt etc from the comfort of a gui ;)
Lord Illidan
January 11th, 2008, 02:19 AM
I had this problem too..applied fix /etc/hosts
ravs53
February 23rd, 2008, 07:43 PM
Just type gksudo and use open gedit using your existing password. Then open the /etc/hosts file to edit and you are done.
Gina
February 24th, 2008, 04:19 PM
I have the same problem with sudo - have checked /etc/hosts and it looks fine to me...127.0.0.1 localhost
127.0.1.1 laptop-hardy.mshome
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
chrismine
February 24th, 2008, 04:24 PM
I have the same problem with sudo - have checked /etc/hosts and it looks fine to me...127.0.0.1 localhost
#127.0.1.1 laptop-hardy.mshome
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
Comment out the line as shown.
Gina
February 24th, 2008, 04:27 PM
OK, I'll try that - thanks :)
A minute later... Oh dear - now gksudo gedit /etc/hosts is just sitting there doing nothing. I'll boot into Gutsy and edit it from there.
Gina
February 24th, 2008, 04:46 PM
Taken that line out and returned to Hardy - no difference - sudo still produces the same error :(
Any other suggestions?
chrismine
February 24th, 2008, 05:07 PM
127.0.0.1 localhost laptop-hardy
#127.0.1.1 laptop-hardy.mshome
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
Sorry I recheked my hosts file and if you add it as shown on the first line it should be allright.
Gina
February 24th, 2008, 05:36 PM
Solved it - and found an easier way to edit hosts.
System > Administration > Network ... Network Settings dialog Hosts tab - Add or Delete.
I now have
127.0.0.1 localhost
127.0.1.1 laptop-hardy
etc.
PROBLEM SOLVED!
Thank you everyone for your help - you pointed me into the problem area. The line in question WAS required but should not have had .mshome on the end
mellowdave
March 10th, 2008, 10:06 PM
I was having the same problem, didnt spend much time on fixing it, but I then came on here and found this thread. WHo would have thought that on a linux box, the GUI would have been easier...
HA!
SOLVED here too.
swegner
March 11th, 2008, 10:24 PM
Hello all,
I just wanted to chime in as well. I received this error with the latest Hardy alpha 6 today. I used the GUI method described above and all is well now.
Do we know yet what the cause of this is? I did install some updates today, but I know I've used sudo between then and now. Is there an open bug for this?
mabovo
March 11th, 2008, 10:35 PM
Another solution is to rename in /etc/hostname :
from: laptop-hardy
to: laptop-hardy.mshome
ExZacly
April 15th, 2008, 11:55 PM
You can also fix this through the GU.
Go to System--> administrattion --> Network --> Hosts
Then unlock system and edit hosts from here.
vBulletin® v3.7.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.