# pkg_add broken? o_O



## Crestfallen (May 6, 2009)

Hello. I'm using FreeBSD 7.1-Release

```
FreeBSD Crestfallen.InNominee 7.1-RELEASE FreeBSD 7.1-RELEASE #0: Thu Jan  1 14:37:25 UTC 2009     root@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
```
And i have such a problem... Today, i wanted to install compiz-fusion on my desktop. Some ports required for it doesn't want to compile, so i decided to get packages from FreeBSD 7.2-Release. In my console i entered :

```
setenv PACKAGESITE ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-7.2-release/Latest/
```
and then 

```
pkg_add -r compiz-0.8.2
```
But.. Then was such error :

```
Error: FTP Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-7.2-release/All/compiz-0.8.2.tbz: Syntax error, command unrecognized
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-7.2-release/All/compiz-0.8.2.tbz' by URL
```
And the same happened with every package i tried to install.. I thought, that maybe problem with 7.2 release packages.. But when i rebooted, nothing happened =( So, now i can't use pkg_add anymore =( help me please.

P.s. Sorry my bad english.


----------



## anomie (May 6, 2009)

It may be that fetch(1) is broken or is somehow receiving invalid parameters. Try using fetch to get yahoo.com's index page or something. Any clues there? 

Also, let's see the output of `# pkg_add -rv compiz-0.8.2` 

(Please put the output in code tags.) 

If that's not helpful, you may be troubleshooting this with truss(1).


----------



## SirDice (May 6, 2009)

Lose the version numbers if you're grabbing from /Latest:

```
pkg_add -r compiz
```


----------



## Crestfallen (May 7, 2009)

Thanks to all )
I don't know how, but now it works =)
I think, it may be my gateway's issue.. Who knows ) 

*2 anomie, SirDice*
If it will happen one more time, i'll try your advices =)

Thank's for you attention )


----------



## Henu (Jul 17, 2009)

I also had problem with fetch and someone at #freebsd instructed me to use environment variable FTP_PASSIVE_MODE that solved my problem.


----------



## SirDice (Jul 17, 2009)

Henu said:
			
		

> I also had problem with fetch and someone at #freebsd instructed me to use environment variable FTP_PASSIVE_MODE that solved my problem.


You need it if you're behind a router (NAT).


----------

