2

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 [email protected] 12.0-RELEASE FreBSD 12.0-RELEASE r3416664

3
  • I incorporated your answers into the question.
    – zx485
    Mar 9, 2019 at 21:25
  • Non-recoverable resolver failure As @arrowd says, you need to set up DNS.
    – Jim L.
    Apr 30, 2019 at 17:33
  • I encountered this on FreeNAS 11.2 by failing to check VNET during jail creation, resulting in a jail with no network access
    – Hamy
    Dec 20, 2019 at 20:38

1 Answer 1

2

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.

You must log in to answer this question.