Install a package manager in FreeBSD 10

5,043

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
Share:
5,043

Related videos on Youtube

user3007554
Author by

user3007554

Updated on September 18, 2022

Comments

  • user3007554
    user3007554 almost 2 years

    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?

    • plas
      plas about 10 years
      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.
    • user3007554
      user3007554 about 10 years
      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
      user3007554 about 10 years
      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]"
    • plas
      plas about 10 years
      Then install it.
    • user3007554
      user3007554 about 10 years
      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.
    • Chipster
      Chipster about 10 years
      I know this sounds rudimentary, but check your available disk space on your volume(s).
    • user3007554
      user3007554 about 10 years
      there is plenty of disk space as i have newly installed this os
    • plas
      plas about 10 years
      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.
    • user3007554
      user3007554 about 10 years
      it may be that.
    • user3007554
      user3007554 about 10 years
      found out that pkg needs to get an update. So managed to get access to internet and updates pkg. now it works fine.