I recently performed a fresh install of 10.1-RELEASE (amd/x64_86) due to a botched upgrade. It seems like I'm missing basic utilities, like pkg_add. find / -name pkg_add is returning 0 hits (even when run as root). ports and portmaster seems to be missing too (the only hit is in usr/ports/port-mgmt/portmaster, and its a directory and not a program.

When I try to run the following to boot strap it:

setenv PACKAGESITE pkg.us-east.FreeBSD.org

Results in:

pkg: Error fetching pkg.us-east.FreeBSD.org/Latest/pkg.txz: Invalid URL scheme.

But according to Official FreeBSD Binary Packages now available for pkgng its supposed to just work...

I've also tried using setting PACKAGESITE ports-mgmt/pkg; and setting PACKAGEROOT and ftp://ftp3.FreeBSD.org with no joy.

Also, this was not helpful: pkg_add: command not found. It does not seem to be a path problem because it cannot be found with find.

Why was a package manager not installed by default? Or why does it not work (am I doing something obviously wrong)???

How do I install the basic packages, like pkg_add?

Sorry about the basic question. pkg_add is what I use to install packages, so I'm a bit lost when its missing.

  • Most of these issues were resolved by fixing /etc/resolv.conf. It had a bogus nameserver listed. I'm not sure what went wrong here because I clearly did not add that 172.16.*.* address. pkg_add is still missing. So I cant install emacs, and I'm stuck with that miserable vi (for the moment). – jww May 28 '15 at 22:14

FreeBSD 10 uses the new Packagetool pkg instead of pkg_add.

See https://www.freebsd.org/doc/handbook/pkgng-intro.html

| improve this answer | |

pkg install pkg and let it bootstrap / upgrade itself. Then use pkg install foo, etc. pkg_add does not exist anymore, as you've found out.

I will second https://www.freebsd.org/doc/handbook/pkgng-intro.html .

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.