# Package environment errors



## sossego (Mar 3, 2012)

Variables set as $USER and root

```
set env PACKAGESITE=http://freebsd-powerpc-9-0-current-updated-packages.googlecode.com/files/
```


```
set env PACKAGEROOT=http://freebsd-powerpc-9-0-current-updated-packages.googlecode.com/files/
```


```
pkg_add firefox-3.6.18,1
pkg_add:can't stat package file 'firefox-3.6.18,1'
```


----------



## Beastie (Mar 3, 2012)

You're installing from the local machine. Use the *-r* option to tell it to fetch from the remote repository.

I'm not sure it will work though because this GoogleCode website doesn't seem to have the proper directory hierarchy. But I might be wrong about this requirement.


----------



## T-Daemon (Mar 3, 2012)

It is "setenv" for csh and related shells and no "=" between name and value.


----------



## sossego (Mar 3, 2012)

I've just asked the googlecode project about a solution.

```
wget -r $CODE_REPO
```
What I haven't set is the r value.


----------



## Beastie (Mar 3, 2012)

sossego said:
			
		

> I've just asked the googlecode project about a solution.
> 
> ```
> wget -r $CODE_REPO
> ...


Something is wrong here. First you were asking about pkg_add(1) and now you're talking about ftp/wget. The first one is a FreeBSD base system utility for retrieving packages from a package repository (using the fetch(3) library) and the second is a third-party utility for downloading any file from a remote location. The pkg_add(1)'s *-r* option tells it to use a remote repository (located at *PACKAGESITE*) while ftp/wget's *-r* option tells it to turn on recursive retrieving (i.e. all files in a hierarchy).


----------



## sossego (Mar 4, 2012)

When the pkg_add utility did not work, I decided to use wget followed by curl. To my understanding, all three binaries work in a similar fashion. Pkg_add was used with the full path; and, the error that resulted was a 404 not found. PACKAGESITE, PACKAGEROOT, and PKG_PATH were given the entire path, resulting in a similar error.. The variables were set for both root and $USER. Taking all of the results into consideration, I reported what happened to Google code. Following my inquiry, a core member contacted  suggesting a feature request, and I did such.

I did use *wget -r* to start fetching packages as a group; yet, after seeing that the packages were not downloading, wget was stopped with CTRL+C.


----------



## kpa (Mar 4, 2012)

`$ pkg_add -nvr package` to see what path pkg_add(1) is using. The -n flag means 'dry run', don't actually install anything.


----------



## sossego (Mar 5, 2012)

I have ftp://ftp.freebsd.org/pub/FreeBSD/ports/powerpc/packages-9-current/
while ftp://ftp.freebsd.org/pub/FreeBSD/ports/powerpc/packages-9-stable/ is the path given to me through the ports mailing list.


Trying
	
	



```
echo $SHELL
```
 after 
	
	



```
setenv PACKAGSITE=$PATH
```
did not work showed 
	
	



```
csh
```
 and I decided to do a search.

http://www.freebsd.org/doc/handbook/shells.html







Pretty much sums up my reaction to me.


----------



## SirDice (Mar 5, 2012)

sossego said:
			
		

> ```
> setenv PACKAGSITE=$PATH
> ```
> did not work


Remove the = sign. It's


```
setenv PACKAGESITE http://www.freebsd.org/......
```


----------

