Pre-built version of pkg could not be found on your system FreeBSD – AMD 64 bit

64-bitfreebsd

I am trying to install nano on FreeBSD using the pkg, but whenever I try to install it by using

pkg install nano

I get an error that says

pkg: Error fetching http://pkg.freebsd.org/freebsd:12:x86:64/latest/Latest/pkg.txz: Non-recoverable resolver failure A pre-built version of pkg could not be found for your system Consider changing PACKAGESITE or install it from ports: 'ports-mgmt/pkg'

I can't find any reason why that's happening and any fixes to that.
My architecture is 64-bit and the output of uname -a is

FreeBSD caleb@taylor.com 12.0-RELEASE FreBSD 12.0-RELEASE r3416664

Best Answer

By default, FreeBSD ships pkg bootstrap executable that fetches real pkg program. Your error seems to originate from wrongly configured DNS.

Check that your system can resolve DNS names:

# host google.com
# host pkg.freebsd.org

If it doesn't work, check /etc/resolv.conf file.

Related Question