# FreeBSD 9.1 - problem with pkg_add



## Horos (Sep 1, 2013)

I recently installed FreeBSD 9.1-RELEASE/i386. I have a problem, pkg_add doesn't work. I read that the packages for this release are available again, as announced here.

I checked that the variable PACKAGESITE contains the correct address (ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-9.1-release/), but I always get the error that the files do not exist. And the network connection is functional, I checked this. What is the problem?

I do not want to install packages from -STABLE, as suggested somewhere on the forum. I want to install the packages for -RELEASE, because it should work. It's very frustrating. I'm trying to use FreeBSD, but it is hard this way.

Advice?


----------



## Beeblebrox (Sep 1, 2013)

How are you starting the command? Try `pkg_add -riv <pkg-name>` , where <pkg_name> should NOT include origin (see man page). This means for example, use `pkg_add -riv firefox` and not `pkg_add -riv www/firefox`.
Go to that link you posted for PACKAGESITE in your browser. Does the package actually exist under Latest? If not, and the package exists elsewhere (other FTP site), you can manually fetch the package and do a `pkg_add /path/tofile/pkg-ver.tbz` to install from a local downloaded repository.
If these fail, post error output why this fails.


----------



## SirDice (Sep 2, 2013)

Horos said:
			
		

> I do not want to install packages from -STABLE, as suggested somewhere on the forum.


Why not?



> I want to install the packages for -RELEASE, because it should work. It's very frustrating. I'm trying to use FreeBSD, but it is hard this way.


Don't install the -RELEASE packages. They were built when the release came out and are never updated. Installing them means you're installing old software that possibly contains various security issues.


----------



## Horos (Sep 2, 2013)

@Beeblebrox, thank you very much! Your answer gave me a clue. I changed the URL to: ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-9.1-release/*Latest/*. The change bolded. That worked.

@SirDice: I do not want packages from -STABLE because I do not know if they will work on -RELEASE. You think it works that way? It's hard to FreeBSD. I want to update my system with freebsd-update, but I understand that it only works on -RELEASE.

I misunderstood? Maybe I should stay on Debian stable, which works perfectly - this is not a praise, just an observation. But I want to go with FreeBSD.


----------



## SirDice (Sep 2, 2013)

Horos said:
			
		

> @SirDice: I do not want packages from -STABLE because I do not know if they will work on -RELEASE. You think it works that way? It's hard to FreeBSD. I want to update my system with freebsd-update, but I understand that it only works on -RELEASE.



There's a difference between the base OS and ports/packages. They are separate entities. freebsd-update only updates the base OS. It does nothing for ports or packages. The -STABLE packages should work fine on your -RELEASE.


----------



## Horos (Sep 2, 2013)

I already installed some packages from -RELEASE (in fact, xorg and xfce4). 

Now what to do? I understand that I have to change the PACKAGESITE variable to the -STABLE (can you give me the correct URL?), but then what to do with packages already installed? Deleting them?


----------



## Beastie (Sep 2, 2013)

Horos said:
			
		

> Now what to do? I understand that I have to change the PACKAGESITE variable to the -STABLE (can you give me the correct URL?)


You can freely "browse" the FTP server, you know?!  So the STABLE package repository is:

```
ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-9-stable/Latest
```



			
				Horos said:
			
		

> but then what to do with packages already installed? Deleting them?


Yes, remove everything (`# pkg_delete -a`) and then reinstall from the STABLE repository.


----------



## SirDice (Sep 3, 2013)

It's probably best to delete them all, that'll save you from a lot of dependency headaches.


----------

