Ubuntu 12.04 apt-get update doesn't work

Results 1 to 8 of 8
  1. #1
    Member haguiru is offline
    MemberRank
    May 2012 Join Date
    82Posts

    sad Ubuntu 12.04 apt-get update doesn't work

    Well, all the comands are working on my VirtualMachine of my computer, but yesterday I bought a host and I'm using remote connection with the Virtual Machine of the host. The version is Ubuntu 12.04, and then when I try to execute the command 'apt-get update' something like this appears :

    root@ubuntu:~# apt-get update
    Err Ubuntu security notices | Ubuntu precise-security InRelease

    Err Index of / precise InRelease

    Err Index of / precise-updates InRelease

    Err Ubuntu security notices | Ubuntu precise-security Release.gpg
    Temporary failure resolving 'security.ubuntu.com'
    Err Index of / precise-backports InRelease

    Err Index of / precise Release.gpg
    Temporary failure resolving 'br.archive.ubuntu.com'
    Err Index of / precise-updates Release.gpg
    Temporary failure resolving 'br.archive.ubuntu.com'
    Err Index of / precise-backports Release.gpg
    Temporary failure resolving 'br.archive.ubuntu.com'
    Reading package lists... Done
    W: Failed to fetch http://br.archive.ubuntu.com/ubuntu/...cise/InRelease

    W: Failed to fetch http://br.archive.ubuntu.com/ubuntu/...ates/InRelease

    W: Failed to fetch http://br.archive.ubuntu.com/ubuntu/...orts/InRelease

    W: Failed to fetch http://security.ubuntu.com/ubuntu/di...rity/InRelease

    W: Failed to fetch http://security.ubuntu.com/ubuntu/di...ty/Release.gpg Temporary failure resolving 'security.ubuntu.com'

    W: Failed to fetch http://br.archive.ubuntu.com/ubuntu/...se/Release.gpg Temporary failure resolving 'br.archive.ubuntu.com'

    W: Failed to fetch http://br.archive.ubuntu.com/ubuntu/...es/Release.gpg Temporary failure resolving 'br.archive.ubuntu.com'

    W: Failed to fetch http://br.archive.ubuntu.com/ubuntu/...ts/Release.gpg Temporary failure resolving 'br.archive.ubuntu.com'

    W: Some index files failed to download. They have been ignored, or old ones used instead.
    Then, I tried executing the command : apt-get install upgrade, but it says 0 files added and things like that.

    I tried to execute the other commands (apt-get install openssh-server , apt-get install php5, apt-get install phpmyadmin , etc), but it says:

    E: Unable to locate package phpmyadmin
    I'm pretty sure that the other commands can't be executed due to the fact that 'apt-get update' doesn't work.

    Thanks in Advance. I really need help :(


  2. #2
    Nerd-IO Romulan is offline
    MemberRank
    Feb 2009 Join Date
    BelgiumLocation
    3,333Posts

    Re: Ubuntu 12.04 apt-get update doesn't work

    Try the command:
    Code:
    ping www.google.com
    If there is something wrong, then your virtual machine don't have any access to the web :)

  3. #3
    Member haguiru is offline
    MemberRank
    May 2012 Join Date
    82Posts

    Re: Ubuntu 12.04 apt-get update doesn't work

    I tried and it said :

    unknown host Google
    It means there's no internet connection ? D:
    PS: I can acess the IP through WinSCP to view the files.

  4. #4
    Nerd-IO Romulan is offline
    MemberRank
    Feb 2009 Join Date
    BelgiumLocation
    3,333Posts

    Re: Ubuntu 12.04 apt-get update doesn't work

    Very weird... Check the gateway in your network config of your virtual machine! It must match with the IP of your router/box/whatever you use to connect to internet...

  5. #5
    Member haguiru is offline
    MemberRank
    May 2012 Join Date
    82Posts

    Re: Ubuntu 12.04 apt-get update doesn't work

    Well, this Virtual Machine is from a hoster server, therefore the IP is not from my machine , neither the gateway. I executed the following command : nano /etc/network/interfaces, and then it appeared :

    auto eth0
    iface eth0 inet static
    address 212.124.126.250
    netmask 255.255.255.224
    network 212.124.126.224
    broadcast 212.124.126.255
    gateway 212.124.126.225

  6. #6
    Account Upgraded | Title Enabled! fluxbox is offline
    MemberRank
    Sep 2004 Join Date
    KanagawaLocation
    303Posts

    Re: Ubuntu 12.04 apt-get update doesn't work

    Quote Originally Posted by haguiru View Post
    Well, this Virtual Machine is from a hoster server, therefore the IP is not from my machine , neither the gateway. I executed the following command : nano /etc/network/interfaces, and then it appeared :
    Check /etc/resolv.conf should have at least a line for your DNS server.

  7. #7
    Member haguiru is offline
    MemberRank
    May 2012 Join Date
    82Posts

    Re: Ubuntu 12.04 apt-get update doesn't work

    I opened it and it says :

    nameserver 212.124.126.225
    Is this the DNS ?

  8. #8
    Member corujaobr is offline
    MemberRank
    Jun 2012 Join Date
    BrazilLocation
    81Posts

    Re: Ubuntu 12.04 apt-get update doesn't work

    please check the file /etc/resolv.conf

    and add this nameservers google public this below.

    nameserver 8.8.8.8
    nameserver 8.8.4.4



Advertisement