I am trying to install vim in FreeNAS but when I try to use portsnap, I get "command not found".

When I tried using pck_add -r portmaster I get the following:

 pkg_add -r portmaster

Error: Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-stable/Latest/portmaster.tbz: File unavailable (e.g., file not found, no access)
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-stable/Latest/portmaster.tbz' by URL

You must be reading some very old doc, pkg_add has been gone from FreeBSD for quite a while. Instead, use pkg. And, we have good binary packages now, so there's no need install portmaster and then compile from source. Instead, just install vim directly by doing pkg install vim or if you prefer not to have the X11 version, pkg install vim-lite.

  • Here is the output from pkg install vim: [root@freenas] ~# pkg install vim The package management tool is not yet installed on your system. The mechanism for doing this is not secure on FreeBSD 9.2. To securely install pkg(8), use ports from a portsnap checkout: # portsnap fetch extract # make -C /usr/ports/ports-mgmt/pkg install clean Do you still want to fetch and install it now? [y/N]: y Bootstrapping pkg please wait _http._tcp.pkg.FreeBSD.org pkg: fail to extract pkg-static
    – Veridian
    Sep 23 '15 at 22:08
  • 1
    9.2 is no longer supported, you should upgrade to at least 9.3. Sep 24 '15 at 1:35
  • Also, I notice it looks like you're running FreeNAS. FreeNAS is great and is based on FreeBSD but it is not FreeBSD. Please tag your question as FreeNAS. Sep 24 '15 at 1:38
  • When I type uname it shows "FreeBSD"
    – Veridian
    Sep 24 '15 at 16:20
  • True and it is based on FreeBSD, but they do their own releases and change things quite a bit so it's at least fair to warn potential readers of your question of what you are actually using so that they can help you better. I don't keep up with FreeNAS so I'm not sure if they've removed pkg_add yet or not. My answer is correct for FreeBSD but may or may not be correct for FreeNAS. Sep 27 '15 at 12:19

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.