# Unable to install a package with pkg install



## sblooga (Oct 15, 2022)

Hello,
I'm on FreeBSD V 12.4 with Truenas Core TrueNAS-12.0-U8.1

```
pkg upgrade -f
Updating local repository catalog...
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 local repository
Error updating repositories!
```
I tried everything but I still get the same message?
What I would like to do!
After my Nextcloud backup with rclone, I would like to send an email with the log file attached.
So, I tried to install the mail or mutt package to send an email with an attachment.
Thank you for your help  Have a nice day Richard


----------



## Emrion (Oct 15, 2022)

FreeBSD and TrueNAS are somewhat different beasts. You'd better ask this on the TrueNAS forum.
A good reading: https://forums.freebsd.org/threads/ghostbsd-pfsense-truenas-and-all-other-freebsd-derivatives.7290/


----------



## W.hâ/t (Oct 15, 2022)

You need to create a repo pkg-repo(8) or just use 'pkg add'


----------



## sblooga (Oct 16, 2022)

Emrion said:


> FreeBSD and TrueNAS are somewhat different beasts. You'd better ask this on the TrueNAS forum.
> A good reading: https://forums.freebsd.org/threads/ghostbsd-pfsense-truenas-and-all-other-freebsd-derivatives.7290/


Thanks for your reply Emrion,
As I start with TrueNas which is under FreeBSD I told myself that I will have a faster and more detailed answer on the FreeBSD forum  Even if the environment is different the kernel remains the same! I will try my luck on the Truenas forum. Thank you have a good day Richard


----------



## sblooga (Oct 16, 2022)

W.hâ/t said:


> You need to create a repo pkg-repo(8) or just use 'pkg add'


Thanks for your answer W.hâ/t,
As I am new to TrueNas and FreeBSD I thought I would get a quicker and more detailed answer. I read the doc thank you for the link but as I start I do not understand!
I did pkg add -f but it asks me to add other parameters?
  Thank you have a good day Richard


----------



## W.hâ/t (Oct 16, 2022)

For pkg install/update/upgrade to work. You need to create a repository.
You can refer to the EXAMPLES section of pkg-repo(8)

pkg-add(8) lets you install a pkg without creating the repository.
	
	



```
pkg add /path/to/mypkg.pkg
```


----------

