# Symlink problem



## cahimira (Sep 26, 2013)

Hi,

I have the /usr/local directory as a symlink to /s/usr-local/. Then when I try to install the pkgconf port I get this error:


```
tar: could not chdir to '/s/usr-ports/devel/pkgconf/work/stage/s/usr-local'
```

That is because the `make` command creates the /s/usr-ports/devel/pkgconf/work/stage/*usr/local* directory and `make install` command try to find in this location /s/usr-ports/devel/pkgconf/work/stage/*s/usr-local*

Any suggests?

Thanks.


----------



## SirDice (Sep 26, 2013)

Try building the port with `make install PREFIX=/s/usr-local`. Not sure if that would work though.

Why did you move /usr/local/ to /s/usr-local/?


----------



## cahimira (Oct 1, 2013)

Perfect! Thank you.


----------



## cahimira (Oct 1, 2013)

SirDice said:
			
		

> Try building the port with `make install PREFIX=/s/usr-local`. Not sure if that would work though.
> 
> Why did you move /usr/local/ to /s/usr-local/?



I have /usr/local/ as a symlink to /s/usr-local/. Some ports use the fake path (/usr/local/) and others use the real path (/s/usr-local/).

Ok, `make install PREFIX=X` works well, but is only useful if you need to build/install a few ports. But I use `portupgrade` to update my system. Is there a way to instruct to portupgrade to use the prefix?

Thanks.


----------



## cahimira (Oct 2, 2013)

Hello, I found a solution. In the pkgtools.conf file add these lines:


```
MAKE_ARGS = {
  '*' => 'PREFIX=/s/usr-local'
}
```

Thanks.


----------



## SirDice (Oct 3, 2013)

If I remember correctly it can also be set on the commandline, something like `portupgrade -m'-DPREFIX=/s/usr-local' www/apache22`


----------

