# Installing pkgs on 9.0



## balanga (Apr 7, 2019)

I'm trying to follow some old guide which builds FreeBSD but this guide only seems to work on FreeBSD 9.0 which I have now installed, but I would like to install a few pkgs. How could I do that? I realise that pkg() did not exist at the time of 9.0  so I presume I would need to use `pkg_add` but how would I tell pkg_add where to look? I don't see anything like an /etc/pkg/FreeBSD.conf...

The pkgs which were available for 9.0 are available here  so how would I go about retreiving them?


----------



## Vull (Apr 7, 2019)

You can download the packages to your hard drive just by clicking on the webpage links. `pkg_add` works with the package files so you shouldn't need to fetch them using /etc/pkg/FreeBSD.conf. There's a drop-down list on the FreeBSD website's manual page which allows you to select any version of FreeBSD you like and look up the commands. For example: https://www.freebsd.org/cgi/man.cgi....0-RELEASE+and+Ports&arch=default&format=html


----------



## T-Daemon (Apr 7, 2019)

balanga said:


> I presume I would need to use  pkg_add but how would I tell pkg_add where to look? I don't see anything like an /etc/pkg/FreeBSD.conf...


`pkg_add -r ‘package name’`

"The example above would download the correct package and add it without any further user intervention. If you want to specify an alternative FreeBSD Packages Mirror, instead of the main distribution site, you have to set the PACKAGESITE environment variable accordingly, to override the default settings.", from Handbook 9.0-RELEASE, 5.4.1 Installing a Package.

"The environment variable PACKAGESITE specifies an alternate location for
*pkg*_*add* to    fetch from.  This variable subverts the    automatic directory
     logic that    *pkg*_*add*    uses when the *-r* option    is invoked.  Thus it should be
     a complete    URL to the remote package file(s)." , from pkg_add (1) 9.0-RELEASE

More documentation for past releases: https://docs.freebsd.org/doc/

EDIT:
If you are planning setting PACKAGESITE to the repository you mentioned in your post:

/root/.cshrc

```
setenv PACKAGESITE ftp://ftp.fi.freebsd.org/pub/FreeBSD/releases/amd64/9.0-RELEASE/packages/Latest/
```


----------



## SirDice (Apr 8, 2019)

PKGNG packages for 9.x do exist though. But I don't know which version, it looks like 9.3. 



			Index of /FreeBSD:9:amd64/
		


Note that these are NEVER updated. They're "frozen" in time.


----------



## getopt (Apr 8, 2019)

SirDice 
In the past we had a wise Forum-Administrator who did setup * and followed* this rule:


 *FreeBSD versions that are behind the currently supported versions, a.k.a. "EoL" or "End-of-Life" versions*
 For FreeBSD versions that match *[1]*, we strongly encourage users asking for help with these version to upgrade to a _supported_ FreeBSD version _before anything else_, because it is quite likely that your problem is actually caused by running an outdated version. Moreover, unsupported versions must be considered _unsafe_, because they no longer receive security updates. As such, these versions can be considered a liability and a point of failure in your network.

 We prefer *not* to encourage any further use of these unsupported versions. If you are not at liberty to upgrade to a supported version, you may still receive a reply to your question, but you must be prepared for continuous pressure from fellow users and forums staff to upgrade to a supported version. Moreover, some users may not feel like participating in topics that deal with unsupported versions at all. So be prepared for a lack of replies.


----------



## SirDice (Apr 8, 2019)

getopt said:


> In the past we had a wise Forum-Administrator who did setup * and followed* this rule:


I was waiting on you to pick up the slack


----------



## balanga (Apr 8, 2019)

SirDice said:


> PKGNG packages for 9.x do exist though. But I don't know which version, it looks like 9.3.
> 
> 
> 
> ...



The thing is that certain Wiki pages are also 'frozen in time' so that if you want to follow an old guide for building something, you need to recreate the original environment that existed at the time of the guide. Often it does not specify under which version of FreeBSD a build was done and even build instructions change... for example

```
# mkdir -p $DESTDIR
# make installworld TARGET_ARCH=arm
# make distrib-dirs TARGET_ARCH=arm
# make distribution TARGET_ARCH=arm
```

I am not really aware of what `make distrib-dirs` does and when it was used, or if it is still used.


----------

