# pkg_add -r not working



## harishankar (May 5, 2010)

I have installed FreeBSD 8.0-Release and the following error is what I get when I try to install a package through pkg_add:


```
harishankar# pkg_add -r firefox
Error: Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-8.0-release/Latest/firefox.tbz: No route to host
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-8.0-release/Latest/firefox.tbz' by URL
```

I am able to connect to the internet and otherwise browse the web, but pkg_add always has trouble resolving the server. Is there any further configuration required? The handbook says something about setting the PACKAGESITE environment variable, but surely it should be able to fetch from the default server?


----------



## sverreh (May 5, 2010)

There probably is no package called just firefox. Try this command from /usr/ports and see what you get:


```
make search name=firefox display=name,path,info keylim=1
```

Then pick the one you want from the list.

Or, you can use your browser and go to ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-8.0-release/Latest/ and see which packages are available for firefox.


----------



## riku (May 5, 2010)

```
pkg_add -rv firefox3
```


----------



## graudeejs (May 5, 2010)

harishankar said:
			
		

> ```
> harishankar# pkg_add -r firefox
> Error: Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-8.0-release/Latest/firefox.tbz: [red]No route to host[/red]
> pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-8.0-release/Latest/firefox.tbz' by URL
> ```



your network is not configured properly
you need to add 

```
defaultrouter="123.123.132.123"
```
to your /etc/rc.conf
where 123.123.123.123 is your default router address

if this doesn't fix the problem, the you probably have more network related problems


----------



## harishankar (May 5, 2010)

Hi, everybody, I found the issue.

I (probably) had to set the FTP to passive mode FTP_PASSIVE_MODE=YES. Also I was having intermittent trouble with my internet connection earlier so I'm not sure which was causing the issue.

I installed he firefox35 package fine and it works now. Adding a whole lot of apps now as I speak.


----------

