# pkg_add looking in the wrong location



## abtekk (Jul 25, 2012)

Hi guys, I've just installed FreeBSD on my PPC emac and I'm trying to get pkg_add working.
If I do, for example: "pkg_add -r xorg", it returns the error:


> unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/powerpc/packages-9.0-release/Latest/xorg.tbz: File unavailable. (e.g., file not found, no access)



and I have noticed that if I got on to that FTP server, the dir packages-9.0-release doesn't exist. packages-9-stable does, however. Is this a known issue, or at least is it possible to change the pkg_add search location?


----------



## SirDice (Jul 25, 2012)

Set PACKAGESITE to the -stable package directory. You don't want to use the -release packages, they are never updated. See pkg_add(1).


----------



## abtekk (Jul 25, 2012)

SirDice said:
			
		

> Set PACKAGESITE to the -stable package directory. You don't want to use the -release packages, they are never updated. See pkg_add(1).



Thanks, just tried that. But it's still looking in the -release directory.


----------



## wblock@ (Jul 25, 2012)

Please show your command to set the variable and which shell you are using.


----------



## sw2wolf (Jul 26, 2012)

SirDice said:
			
		

> Set PACKAGESITE to the -stable package directory. You don't want to use the -release packages, they are never updated. See pkg_add(1).


How about -latest package ?


----------



## SirDice (Jul 26, 2012)

You pick the -stable package tree but set it to it's /Latest directory.

In case of confusion, use this one: ftp://ftp.freebsd.org/pub/FreeBSD/ports/powerpc/packages-9-stable/Latest/


----------



## kpa (Jul 26, 2012)

And replace powerpc with the arch of your system, e.g. amd64. The handbook could be little bit more explicit about that the -stable packages are in fact the ones you want for updating when using packages.


----------



## abtekk (Jul 26, 2012)

I managed to fix it. Thanks for your help.


----------

