You are not logged in.

#1 2013-03-10 14:01:27

BlackSnowflake
Member
Registered: 2013-03-10
Posts: 6

could not resolve host (nil); Unknown error

Trying to install arch linux into virtualbox...
I got it to boot and everything, got my internet set up (I think), installed virtualbox guest stuff, and then had to reboot.
I try to do sudo pacman -S xorg-twm xorg-xclock xterm so that I can test X before installing a desktop enveiroment..
It then asks me for my password, the Y/N thing, etc.
And then I get a whole bunch of lines saying "error: failed retrieving file [filename] from [somewhere] : could not resolve host (nil); Unknown error"
And after that it says error: failed to commit transactions (download library error)

I follow this guide (http://wideaperture.net/blog/?p=3851), I am currently right above step 17.
Anyone knows what to do? I'm installing Arch Linux for the first time so I'm a total newbie.

Offline

#2 2013-03-10 15:12:20

John0000
Member
Registered: 2012-04-12
Posts: 40

Re: could not resolve host (nil); Unknown error

Hello,

BlackSnowflake wrote:

got my internet set up (I think)

Try

ping google.com

and check for replies.
Also, what is the output of

ip addr

?

EDIT : quote from you link :
To set the the hostname, create the file ‘/etc/hostname’ in nano with the following command:

    # nano /etc/hostname

This will bring up a blank file in nano.  Type your hostname as the only line in the file.  Then quit to the command line in the usual way, saving your changes as you go.

Did you do this correclty ? Check with

 cat /etc/hostname

Last edited by John0000 (2013-03-10 15:14:42)

Offline

#3 2013-03-10 15:16:29

BlackSnowflake
Member
Registered: 2013-03-10
Posts: 6

Re: could not resolve host (nil); Unknown error

ping google.com gives me "ping: unknown host google.com"
It's kind of hard for me to give the output of ip addr because I can't take a screenshot (for some reason my print screen key does nothing (even when virtualbox isn't running) but that is an issue for another time) and I can't copy it...

Offline

#4 2013-03-10 15:27:44

BlackSnowflake
Member
Registered: 2013-03-10
Posts: 6

Re: could not resolve host (nil); Unknown error

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisk noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scop host
valid_lft forever preffered_lft forever
2: enp0s3: <BROADCAST,MULTICAST> mtu 1500 qdisk noop state DOWN qlen 1000
link/ether 08:00:27:9d:1a:5b brd ff:ff:ff:ff:ff:ff

Done. I had to look at the thing, memorise a bit, and then type it here, but this is the output of ip addr

Last edited by BlackSnowflake (2013-03-10 15:28:01)

Offline

#5 2013-03-10 15:27:49

John0000
Member
Registered: 2012-04-12
Posts: 40

Re: could not resolve host (nil); Unknown error

Alright so this is apparently network related.
I'm not expert but first I would make sure you have an hostname set up :

 cat /etc/hostname

Then try to (re)start dhcpcd :

systemctl restart dhcpcd 

And check again with

ping google.com

.
Look at the logs also

journalctl

You can make screeshot in virtualbox with 'Host+E' , 'Host' being the right 'Ctrl' key is you didn't change it.

Offline

#6 2013-03-10 15:31:12

BlackSnowflake
Member
Registered: 2013-03-10
Posts: 6

Re: could not resolve host (nil); Unknown error

Checked for the hostname, had that setup.
Did sudo systemctl restart dhcpcd (it gave me an acces denied error without sudo) and retried, same thing.
journalctl told me "Showing user generated messages only. Users in the group "adm" can see all messages. pass -q to turn this notice off"
EDIT: host + E did nothing. I tried pasting my clipboard in GIMP (because that's how screenshots work with windows, even though I use linux mint ATM) and nothing happened, suggesting there is no image copied.

Last edited by BlackSnowflake (2013-03-10 15:32:52)

Offline

#7 2013-03-10 15:39:00

John0000
Member
Registered: 2012-04-12
Posts: 40

Re: could not resolve host (nil); Unknown error

Type journalctl with sudo, then push the end key to go at the last messages.

The guide you followed said :

sudo systemctl enable dhcpcd@eth0.service

But with rescent archlinux changes, as you said with the result of 'ip addr', the base name of ethernet device has changed to enp0s3, maybe that's why you don't have the network. First disable the previous command :

sudo systemctl disable dhcpcd@eth0.service

Then enable with the right name

sudo systemctl enable dhcpcd@enp0s3.service

Either way, paste here the logs of journalctl (just type if you see some errors) after doing a

sudo systemctl restart dhcpcd

We never know, but have you checked your ethernet cable is plugged in?

For the screenshots, when I'm in virtualbox and do left ctrl+e, a window pop up to save the .png...

Offline

#8 2013-03-10 15:40:01

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,503

Re: could not resolve host (nil); Unknown error

BlackSnowflake wrote:

...
2: enp0s3: <BROADCAST,MULTICAST> mtu 1500 qdisk noop state DOWN qlen 1000
link/ether 08:00:27:9d:1a:5b brd ff:ff:ff:ff:ff:ff

The network is down.

# ip link set enp0s3  up
# dhcpcd enp0s3

Should get you going.  If so, then we will work through how to get it to start automatically.

One other thing.  How is your virtual machine's network configured?  Bridged, NAT, or Host Only?

Last edited by ewaller (2013-03-10 15:40:42)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#9 2013-03-10 15:49:24

BlackSnowflake
Member
Registered: 2013-03-10
Posts: 6

Re: could not resolve host (nil); Unknown error

I tried all that, still the same problem when trying to do "ping google.com"
Will post the errors of journalctl that are at the end
0s3: sendmsg: Cannot assign requested adress is the only red thing I'm getting
EDIT: restarted the VM, everything is fixed now! THANKS!

Last edited by BlackSnowflake (2013-03-10 15:51:00)

Offline

#10 2013-03-10 15:58:42

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,503

Re: could not resolve host (nil); Unknown error

Do you have it starting automatically, or do you want to work on that?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#11 2013-03-10 16:08:17

BlackSnowflake
Member
Registered: 2013-03-10
Posts: 6

Re: could not resolve host (nil); Unknown error

Well I suppose that I have it starting automaticly if it works when I completely restart the VM. I will be back here if that's for some reason not the case.
Currently installing Gnome desktop, otherwise I would check.
EDIT: Everything works now, succesfully installed Gnome desktop, then removed it, then installed xfce, and internet is working.
I'm probably gonna try move it out of virtualbox later, but that's an issue for another time.

Last edited by BlackSnowflake (2013-03-10 17:11:52)

Offline

Board footer

Powered by FluxBB