# Having an issue installing any packages in FreeBSD on VM



## eriksatie (May 20, 2011)

-----installing FreeBSD 8.2 64bit on VMWare virtual machine 

Ok, so I edited the .cshrc to auto download from an ftp closer to me and it seems like whatever package that I try to download I get a bunch of "failed" errors and "cannot find package" errors.  I guess some things are downloaded since I see "Done" a few times but for the most part I just keep getting pages and pages of errors and fails.

Anyone know what the problem could be?

Thanks


----------



## adamk (May 20, 2011)

How about showing us exactly what command you are running, what you edited in your .cshrc file, and exactly what errors you are getting


----------



## eriksatie (May 20, 2011)

Ok, so to change the ftp location I wrote:
[CMD=]echo 'setenv PACKAGEROOT ftp://ftp1.us.freebsd.org' >> .cshrc[/CMD]

I actually added this same command but mistakingly wrote "setenev" instead of setenv but I don't know how to edit it out so I just wrote over it. Then to install things I wrote [CMD=]pkg_add -r xorg[/CMD]

and the errors I get are numerous, I will try to take a screenshot. What happens is these errors just keep coming page after page and it seems like it never stops.







I don't know how to scroll up to show the other errors or how to copy and paste them but this is part of it - if you can tell me how to scroll up I can show you the other errors.


----------



## eriksatie (May 20, 2011)

To change the ftp location I entered;

`$ echo 'setenv PACKAGEROOT [url]ftp://ftp8.us.freebsd.org[/url]' >> .cshrc`

Before that I entered the same command but instead of "setenv" I entered "setenev" and I didn't know how to edit it out so I just wrote over it with the command above.

To install packages I wrote;

`$ pkg_add -r xorg`

The I get pages and pages of messages telling me things failed, here is an example;


----------



## wblock@ (May 20, 2011)

Press Scroll Lock and use the up/down arrows and Page Up/Page Down to scroll.  Also see Using script(1) to capture console output.


----------



## eriksatie (May 20, 2011)

wblock said:
			
		

> Press Scroll Lock and use the up/down arrows and Page Up/Page Down to scroll.  Also see Using script(1) to capture console output.



Thank you, but I'm using a virtual machine how do I get the text file on my main computer? I can ssh login into my FreeBSD machine from my machine, will that help? And for some reason after I *cd* to the directory I want, when I enter *make* it says 
	
	



```
Make: no target to make.
```

Any ideas?

Thanks


----------



## adamk (May 20, 2011)

Are you running pkg_add as a regular user?

Adam


----------



## eriksatie (May 20, 2011)

adamk said:
			
		

> Are you running pkg_add as a regular user?
> 
> Adam



I tried to run it as a regular user and as root - no difference.


----------



## adamk (May 20, 2011)

Well the screenshot appears to be from when you tried it as a normal user, which isn't going to work.  We'd need to see the errors from when you tried as root.

Adam


----------



## eriksatie (May 20, 2011)

Ah, I do get a different error message.  

Also, it appears that I put two different ftp locations on root and my regular user.

Take a look:


----------



## wblock@ (May 20, 2011)

eriksatie said:
			
		

> Thank you, but I'm using a virtual machine how do I get the text file on my main computer? I can ssh login into my FreeBSD machine from my machine, will that help?



Yes, use scp(1).



> And for some reason after I *cd* to the directory I want, when I enter *make* it says
> 
> 
> 
> ...



Without details, it's impossible to say.  What directory?  What were you trying to make?


----------



## adamk (May 20, 2011)

Can you ping ftp1.us.freebsd.org?


----------



## eriksatie (May 20, 2011)

wblock said:
			
		

> Yes, use scp(1).
> 
> 
> 
> Without details, it's impossible to say.  What directory?  What were you trying to make?




I followed the exact instructions from your tutorial but instead of typing: `# # cd /usr/ports/www/links`

I typed: `# cd /home/stark` which is my home folder thingy. 

When I ssh into my virtual machine where can I save the output file to on my main machine?


----------



## eriksatie (May 20, 2011)

adamk said:
			
		

> Can you ping ftp1.us.freebsd.org?



No, I get 
	
	



```
ping: cannot resolve ftp1.us.freebsd.org: Unknown host
```


----------



## adamk (May 20, 2011)

Sounds like your networking isn't working then.  Did you setup bridged or NAT networking in vmware?  Did you do any configuration of network devices during sysinstall?

Adam


----------



## eriksatie (May 20, 2011)

adamk said:
			
		

> Sounds like your networking isn't working then.  Did you setup bridged or NAT networking in vmware?  Did you do any configuration of network devices during sysinstall?
> 
> Adam



I set up bridged and I configured the main network device on my laptop when it asked me about it.  I didn't do the IPV6 (I think that's what it's called) but I configured the DHCP because I was following this tutorial and that's what it said to do.

Maybe I need to configure that IPV6?


----------



## wblock@ (May 20, 2011)

eriksatie said:
			
		

> I followed the exact instructions from your tutorial but instead of typing: `# # cd /usr/ports/www/links`
> 
> I typed: `# cd /home/stark` which is my home folder thingy.



That's what make(1) does when there's no Makefile.  What were you trying to do?



> When I ssh into my virtual machine where can I save the output file to on my main machine?



Can't say without knowing what operating system is on the host.  If it's Windows, install Cygwin and scp.  Then run a shell through Cygwin and use scp to copy the remote file on the VM to the host.


----------



## eriksatie (May 20, 2011)

wblock said:
			
		

> That's what make(1) does when there's no Makefile.  What were you trying to do?
> 
> 
> 
> Can't say without knowing what operating system is on the host.  If it's Windows, install Cygwin and scp.  Then run a shell through Cygwin and use scp to copy the remote file on the VM to the host.



I was trying to do as you suggested and capture my console output to a textfile so I could be able to copy and paste it to the forums.


----------



## eriksatie (May 20, 2011)

Well, I have made a new installation of FreeBSD using the default ftp location and it seems like everything is working fine.  I will use this one and test what was wrong on my other installation myself.

Thank you all for your help.


----------



## wblock@ (May 20, 2011)

eriksatie said:
			
		

> I was trying to do as you suggested and capture my console output to a textfile so I could be able to copy and paste it to the forums.



That's an example.  After running the script command, output is being captured.  Then start doing what was failing (*pkg_add -r xorg*), and all output will be captured.


----------



## eriksatie (May 20, 2011)

wblock said:
			
		

> That's an example.  After running the script command, output is being captured.  Then start doing what was failing (pkg_add -r xorg), and all output will be captured.



Ah, I see now.

Thank you :beergrin


----------

