# Installation of erlang-15.b.03.1_1,3 failed



## skillcoder (Sep 18, 2013)

I try to update all installed ports by using `sudo portmaster -d -a` but it's failed on lang/erlang.

I try more:

```
# sudo portsnap fetch update
Updating from Wed Sep 18 20:29:37 MSK 2013 to Wed Sep 18 22:37:18 MSK 2013.
# sudo portmaster lang/erlang
...
(cd "/usr/local/lib/erlang" \
 && ./Install  -minimal "/usr/local/lib/erlang")
ln: run_test: File exists

Formatting manual pages (this may take a while...)
cd /usr/local/bin
rm -f erl
rm -f erlc
rm -f epmd
rm -f run_erl
rm -f to_erl
rm -f dialyzer
rm -f typer
rm -f escript
rm -f ct_run
rm -f run_test
ln -s ../lib/erlang/bin/erl erl
ln -s ../lib/erlang/bin/erlc erlc
ln -s ../lib/erlang/bin/epmd epmd
ln -s ../lib/erlang/bin/run_erl run_erl
ln -s ../lib/erlang/bin/to_erl to_erl
ln -s ../lib/erlang/bin/dialyzer dialyzer
ln -s ../lib/erlang/bin/typer typer
ln -s ../lib/erlang/bin/escript escript
ln -s ../lib/erlang/bin/ct_run ct_run
ln -s ../lib/erlang/bin/run_test run_test
===> Installing rc.d startup script(s)
ln: /usr/local/bin/erl_call: No such file or directory
*** Error code 1

Stop in /usr/ports/lang/erlang.
*** Error code 1

Stop in /usr/ports/lang/erlang.

===>>> Installation of erlang-15.b.03.1_1,3 (lang/erlang) failed
===>>> Aborting update
```

How can I solve this problem?

P.S. FreeBSD 9.0-RELEASE-p4 amd64


----------



## SirDice (Sep 19, 2013)

skillcoder said:
			
		

> P.S. FreeBSD 9.0-RELEASE-p4 amd64


Please upgrade to 9.1, FreeBSD 9.0 has been EoL for a while.

Unsupported FreeBSD Releases

[thread=40469]Topics about unsupported FreeBSD versions[/thread]


----------



## skillcoder (Sep 19, 2013)

[size=-1]Ok, now i spend my time & upgrade to FreeBSD 9.1-RELEASE-p7
But have exactly same error what i describe in first post.

Any suggestions ?[/size]

Ok, now I've spent my time and upgraded to FreeBSD 9.1-RELEASE-p7. But I'm getting exactly the same error as I described in my first post.


----------



## SirDice (Sep 19, 2013)

Hmm.. The only reference in the Makefile regarding the error is this line:

```
@${LN} -sf ${PREFIX}/lib/${ERLANG_LIB}/lib/erl_interface-*/bin/erl_call ${PREFIX}/bin/erl_call
```

This creates a symlink from /usr/local/bin/erl_call to /usr/local/lib/erlang/lib/erl_interface-*/bin/erl_call. So I'm wondering why it's complaining about it not being there. It's not supposed to be there, that's why it's created. 

Can you post the output of `ls -al /usr/local/bin/erl_call /usr/local/lib/erlang/lib/erl_interface-*/bin/erl_call`?


----------



## skillcoder (Sep 19, 2013)

```
[~]# ls -al /usr/local/bin/erl_call /usr/local/lib/erlang/lib/erl_interface-*/bin/erl_call
ls: /usr/local/bin/erl_call: No such file or directory
-r-xr-xr-x  1 root  wheel  84752 25 ÑÐµÐ½  2012 /usr/local/lib/erlang/lib/erl_interface-3.7.8/bin/erl_call*
-r-xr-xr-x  1 root  wheel  85688 19 ÑÐµÐ½ 16:48 /usr/local/lib/erlang/lib/erl_interface-3.7.9/bin/erl_call*
```


----------



## wblock@ (Sep 19, 2013)

So the link fails because there are two directories and it can't link to both.  The question is why that old 3.7.8 directory from 2012 is still there.


----------



## skillcoder (Sep 19, 2013)

It helped: `sudo rm -rf /usr/local/lib/erlang/lib/erl_interface-3.7.8`. Huge Thx thanks!

It could well be the last installation of erlang-lite, but for some reason it could happen, I don `t know. How do I properly clean the system from such junk?


----------



## wblock@ (Sep 20, 2013)

Removing the old version is one of the things portmaster(8) is supposed to do.  There could be different versions of that port (plain and -devel, say), which should be marked as conflicting but may not be.  Or maybe the first version was manually installed, not from a port.


----------



## SirDice (Sep 20, 2013)

A port may not remove the directory if there are user edited files in it.


----------

