Suppose you want to add a package foo but when you invoke pkg_add via:
pkg_add -r foo
you get an error:
Error: Unable to get ftp://.../foo.tbz: File unavailable ...
It's not a problem since according to pkg_add's man page, all you have to do is to set the PACKAGEROOT environment variable to the root directory of foo:
Not so fast! It is a problem--it doesn't work! If you don't export PACKAGEROOT, then pkg_add uses its default location and exporting PACKAGEROOT give you the error:
pkg_add: can't stat package file 'foo'
The same holds when setting the PACKAGESITE variable.
Now, I have actually solved this problem:
pkg_add -r ftp://my/package/root/foo.tbz
works fine. Nevertheless, I have two questions:
- What exactly does
can't stat package file 'foo'mean?
- Why doesn't this work as advertised?
For the interested, I experienced this problem when trying to install Enlightenment. The ports version is old and I didn't want to compile anyway since that takes a while. I set PACKAGEROOT and PACKAGESITE independently via different terminal sessions:
but neither worked.