Tuesday, 24 February 2015

FreeNAS and pkg

I made a home NAS for my purposes unfortunately I ran into a problem and here is the solution:

[root@stuff ~]# pkg                                                             
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                                                   
pkg: fail to extract pkg-static    

mount -o rw

Bootstrapping pkg please wait                                                   
Installing pkg-1.4.12...                                                        
Extracting pkg-1.4.12: 100%                                                     
Message for pkg-1.4.12:                                                         
 If you are upgrading from the old package format, first run:                   
  # pkg2ng                                                                      
pkg: not enough arguments                                                       
Usage: pkg [-v] [-d] [-l] [-N] [-j <jail name or id>|-c <chroot path>] [-C <conf
iguration file>] [-R <repo config dir>] [-o var=value] [-4|-6] <command> [<args>
For more information on available commands and options see 'pkg help'. 

Hope this helps someone.