digiMoot:

FreeNAS: No Packages Available to Install Have Been Found in the Repositories

FreeNAS: No Packages Available to Install Have Been Found in the Repositories
If you create a jail in FreeNAS via the Plugin interface, then often the ability to pull from larger FreeBSD repositories is disabled. This would mean that you can not install common and useful packages such as nano or openVPN tools in the jail you want to and would generate the command line errors similar to the following:

pkg: No packages available to install matching 'nano' have been found in the repositories
pkg: No packages available to install matching 'openvpn' have been found in the repositories

The good news is that if you encounter this problem it is relatively easy to fix by allowing the FreeNAS jail to access the general FreeBSD repositories and comes down really to editing one configuration file and as such even inexperienced users should be able easily fix this. This post will quickly walk you through how to allow the pkg command to access the larger FreeBSD repositories to install common and useful packages.

This article is part of my series of FreeNas setup, configuration and install articles.

Ensure the ‘pkg’ Installer is Installed in Your Jail

First, in the shell of the jail you are trying to install these packages within run pkg update. This will ensure that the pkg package management system is installed within the jail.

Edit the ‘pkg’ Config File for Your Jail

Second, we will need to edit the config file for the pkg package management system to ensure that it is allowed to pull from the larger FreeBSD repositories. As we don’t have a good text editor installed in within the jail (I use nano) we will have to do this from the shell of the over all FreeNAS system. So lets enter that shell by selecting the ‘Shell’ option on the bottom of the menu on the left hand side of the FreeNas web interface.

Once in the shell, we are going to enter the following command where [jailname] is the name of your jail and [datasetname] is the name of your dataset:

nano /mnt/[datasetname]/iocage/jails/[jailname]/root/usr/local/etc/pkg/repos/FreeBSD.conf

Now change the line within this file to:

FreeBSD: { enabled: yes }

Press Ctrl-x to save with the same file name and allow it to overwrite.
Once back to the shell you can now type exit to exit the shell.

Install Packages in Your Jail

Finally, lets go back to the command line of our jail. You should now be able to use the pkg installer to install all the packages in the FreeBSD repositories such as

pkg install nano
pkg install openvpn

That’s it! You should be able to install all of the FreeBSD packages from your jail now.

~Raze42

Liked it? Take a second to support digiMoot on Patreon!

4 thoughts on “FreeNAS: No Packages Available to Install Have Been Found in the Repositories

Leave a Reply

Your email address will not be published. Required fields are marked *