How to install unrar (or other packages) on FreeNAS 9.10 (For FreeNAS 11, please read comments)
FreeNAS disables the default pkg repositories on the underlying FreeBSD.
In order to enable this, edit the file below using your favorite editor
/usr/local/etc/pkg/repos/FreeBSD.conf
and change the text from
FreeBSD: {
enabled: no
}
to
FreeBSD: {
enabled: yes
}
Then, run pkg update
, and pkg install unrar
run unrar e filename.rar
as a regular user (not root)
remember to go back and undo the changes to FreeBSD.conf
7 thoughts on “How to install unrar (or other packages) on FreeNAS 9.10 (For FreeNAS 11, please read comments)”
I’m getting errors when i try pkg install unrar
Fetching pkg-1.10.1.txz: 100% 3 MiB 591.5kB/s 00:05
Checking integrity… done (0 conflicting)
[1/1] Upgrading pkg from 1.8.8 to 1.10.1…
[1/1] Extracting pkg-1.10.1: 100%
Updating FreeBSD repository catalogue…
Repo “FreeBSD” upgrade schema 2013 to 2014: DROP TABLE pkg_search;
FreeBSD repository is up to date.
Updating local repository catalogue…
pkg: Repository local load error: access repo file(/var/db/pkg/repo-local.sqlite) failed: No such file or directory
pkg: file:///usr/ports/packages/meta.txz: No such file or directory
repository local has no meta file, using default settings
pkg: file:///usr/ports/packages/packagesite.txz: No such file or directory
Unable to update repository local
Error updating repositories!
Please see the next post, I have explained it on how to install it on Freenas 11 U3.
Hi Raj
Tried this and got the following error:
Updating local repository catalogue…
pkg: file:///usr/ports/packages/meta.txz: No such file or directory
repository local has no meta file, using default settings
pkg: file:///usr/ports/packages/packagesite.txz: No such file or directory
Unable to update repository local
Running freenas 11 U3
Any ideas?
Hp Peter,
On 11 U3, it gets tricky.
I was able to get unrar by doing the following.
First of all, I did this in a jail that I had deployed – Plexmediaserver. But you can do this in any jails.
Login to your jail
root@freenas:~ # jls
JID IP Address Hostname Path
2 plexmediaserver_1 /mnt/Vol2_SSD/jails_2/plexmediaserver_1
root@freenas:~ # jexec 2
Then, you can do the following inside the jail
wget http://pkg.freebsd.org/freebsd:11:x86:64/latest/All/unrar-5.50b4,5.txz
pkg install unrar-5.50b4,5.txz
rehash
which urar
This will give you the location of unrar installed in the jail., you will use this to create an alias on Freenas install
exit
alias unrar /mnt/Vol2_SSD/jails_2/plexmediaserver_1/usr/local/bin/unrar
Where /mnt/Vol2_SSD/jails_2/plexmediaserver_1/ is the jail location
and
/usr/local/bin/unrar is the response to the ‘which unrar’ question
Hope that helps!
Really simple fix for FreeNAS 11.
Disable the local cache and enable FreeBSD.
set this to enabled: no /usr/local/etc/pkg/repos/local.conf
set this to enabled: yes/usr/local/etc/pkg/repos/FreeBSD.conf
boom, you’re installing packages
Thanks Warren for the update!
You just saved my life!