# Problem with PKG_TMPDIR



## cebra (Dec 2, 2012)

Hi everybody,

I have a OS FreeBSD 9.0-RELEASE and I wanted to install a DHCP package but I have an error message: 

```
pkg_add: find_play_pen: can't find enough temporary space to extract the files, please set your PKG_TMPDIR environment variable to a location with at least 0 bytes free..
```

My directory is almost empty, I don't understand...


----------



## Beastie (Dec 2, 2012)

Make sure PKG_TMPDIR is really defined within the environment under which you're running *pkg_add*:
`# echo $PKG_TMPDIR`

Make sure there _really_ is enough space on the partition where "PKG_TMPDIR" is located.
`# df -h `echo $PKG_TMPDIR``

The compressed package may seem small, but once extracted it may be many times bigger.


----------



## cebra (Dec 2, 2012)

Fist, thank you for your answer, so I tried :
`# echo $PKG_TMPDIR`

but I have this message:

```
Undefined variable
```
but how define it ?


----------



## Beastie (Dec 2, 2012)

By default root uses the C shell, so environment variables get defined like this:
`# setenv PKG_TMPDIR /some_location`

And to make sure it remains defined when you log out or reboot you add that line to /root/.cshrc


----------



## SirDice (Dec 3, 2012)

Please post the output of [cmd=]df -h[/cmd] and [cmd=]cat /etc/make.conf[/cmd]


----------



## cebra (Dec 4, 2012)

In fact, i had not enough memory with my virtual Box machine (2 GB ^^) so it's normal..

Sorry

Thank you


----------

