Page 1 of 3 123 LastLast
Results 1 to 10 of 25

Thread: sudo: unable to resolve host

  1. #1
    Join Date
    May 2011
    Beans
    10

    Angry sudo: unable to resolve host

    Im getting the "sudo:unable to resolve host ubuntu" every time i use the sudo command, but my /etc/hostname and my /etc/hosts files match up exactly.

    applications start crashing all the time now and i dont know what to do.

  2. #2
    Join Date
    Apr 2006
    Location
    Montana
    Beans
    Hidden!
    Distro
    Kubuntu Development Release

    Re: sudo: unable to resolve host

    reboot and if the problem persists post the relevant contents of those files.
    There are two mistakes one can make along the road to truth...not going all the way, and not starting.
    --Prince Gautama Siddharta

    #ubuntuforums web interface

  3. #3
    Join Date
    May 2011
    Beans
    10

    Re: sudo: unable to resolve host

    This is my /etc/hosts file:

    Code:
    alec@ubuntu:~$ more /etc/hosts
    127.0.0.1	localhost
    127.0.1.1	ubuntu
    
    # The following lines are desirable for IPv6 capable hosts
    ::1     localhost ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    ff02::3 ip6-allhosts
    and this is my /etc/hostname file:

    Code:
    ubuntu
    and just for good measure this is what happens while trying to use apt-get:


    Code:
    alec@ubuntu:~$ sudo apt-get install sabnzbdplus
    sudo: unable to resolve host ubuntu
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    sabnzbdplus is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    1 not fully installed or removed.
    After this operation, 0 B of additional disk space will be used.
    Do you want to continue [Y/n]? y
    Setting up bcm5974-dkms (1.1.4) ...
    Loading new bcm5974-1.1.4 DKMS files...
    
    Error! Cannot locate /usr/src/bcm5974-1.1.4.dkms.tar.gz.
    File does not exist.
    dpkg: error processing bcm5974-dkms (--configure):
     subprocess installed post-installation script returned error exit status 2
    Errors were encountered while processing:
     bcm5974-dkms
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    (this error code is returned any time i try to use apt-get, and is not specific to the sabnzbd packages)

  4. #4
    Join Date
    Feb 2011
    Location
    Maryland
    Beans
    2,259
    Distro
    Ubuntu

    Re: sudo: unable to resolve host

    First thing to check is, can you ping the hostname? Ping ubuntu

    Change your hosts file to read

    Ubuntu 127.0.0.1 and try

    Why is ubuntu in your hosts file anyways?

  5. #5
    Join Date
    Dec 2008
    Location
    43° 7' 41" 131° 54' 3"
    Beans
    Hidden!

    Re: sudo: unable to resolve host

    EasyBCD.
    PrintersDatabase
    Boot Info Script: How to
    The post above and the post below suffer from the Rashomon effect!

  6. #6
    Join Date
    May 2011
    Beans
    10

    Re: sudo: unable to resolve host

    i tried to ping ubuntu, but that returned "unknown host ubuntu". and for my /etc/hosts file, what exactly do you want me to change?

  7. #7
    Join Date
    Dec 2008
    Location
    43° 7' 41" 131° 54' 3"
    Beans
    Hidden!

    Re: sudo: unable to resolve host

    Quote Originally Posted by czaravm View Post
    i tried to ping ubuntu, but that returned "unknown host ubuntu". and for my /etc/hosts file, what exactly do you want me to change?
    I suggest to read the link I gave you and attempt to just change your hostname entirely form Ubuntu. Your files you submitted are in order. Maybe a re-generation of a hostname will take.
    EasyBCD.
    PrintersDatabase
    Boot Info Script: How to
    The post above and the post below suffer from the Rashomon effect!

  8. #8
    Join Date
    May 2011
    Beans
    10

    Re: sudo: unable to resolve host

    Thanks, I tried that, but still am getting the exact same errors. I think that I will just have to reinstall ubuntu from the wubi installer.

  9. #9
    Join Date
    Apr 2005
    Beans
    603
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: sudo: unable to resolve host

    Can you post the output of "ifconfig". I'm specifically wanting to make sure you have lo (loopback) up.

  10. #10
    Join Date
    May 2011
    Beans
    10

    Re: sudo: unable to resolve host

    thanks so much for the help, here it is:
    Code:
    alec@lappy3001:~$ ifconfig
    eth0      Link encap:Ethernet  HWaddr 00:25:bc:dd:11:c8  
              inet addr:129.210.136.48  Bcast:129.210.137.255  Mask:255.255.254.0
              inet6 addr: fe80::225:bcff:fedd:11c8/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:79539 errors:0 dropped:0 overruns:0 frame:0
              TX packets:58893 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:75714550 (75.7 MB)  TX bytes:8352835 (8.3 MB)
              Interrupt:45 Base address:0xe000 
    
    eth1      Link encap:Ethernet  HWaddr 00:25:00:4d:86:86  
              inet addr:129.210.218.181  Bcast:129.210.219.255  Mask:255.255.252.0
              inet6 addr: fe80::225:ff:fe4d:8686/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:2679 errors:0 dropped:0 overruns:0 frame:63313
              TX packets:205 errors:16 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:162638 (162.6 KB)  TX bytes:33687 (33.6 KB)
              Interrupt:22 
    
    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:12 errors:0 dropped:0 overruns:0 frame:0
              TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:720 (720.0 B)  TX bytes:720 (720.0 B)

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •