Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

How to install memcached and redis (pkg updating fails)

KrisStaf88

Neophyte
Joined
Dec 10, 2017
Messages
5
Hi,

I use :
FreeNAS-9.10.2-U6 (561f0d7a1).
FreeBSD 10.3-STABLE (FreeNAS.amd64)
I login as a root by putty.

I want to have Gogs or Gitlab on my freeNas, but installation ins't a simple, as other plugins in jail. Both gogs or gitlab needs to update package-s to install additional stuff like: memcached and redis by command:
[root@freenas] /# /usr/sbin/pkg install -y memcached redis


Of course, above inst possible, because there is no packages. So I'm tying to update a pkg and I got (logs bellow).
Could you help me with it ?

[root@freenas] /# /usr/sbin/pkg update -f
Updating FreeBSD repository catalogue...
Fetching meta.txz: 100% 944 B 0.9kB/s 00:01
Fetching packagesite.txz: 100% 6 MiB 1.5MB/s 00:04
Processing entries: 100%
FreeBSD repository update completed. 27001 packages processed.
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!





Bellow are other stuff, that I tried do, and may help to find a solution.

[root@freenas] ~# /usr/sbin/pkg update
Updating FreeBSD repository catalogue...
pkg: Repository FreeBSD load error: access repo file(/var/db/pkg/repo-FreeBSD.sqlite) failed: No such file or directory
Fetching meta.txz: 100% 944 B 0.9kB/s 00:01
Fetching packagesite.txz: 100% 6 MiB 2.0MB/s 00:03
Processing entries: 100%
FreeBSD repository update completed. 27001 packages processed.
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!



[root@freenas] /var/db/pkg# ls
./ FreeBSD.meta local.sqlite
../ local.meta repo-FreeBSD.sqlite



[root@freenas] /# grep url /etc/pkg/FreeBSD.conf
url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly",
 

KrisStaf88

Neophyte
Joined
Dec 10, 2017
Messages
5
Hi, thank you for advice!
I used/changed to "YES" in second line only. The first directory I have not changed (is YES too).
 

visualblind

Newbie
Joined
Feb 14, 2019
Messages
3
After spending more time with FreeNAS, I've learned it is strongly advised against enabling the FreeBSD repo directly on the host operating system. If you want to install third party applications via the BSD repo, it is recommended to create a jail and do your work in there.
 
Last edited:

cunningorb

Member
Joined
Feb 5, 2018
Messages
58
Noob here, where is the file telling freenas jail where to update packages?
*Edit: if it's supposed to be here: /etc/pkg/FreeBSD.conf then it does not exist in my jail. This is a nextcloud jail created when I ran the danb35 NC install script.
 
Top