# pkg_add not working?



## neilms (Feb 7, 2013)

I installed the latest stable release 9.1 and find that I cannot download any packages.
What the devil is going on now?


----------



## neilms (Feb 7, 2013)

I got the answer.


----------



## cpm@ (Feb 7, 2013)

neilms said:
			
		

> I got the answer.



Are you sure? :e


----------



## wblock@ (Feb 7, 2013)

When you find an answer, please post a summary or link to help others with the same problem.


----------



## jjennings089 (Feb 7, 2013)

There was a security issue; and 9.1 packages have been temporarily removed.

What worked for me.

vi Edit /root/.cshrc  adding:

```
setenv PACKAGESITE "[url=ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-stable/Latest/]ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-stable/Latest/[/URL]"
```

*Note* I have AMD64 in my path edit appropriately.

Log out and back in. pkg_add -r (package)

More info on packages in the handbook chapter 5

More info on vi


----------



## wblock@ (Feb 7, 2013)

Don't log out, just use rehash.


----------



## neilms (Feb 7, 2013)

I did not know there was a workaround. Like a fool I am trying to build gnome from source.


----------



## neilms (Feb 7, 2013)

wblock@ said:
			
		

> Don't log out, just use rehash.



Rehash did not work. I had to reboot the system


----------



## wblock@ (Feb 7, 2013)

"Did not work" tells very little.  rehash just refreshes the list of commands seen by csh(1) so there isn't a mistaken Command not found. error.


----------



## neilms (Feb 7, 2013)

jjennings089 said:
			
		

> There was a security issue; and 9.1 packages have been temporarily removed.
> 
> What worked for me.
> 
> ...



BEWARE I did this and found it causes package inconsistencies that cannot be resolved
Sure pkg_add "works" but it does not work properly now. Just try and install emacs.


----------



## jjennings089 (Feb 7, 2013)

Odd... emacs just installed fine on my box.

What are your errors?


----------



## neilms (Feb 7, 2013)

That's strange. Are you sure you have a working install of emacs 24?


----------



## neilms (Feb 7, 2013)

jjennings089 said:
			
		

> Odd... emacs just installed fine on my box.
> 
> What are your errors?



It is obvious that if you attempt to install a package from an old repository (latest 9) onto a system with newer binaries (9.1), it will fail due to multiple files not being the correct version. And that is not the only problem with your solution. I installed gnome2. Yes, it installs ok - but it will not work.

I can only conclude that the method that you have described in your solution is incomplete.


----------



## neilms (Feb 7, 2013)

neilms said:
			
		

> I did not know there was a workaround. Like a fool I am trying to build gnome from source.



There is no workaround that works at the moment. Packages are not available for 9.1 period.


----------



## gentoobob (Feb 7, 2013)

neilms said:
			
		

> There is no workaround that works at the moment. Packages are not available for 9.1 period.



Build your own from source...

http://forums.freebsd.org/showthread.php?t=4581


----------



## wblock@ (Feb 7, 2013)

neilms said:
			
		

> It is obvious that if you attempt to install a package from an old repository (latest 9) onto a system with newer binaries (9.1), it will fail due to multiple files not being the correct version.



Not quite.  Continued compatibility is the reason there are different versions of FreeBSD; the ABI remains "stable".  Packages built for 9-STABLE or 9.1-RELEASE will work on 9.0-RELEASE.  Where there are problems is in installing packages and then trying to install newer ones that are built against other application libraries and such.  There are some ways around that, but someone who uses packages will have to comment on those.


----------



## wblock@ (Feb 7, 2013)

neilms said:
			
		

> There is no workaround that works at the moment. Packages are not available for 9.1 period.



The "Latest" packages do work, I used a couple last night.  Make sure you are getting the right type (i386 or amd64) and be aware that you may have to upgrade packages that were installed earlier to have the right dependencies for the new ones.


----------



## cpm@ (Feb 7, 2013)

If you are interesting to install from packages, consult latest archives from freebsd-questions mailing list. Recommended to use current packages.

```
setenv PACKAGESITE "ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/<architecture>/packages-current/Latest/"
```


----------



## jwele (Feb 8, 2013)

cpu82 said:
			
		

> If you are interesting to install from packages, consult latest archives from freebsd-questions mailing list. Recommended to use current packages.
> 
> ```
> setenv PACKAGESITE "ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/<architecture>/packages-current/Latest/"
> ```



This worked like a charm.


----------

