# using pkg_upgrade in jails



## Klinki (Aug 18, 2013)

I am in the transition to manage and update my ports with the excellent how to : HOWTO: keeping FreeBSD's base system and packages up-to-date.

With my host system everything is working as expected but when *I* try to update my jails with `pkg_upgrade` from the sysutils/bsdadminscripts I get the following errors:


```
âžœ  ~  pkg_upgrade -a -C
fstat: /dev/mem: No such file or directory
fstat: /dev/mem: No such file or directory
/usr/local/sbin/pkg_upgrade: cannot create /dev/tty: No such file or directory
/usr/local/sbin/pkg_upgrade: cannot create /dev/tty: No such file or directory
```

devfs for the jail is allowed

```
export jail_name_devfs_enable="YES"
export jail_name_devfs_ruleset="devfsrules_jail"
```

While searching for a solution I found a bug report describing exactly my situation from 2010.

What can I do to solve my problem with pkg_upgrade used in jails?


----------

