LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   installing LAMP on Ubuntu virtual box - can't ping (https://www.linuxquestions.org/questions/linux-newbie-8/installing-lamp-on-ubuntu-virtual-box-cant-ping-4175458043/)

Juc1 04-13-2013 05:16 PM

installing LAMP on Ubuntu virtual box - can't ping
 
Hi all,

I have installed Ubuntu 12 and SSH server on my virtual box but when I try to install apache2 I get

Code:

$ sudo apt-get install apache2
Temporary failure resolving 'security.ubuntu.com'
W: Some index files failed to download, they have been ignored, or old ones used instead.
$ ping security.ubuntu.com
ping: unknown host security.ubuntu.com
$ ping www.google.com
ping: unknown host www.google.com
$


This thread says I should edit resolv.conf but my resolv.conf says do not edit =

Code:

$ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#    DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 192.168.1.1
nameserver 0.0.0.0
$

Any ideas please?

Thank you...

GlennsPref 04-13-2013 07:49 PM

Hi,
Quote:

I should edit resolv.conf but my resolv.conf says do not edit
I've been editing my resolv for years, and it usually works for this matter.

I usually add the modem/router, and first and secondary dns servers from my isp.

save it and keep a copy for later.

Code:

nameserver 10.0.0.138
nameserver 61.9.211.33
search BigPond


Juc1 04-14-2013 05:30 AM

1 Attachment(s)
Quote:

Originally Posted by GlennsPref (Post 4931107)
Hi,

I've been editing my resolv for years, and it usually works for this matter.

OK thanks but I am having trouble editing /etc/resolv.conf:
Code:

warning: changing a read only file
"/etc/resolv.conf" E166: Cannot open linked file for writing

And even if I could edit it I have read that it can be rewritten with reboot. Does this suggest an alternative to editing resolv.conf? If so I have attached what I think is the important part so can anyone please translate this ie what I need to do?

Thanks...

Juc1 04-14-2013 05:36 AM

Code:

$ cat /etc/dhcp/dhclient.conf
# Configuration file for /sbin/dhclient, which is included in Debian's
#      dhcp3-client package.
#
# This is a sample configuration file for dhclient. See dhclient.conf's
#      man page for more information about the syntax of this file
#      and a more comprehensive list of the parameters understood by
#      dhclient.
#
# Normally, if the DHCP server provides reasonable information and does
#      not leave anything out (like the domain name, for example), then
#      few changes must be made to this file, if any.
#

option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;

send host-name "<hostname>";
#send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
#send dhcp-lease-time 3600;
#supersede domain-name "fugue.com home.vix.com";
#prepend domain-name-servers 127.0.0.1;
request subnet-mask, broadcast-address, time-offset, routers,
        domain-name, domain-name-servers, domain-search, host-name,
        netbios-name-servers, netbios-scope, interface-mtu,
        rfc3442-classless-static-routes, ntp-servers,
        dhcp6.domain-search, dhcp6.fqdn,
        dhcp6.name-servers, dhcp6.sntp-servers;
#require subnet-mask, domain-name-servers;
#timeout 60;
#retry 60;
#reboot 10;
#select-timeout 5;
#initial-interval 2;
#script "/etc/dhcp3/dhclient-script";
#media "-link0 -link1 -link2", "link0 link1";
#reject 192.33.137.209;

#alias {
#  interface "eth0";
#  fixed-address 192.5.5.213;
#  option subnet-mask 255.255.255.255;
#}

#lease {
#  interface "eth0";
#  fixed-address 192.33.137.200;
#  medium "link0 link1";
#  option host-name "andare.swiftmedia.com";
#  option subnet-mask 255.255.255.0;
#  option broadcast-address 192.33.137.255;
#  option routers 192.33.137.250;
#  option domain-name-servers 127.0.0.1;
#  renew 2 2000/1/12 00:00:01;
#  rebind 2 2000/1/12 00:00:01;
#  expire 2 2000/1/12 00:00:01;
#}
 
$ cat /etc/network/interfaces
# 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 dhcp
$



All times are GMT -5. The time now is 10:42 AM.