1

So here is the issue, or one of them I should say. Ever since I installed Ubuntu Server 15.10 I haven't been able to connect to the internet, on that computer alone of course, even if I ping ip's they all give me Host Unreachable except for the computer itself of course. I've done many changes that I thought could help (got them online) but they didn't. Including changes to /etc/network/interfaces and therefore /etc/resolv.conf. Here's what that looks like now. (ip is different, dont know if i should show that to the public)

/etc/network/interfaces:

auto lo
iface lo inet loopback

auto enp0s25
iface enp0s25 inet static
    address 192.168.23.17
    netmask 255.255.255.0
    broadcast 192.168.23.255
    gateway 192.168.23.1

    dns-nameserver 192.168.23.17
    dns-search cortex.com

And in /etc/resolv.conf there's only one thing

nameserver 192.168.23.17

Command ifconfig appears like this:

enp0s25   Link encap:Ethernet HWaddr 00:1e:c9:70:c7:f5
          inet addr:192.168.23.17 Bcast:192.168.23.255 Mask:255.255.255.0
          inet6 addr:feB0::21e:c9ff:fe70:c7f5/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:2721 errors:0 dropped:1 overruns:0 frame:0
          TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:215574 (215.5 KB) TX bytes:1064 (1.0 KB)
          Interrupt:21 Memory:fe9e0000-fea00000

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:65536 Metric:1
          RX packets:29442 errors:0 dropped:0 overruns:0 frame:0
          TX packets:29442 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2339824 (2.3 MB) TX bytes:2339824 (2.3 MB)

Also, i cant use sudo apt-get for anything, everytime i try it it just doesnt work:

$ sudo apt-get install update
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package update

Please help me out, im going crazy. If you feel like my problem is missing some info, just request it and ill provide it no problem, but please any insight on this will help. Thank you!!

PROBLEM update: the issue has been solved, thanks to all the users that helped me solve this :) you helped a future computer scientist lol

Jorge
  • 11

4 Answers4

1

If you are using apt-get install update it will try to install the update package, which i don't think is the desired action. Try apt-get update.

Alex
  • 702
0

Surely you used sudo apt-get update?

Check your DNS/IP settings on another device connected to the same network and replicate those for this machine too. Try pinging a local network device to localize the problem. Also try a known good DNS server like 8.8.8.8

0

If you are not able to reach internet, of course, each correct (*)apt-get command will not work.
In this case you have to understand if/where it happens. Try to do the above attempts from any shell:

  • Check the Gateway: ping 192.168.23.1
    That IP is set as your Gw (gateway).
    If the machine with that IP is up and with ping port open it will answer positively.
    If not it means that it is down, with ping port closed, or it doesn't exists (the Gw IP is wrong ).

  • Check if you exit on internet: ping 8.8.8.8.
    It is a google server that currently answering to ping (google-public-dns-a.google.com).
    You can use any other ping answering machine on internet.
    If ping answers you it means you arrived to internet and the GW is correct and working.
    If works only ping 192.168.23.1 it means that the problem is between the GW and internet.
    It is still possible that 192.168.23.1 is up working but it is not your Gw.

  • Check the DNS: host www.google.com.
    If it translates the name in IP numbers the problem is the DNS that is not able to translate name in IP. Check for it and change with a working one.
    ping 192.168.23.17: if it answer negatively maybe it's down.

  • Check the repositories
    If all the above works your internet connection works, you should be able to browse internet with firefox (or lynx if you prefer :-)) and you have to check the repositories in /etc/apt/sources.list and maybe change them with a mirror set [1] or investigating what's wrong there.


(*) Note
It's possible you wrote the wrong command instead of apt-get update to update the list or apt-get -f install to fix or apt-get upgrade to upgrade the system, you write apt-get install update.
As said by Alex the package update doesn't exist and you cannot install it.
Check it with apt-cache show update...

Hastur
  • 19,483
  • 9
  • 55
  • 99
0
sudo update-initramfs -u -k all   
sudo ifdown eth0 
sudo ifup eth0
dmesg |grep -i network

This is what can be done from the hardware side of things... let us know if it worked.