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?

Jeff Schaller
  • 67,283
  • 35
  • 116
  • 255
  • 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 Apr 12 '14 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? – user3007554 Apr 12 '14 at 14:31
  • Yes. Is portmaster installed? You can do 'portmaster -L|grep pkg' to see if pkg is installed. – Rob Apr 12 '14 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]" – user3007554 Apr 12 '14 at 14:36
  • Then install it. – Rob Apr 12 '14 at 14:39
  • I have alredy said that i have got no acess to internet. If i choose "yes" then it tries to download the file from its repos and then install it. – user3007554 Apr 12 '14 at 14:39
  • I know this sounds rudimentary, but check your available disk space on your volume(s). – Chipster Apr 12 '14 at 14:40
  • there is plenty of disk space as i have newly installed this os – user3007554 Apr 12 '14 at 14:42
  • Well, I double checked and pkg is the default so I'm wondering if you messed it up by trying to install it from source. Check the man page to see how to get it to install things from the DVD. – Rob Apr 12 '14 at 14:44
  • it may be that. – user3007554 Apr 12 '14 at 14:45
  • 1
    found out that pkg needs to get an update. So managed to get access to internet and updates pkg. now it works fine. – user3007554 Apr 16 '14 at 15:30

2 Answers2

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
plonk
  • 218
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.