# Prosody : /usr/local/bin/prosodyctl: Command not found.



## src386 (May 30, 2014)

Hi everyone,
After updating net-im/prosody, I am unable to start prosody.

```
# service prosody start
eval: /usr/local/bin/prosodyctl: not found
```
prosodyctl is not missing, it is present in /usr/local/bin/ :

```
# ls /usr/local/bin/prosod*
/usr/local/bin/prosody		/usr/local/bin/prosodyctl
```
pkg show prosody as installed :

```
# pkg info
[...]
prosody-0.9.3                  A simple extensible XMPP server written in Lua
[...]
```
I tried make deinstall , make rmconfig ; make install clean in /usr/ports/net-im/prosody but it does not working.
Any idea ?  :\ 
Thanks


----------



## SirDice (May 30, 2014)

Is /usr/local/bin/prodsodyctl perhaps a script file? If it is, what's the first line?


----------



## src386 (May 30, 2014)

You are right @SirDice.
Here is what I get :

```
# sh /usr/local/bin/prosodyctl 
/usr/local/bin/prosodyctl: --: not found
/usr/local/bin/prosodyctl: 3: Syntax error: "(" unexpected
```
I will compare that file with another from a backup.

EDIT : I'm stupid. Sh is not the interpreter. It's lua51.

```
# lua51 /usr/local/bin/prosodyctl start
/usr/local/lib/prosody/../../bin/prosody: not found
Still waiting...
Prosody is still not running. Please give it some time or check your log files for errors.
```
There is an error but I think this is normal, I did not specified the location of configuration file.

Looks like I have an issue with lua51...


----------



## kpa (May 30, 2014)

Show the first line of the /usr/local/bin/prosodyctl script file.


----------



## SirDice (May 30, 2014)

I'm guessing that due to moving from lua to lua51 and lua52 the shebang line isn't pointing to the correct one.


----------



## src386 (May 30, 2014)

I used a backup to restore my xmpp server.
I will update later, because it takes a very long time...
Thanks.


----------



## hrkfrd (Jun 2, 2014)

I've got the same problem. Has anybody come up with a solution? Most likely seems to be related to the lua transition..


----------



## SirDice (Jun 2, 2014)

Please post the first line of the /usr/local/bin/prosodyctl script.


----------



## hrkfrd (Jun 2, 2014)

First line/shebang is:

```
#!lua51
```

EDIT: Okay, so changing this to the full path (/usr/local/bin/lua51) works.


----------



## gloom (Jun 3, 2014)

ok

```
make -C /usr/ports/net-im/prosody extract
head -n 1 /usr/ports/net-im/prosody/work/prosody-0.9.3/prosodyctl                                                                         
#!/usr/bin/env lua
make -C /usr/ports/net-im/prosody extract
oot@b7st1:/root # make -C /usr/ports/net-im/prosody/ patch
===>  Patching for prosody-0.9.3
===>  Applying FreeBSD patches for prosody-0.9.3
root@b7st1:/root # head -n 1 /usr/ports/net-im/prosody/work/prosody-0.9.3/prosodyctl
#!/usr/local/bin/lua-5.1
head -n 2 /usr/ports/net-im/prosody/Makefile
# Created by: Andrew Lewis <freeghb@gmail.com>
# $FreeBSD: head/net-im/prosody/Makefile 348629 2014-03-19 15:59:50Z lx $
```

broken

```
make -C /usr/ports/net-im/prosody/ patch
#===>  License MIT accepted by the user
===>   prosody-0.9.3 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by prosody-0.9.3 for building
===>  Extracting for prosody-0.9.3
=> SHA256 Checksum OK for prosody-0.9.3.tar.gz.
===>  Patching for prosody-0.9.3
===>  Applying FreeBSD patches for prosody-0.9.3
# head -n 1 /usr/ports/net-im/prosody/work/prosody-0.9.3/prosodyctl
#!lua51
# head -n 2 /usr/ports/net-im/prosody/Makefile
# Created by: Andrew Lewis <freeghb@gmail.com>
# $FreeBSD: head/net-im/prosody/Makefile 355360 2014-05-26 15:28:28Z bapt $
```


----------

