1
I recently just updated my /etc/network/interfaces
file to set a static IP address. Seems other computers can access the computer using the network IP address but I may have broken something - now apt-get update
and apt-get install ...
give me the following:
Err ...//jp.archive.ubuntu.com precise Release.gpg
Temporary failure resolving 'jp.archive.ubuntu.com'
Err http://security.ubuntu.com precise-security Release.gpg
Temporary failure resolving 'security.ubuntu.com'
Err ...//jp.archive.ubuntu.com precise-updates Release.gpg
Temporary failure resolving 'jp.archive.ubuntu.com'
Err ...//jp.archive.ubuntu.com precise-backports Release.gpg
Temporary failure resolving 'jp.archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch ...//jp.archive.ubuntu.com/ubuntu/dists/precise/Release.gpg Temporary failure resolving 'jp.archive.ubuntu.com'
W: Failed to fetch ...//jp.archive.ubuntu.com/ubuntu/dists/precise-updates/Release.gpg Temporary failure resolving 'jp.archive.ubuntu.com'
W: Failed to fetch ...//jp.archive.ubuntu.com/ubuntu/dists/precise-backports/Release.gpg Temporary failure resolving 'jp.archive.ubuntu.com'
W: Failed to fetch ...//security.ubuntu.com/ubuntu/dists/precise-security/Release.gpg Temporary failure resolving 'security.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
As another simple test I tried `ping www.yahoo.com` and it told me host not found (but works fine on another computer on the same router).
Does anyone know what I may have entered wrongly in /etc/network/interfaces
? (I'm assuming it's there, not sure how to check though)
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address ...
netmask ...
network ...
broadcast ...
gateway ...
# This is an autoconfigured IPv6 interface
iface eth0 inet6 auto
(... I've set addresses)
Or another way to check what I may have set wrongly (as mentioned, I set to static IP for eth0 - setting address, gateway, subnet etc). Thanks
UPDATE:
I've added the following to my /etc/networking/interfaces file:
auto eth0
iface eth0 inet auto static
.
.
.
dns-nameservers 192.168.24.1
Btw, this is DNS I get when I do nm-tool
. It seems like an internal IP address, is this the right IP address for my DNS settings here?
..anyway when I then try to /etc/init.d/networking restart
I get the following errors:
/etc/init.d/networking restart
* Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces
* Reconfiguring network interfaces... ifdown: failed to open lockfile /run/network/.ifstate.lock: Permission denied
ifup: failed to open lockfile /run/network/.ifstate.lock: Permission denied
Also I'm unable to do ping
or nslookup
too (maybe that's obvious though to a non-beginner unlike myself :)
what does your
interfaces
file look like? – None – 2014-04-15T13:00:58.487I've updated my post – Martyn – 2014-04-15T13:02:55.293
Are you running /etc/init.d/networking restart as
root
? – mtak – 2014-04-16T08:56:31.380Ah! Thank you. Sorry, I'm very new to stuff like this (although I should have noticed that). That's it all working now, I was able to run
apt-get update
no problem. – Martyn – 2014-04-16T09:04:25.807