LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-13-2013, 06:16 PM   #1
Juc1
Member
 
Registered: Sep 2011
Location: UK
Posts: 78

Rep: Reputation: 0
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...

Last edited by Juc1; 04-13-2013 at 06:27 PM.
 
Old 04-13-2013, 08:49 PM   #2
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Posts: 3,366
Blog Entries: 33

Rep: Reputation: 216Reputation: 216Reputation: 216
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

Last edited by GlennsPref; 04-13-2013 at 08:57 PM.
 
Old 04-14-2013, 06:30 AM   #3
Juc1
Member
 
Registered: Sep 2011
Location: UK
Posts: 78

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by GlennsPref View Post
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...
Attached Thumbnails
Click image for larger version

Name:	resolvconf.jpg
Views:	13
Size:	139.8 KB
ID:	12317  
 
Old 04-14-2013, 06:36 AM   #4
Juc1
Member
 
Registered: Sep 2011
Location: UK
Posts: 78

Original Poster
Rep: Reputation: 0
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
$
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Issue faced while installing Linux in virtual machine in Oracle virtual box ravisingh1 Linux - Virtualization and Cloud 5 04-07-2013 11:42 AM
[SOLVED] Ping from Vmware host to Virtual Box host greatcyrus Linux - Virtualization and Cloud 7 03-09-2011 03:03 AM
Ubuntu in virtual box mick463 Linux - Newbie 1 07-30-2008 12:45 PM
Help With Virtual Box on Ubuntu 7.10 Felpipe Ubuntu 2 10-28-2007 06:01 PM
Installing XP on Virtual Box in Ubuntu 7.04 Neo-Leper Linux - Software 6 07-23-2007 02:56 PM


All times are GMT -5. The time now is 04:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration