Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 25

Thread: sudo: unable to resolve host

  1. #11
    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
    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.
    There's no reason to install WUBI......if your going to reinstall do a standard reinstall and pay attention during setup when it ask you to name your host (computername)and give it a name instead of letting setup choose.
    EasyBCD.
    PrintersDatabase
    Boot Info Script: How to
    The post above and the post below suffer from the Rashomon effect!

  2. #12
    Join Date
    May 2011
    Beans
    10

    Re: sudo: unable to resolve host

    yeah, but i did this install using wubi, is it possible to just wipe the virtual disk and install a new 11.04 distro over it?

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

    Re: sudo: unable to resolve host

    I can't advise about WUBI. I don't use it. I would recommend to install Ubuntu in its own partition as you will get the full benefit without these WUBI-centric problems.I would also advise installing a more stable release than 11.04.
    Last edited by jtarin; May 10th, 2011 at 11:04 AM.
    EasyBCD.
    PrintersDatabase
    Boot Info Script: How to
    The post above and the post below suffer from the Rashomon effect!

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

    Re: sudo: unable to resolve host

    It is an odd problem. My only other thought would be to check in network manager and make sure the hostname is set there as well.
    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

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

    Re: sudo: unable to resolve host

    Quote Originally Posted by czaravm View Post
    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.

    I figured this out for you.

    First do this command

    Code:
    cat /etc/hostname
    Copy the output of the hostname

    Code:
    sudo nano /etc/hosts
    I just tested on mine, making the hostname and hosts file entry different. It messes up sudo. This will make sure your hosts file matches the hostname and get you up and going

  6. #16
    Join Date
    Feb 2007
    Location
    Romania
    Beans
    Hidden!

    Re: sudo: unable to resolve host

    I had the same issue on a fress oneiric install. Solved it by editng my hosts file to:
    Code:
    127.0.0.1	localhost.localdomain 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
    Don't ask me why, but it worked.

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

    Re: sudo: unable to resolve host

    The OP posted the contents of /etc/hostname and /etc/hosts in post #3 and they match.
    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

  8. #18
    Join Date
    Nov 2007
    Location
    London, England
    Beans
    7,714

    Re: sudo: unable to resolve host

    How about the contents of /etc/resolv.conf - maybe it's not using the /etc/hosts file?

  9. #19
    Join Date
    Nov 2010
    Beans
    271
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: sudo: unable to resolve host

    the problem is, I think , with the /etc/resolve.conf file.
    edit the file with
    Code:
    sudo nano /etc/resolve.conf
    and add the namesevers of your service provider like this:
    Code:
    nameserver 192.168.1.1
    replace the ip address with the nameserver address given by your service provider.

  10. #20
    Join Date
    Nov 2007
    Location
    London, England
    Beans
    7,714

    Re: sudo: unable to resolve host

    or maybe the problem is with /etc/nsswitch.conf - this says whether to even use /etc/resolv.conf. If it helps, this is the contents of my nsswitch.conf:
    Code:
    # /etc/nsswitch.conf
    #
    # Example configuration of GNU Name Service Switch functionality.
    # If you have the `glibc-doc-reference' and `info' packages installed, try:
    # `info libc "Name Service Switch"' for information about this file.
    
    passwd:         compat
    group:          compat
    shadow:         compat
    
    hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4
    networks:       files
    
    protocols:      db files
    services:       db files
    ethers:         db files
    rpc:            db files
    
    netgroup:       nis

Page 2 of 3 FirstFirst 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
  •