Ubuntu: Why Can't Ubuntu Server 16.04 Update After Install



Question:

I am brand new to Ubuntu and Ubuntu Server. My aim is to set up a Plex media server using Ubuntu Server 16.04 LTS. Ubuntu has been successfully installed on my system which has a hard wired internet connection but I keep getting errors and "Failed to fetch..." prompts after executing command "sudo apt-get update". Even after restarting the system and/or powering off and restarting, the issue remains.

I also tried to ping Google.com using "ping -c3 www.google.com" but I get the response "unknown host www.google.com" so not sure if there might be a network issue (see attached image for errors and other issues mentioned).

[Image showing command line errors][1]

I've done quite a bit of scouring but can't seem to find a solution. I am also new to the CLI, so any help would be much appreciated.

EDIT:

I had initially set up my server with a static IP but was getting no internet connection. As per instruction from @Joel to get a new IP address from my router, a new IP was obtained by updating the Network Interfaces file using the VI Editor (command: sudo vi /etc/network/interfaces) and changing the primary network interface back to 'dhcp' from 'static' (iface enp3s0 inet dhcp).

After rebooting I was successfully able to ping 8.8.8.8 (Google) and thus perform updates.

Big thanks to @joel and @f35 for your support.


Solution:1

You can try changing the DNS-server your server is using. To do that type in the following command:
nano /etc/network/interfaces
and add the following line (or change it if it's already there) :
dns-nameserver 8.8.8.8 8.8.4.4
Now your server should use the Google dns server (but of cause you can use any other dns server you want)

EDIT: Now that you have shown the result of ping 8.8.8.8 its looks like your pc is not connected to the internet. You can try to get a new ip-adress from your router by typing sudo dhclient -r eth0 If this still does not work you can try assigning you pc a static ip-adress.


Solution:2

Is ping 8.8.8.8 working ?

If no, it means you have a network configuration problem.

Show us the result of

  • ifconfig -a
  • netstat -rn

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »