# pkg_add -r xorg stuck



## machinariumer (Jun 7, 2011)

Hi folks.

I am a newbie to FreeBSD. Today I have installed FreeBSD-8.2 under VMware Workstation 7.0. I used the disc1 image, not the dvd image. After successful installation, I was ready to install X11. I entered *pkg_add -r xorg* according to the handbook, but it stuck when fetching the xorg-doc package. 

Firstly I thought that it was because of the network condition, however I could get the xorg-doc package on another machine using The Firefox browser. Hours later it still stuck there. . So is there a solution that make the pkg_add work quickly?  Thanks in advance. 

Best Regards

Jfhu


----------



## SirDice (Jun 7, 2011)

Just break it off and try again.


----------



## machinariumer (Jun 7, 2011)

SirDice said:
			
		

> Just break it off and try again.


Thanks for your reply. 
I have tried more than ten times.  And the installation still stuck there. So weird.


----------



## da1 (Jun 7, 2011)

Try:

```
pkg_add -vr xorg
```
 to see a verbose output of what really happens.

Alternatively, you could do "CTRL+T" to see what is the process doing at the time of "the stuck" or any any other time, for that matter.


----------



## machinariumer (Jun 7, 2011)

da1 said:
			
		

> Try:
> 
> ```
> pkg_add -vr xorg
> ...


Thanks for your reply. Now I tried *pkg_add -vr xorg*. The output was some messages about the ftp connections saying the command connection and data connection was established. Then a line of "Fetch http://..../xorg.doc.." shown, and stuck there. After using 'CTRL +T', the output says that the process is waiting. No useful information. Is there anything to do with the FTP Protocol?


----------



## SirDice (Jun 7, 2011)

machinariumer said:
			
		

> Is there anything to do with the FTP Protocol?


Yes, if you are behind a firewall you probably need to set *FTP_PASSIVE_MODE*.


----------



## machinariumer (Jun 8, 2011)

SirDice said:
			
		

> Yes, if you are behind a firewall you probably need to set *FTP_PASSIVE_MODE*.


Thanks for your reply. Actually, it has already used the PASSIVE MODE, I can see 'Entering passive mode...' when I use the 
	
	



```
pkg_add -rv xorg
```


----------



## machinariumer (Jun 10, 2011)

OK, I have searched a post which said it was caused by VMware Workstation 7.0. Now I will try another virtual machine Virtual Box. I will give the experience after using it.


----------



## machinariumer (Jun 11, 2011)

OK, I have used VirtualBox 4.0.8 to install FreeBSD-8.2, and the pkg_add command works properly. It never stuck for more than two minutes (I guess). But I still don't know why FreeBSD-8.2 installed under VMware has this annoying problem.


----------



## ikreos (Jun 11, 2011)

I also had/have a similar problem with pkg_add getting stuck like that on a non virtual system. From what I could tell pkg_add pipes the download directly into bsdtar, so it's uncompressing/untarring it directly from the download connection instead of downloading the package entirely then untarring it. So if the connection drops, bsdtar just sits there waiting for data it's not going to get. A workaround I did was just download the package and its dependencies directly and then install it without the -r switch. Ports don't have this problem so I stick to those since my system is fast enough.


----------



## machinariumer (Jun 12, 2011)

To ikreos:
Thanks for your reply. I just think that downloading a package's full dependencies is quite challenging. By the way, in my FreeBSD under VMware Workstation [cmd=]make install clean[/cmd] has also sticking problem using Ports.


----------



## ikreos (Jun 29, 2011)

I've never had a problem with ports freezing. They might stall because my connection dropped but it usually picks right back up when my connection is re-established.


----------

