2

I was trying to install a package using pkg add, but I got the reply that

package manager not installed

To install that I used:

tar -C /tmp -zvxf pkg-1.2.1_1.txz

and then:

/tmp/usr/local/sbin/pkg-static pkg-1.2.1_1.txz

It worked out for the first time. But when I rebooted my PC I got an error:

error exit delayed from previous errors

How to install package manager from FreeBSD installation DVD now?

11
  • I may be wrong but isn't "pkg" standard install on FreeBSD10? I don't use packages, only ports but you shouldn't be installing the package manager that way. Instead you should use ports or the current package manager.
    – Rob
    Commented Apr 12, 2014 at 14:28
  • Even i am not sure of "pkg" being standad installation. But when i dont have the acess to internet installing from the DVD is the only option, no? Commented Apr 12, 2014 at 14:31
  • Yes. Is portmaster installed? You can do 'portmaster -L|grep pkg' to see if pkg is installed.
    – Rob
    Commented Apr 12, 2014 at 14:32
  • I know wether pkg is installed or not because whenever i try to install xorg using "pkg add xorg-7.7.txz" i get a reply that "package manager not installed. Do you want to install it [Yes/No]" Commented Apr 12, 2014 at 14:36
  • 1
    found out that pkg needs to get an update. So managed to get access to internet and updates pkg. now it works fine. Commented Apr 16, 2014 at 15:30

2 Answers 2

1

If you have an internet connection, you can install pkg using pkg bootstrap. This invokes pkg-static, fetches and installs the package manager as a binary package.

If you do not want to install a binary package, you can go ahead and build ports-mgmt/pkg from the ports tree (http://www.freshports.org/ports-mgmt/pkg):

cd /usr/ports/ports-mgmt/pkg  # adjust to where your ports tree is
make install
0

You just need

tar -C / -zvxf pkg-1.2.1_1.txz

Yes, remove the tmp from the path. Because everything in /tmp will be delete after rebooting.

So when you extract the package to / , the file will reside in:

/usr/local/sbin/pkg-static

And it will work.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .