FreeBSD. Change pkg_add source

Written by
Date: 2013-06-06 15:12:13 00:00

Spanish version

In FreeBSD when you want to install new software you use pkg_add you may have downloaded the package prior to the invoke of the pkg_add command. In such a case, you just enter something like this:

pkg_add lsof-4.56.4.tgz

But, you can also let pkg_add retrieve the package by you.

pkg_add -r emacs

In this case FreeBSD will look for the ftp server and the folder it already has in enviroment variables. If for some reason those variables are not properly set, you will get an error. You can adjust them using setenv.

Change pkg_add ftp server source

If all you want to change is the FTP server, use this:

setenv  PACKAGEROOT 'ftp://ftp3.FreeBSD.org'

Change the server and the path source of pkg_add

If you want to switch the server and the path, or mayby just the path, use this other command.

setenv  PACKAGESITE ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.1-RELEASE/packages/All/

Those changes are going to be temporal, unless you write them in .cshrc file.