# How to install pkg with no internet access



## timmy_p (Jul 20, 2015)

Hey!
I don't have Internet access on the machine I have FreeBSD on, when I try pkg(7) it asks if I want to install it for the first time but it then fails as it can't connect but suggests I install it from ports-mgmt/pkg

If I go to /usr/ports/ports-mgmt and run `./pkg` I get permission denied, even though I'm root.

Probably a simple way around this right?

Thanks for the help.


----------



## junovitch@ (Jul 20, 2015)

You'll have to get it from a machine that does have internet access.  Alternately, you can check the install media.  With a DVD the pkg.txz will be there.  I can't remember if it is on a CD.

`fetch http://pkg.FreeBSD.org/freebsd:10:x86:64/latest/Latest/pkg.txz
tar xvf pkg.txz
usr/local/sbin/pkg-static add pkg.txz`


----------



## timmy_p (Jul 21, 2015)

Thanks for the help!


----------

