[prosody-users] Installation Problem: Cannot Find Luasec

1,805 views
Skip to first unread message

Julie

unread,
Apr 18, 2010, 4:35:48 AM4/18/10
to Prosody IM Users
I installed Prosody and its dependencies on Ubuntu (Hardy), but when I
try to use prosody, I get the following error:

**************************
Prosody was unable to find LuaSec
This package can be obtained in the following ways:

Source http://www.inf.puc-rio.br/~brunoos/luasec/
Debian/Ubuntu http://prosody.im/download/start#debian_and_ubuntu
luarocks luarocks install luasec

SSL/TLS support will not be available
More help can be found on our website, at http://prosody.im/doc/depends
**************************

Yet, Ubuntu claims it has luasec.

Anyone else have this issue or now how to fix it?

--
You received this message because you are subscribed to the Google Groups "Prosody IM Users" group.
To post to this group, send an email to prosod...@googlegroups.com.
To unsubscribe from this group, send email to prosody-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/prosody-users?hl=en-GB.

Maab

unread,
May 6, 2010, 9:25:59 AM5/6/10
to Prosody IM Users
I can't solve it. I can add that I have this issue in spades. I built
the prosody 6.1 release on an openSUSE system, 11.2, AMD64
architecture. I have these installed lua components from openSUSE
repositories:


i | liblua5_1 | Small Embeddable Language with Simple
Procedural Syntax
i | liblua5_1-32bit | Small Embeddable Language with Simple
Procedural Syntax
i | lua | Small Embeddable Language with Simple
Procedural Syntax
i | lua-devel | Development files for lua
i | luaexpat | It is a SAX XML parser
i | luafilesystem | Lua library to Access Directories and
FIles
i | luasec | It is a binding for OpenSSL
i | luasocket | It is a Lua extension library

prosody complains that it can't find three of them of them:

Prosody was unable to find luaexpat
Prosody was unable to find luafilesystem
Prosody was unable to find LuaSec

I did find in building the package that the prosody make files wanted
to set a variable called LUA_SUFFIX to 5.1 and then append this to
certain library directories or files. The openSUSE version of the lua
packages doesn't store them that way, so I had to comment out those
lines for it to compile successfully. The issue might be related to
other hard-coded issues with differing names, I suppose.
maab




On Apr 18, 4:35 am, Julie <azur...@gmail.com> wrote:
> I installed Prosody and its dependencies on Ubuntu (Hardy), but when I
> try to use prosody, I get the following error:
>
> **************************
> Prosody was unable to find LuaSec
> This package can be obtained in the following ways:
>
>         Source  http://www.inf.puc-rio.br/~brunoos/luasec/
>         Debian/Ubuntu  http://prosody.im/download/start#debian_and_ubuntu
>         luarocks        luarocks install luasec
>
> SSL/TLS support will not be available
> More help can be found on our website, athttp://prosody.im/doc/depends

Matthew Wild

unread,
May 6, 2010, 5:19:50 PM5/6/10
to prosod...@googlegroups.com
Hi Julie,

I'm sorry I missed your message before now.

On 18 April 2010 09:35, Julie <azu...@gmail.com> wrote:
> I installed Prosody and its dependencies on Ubuntu (Hardy), but when I
> try to use prosody, I get the following error:
>
> **************************
> Prosody was unable to find LuaSec
> This package can be obtained in the following ways:
>
>        Source  http://www.inf.puc-rio.br/~brunoos/luasec/
>        Debian/Ubuntu   http://prosody.im/download/start#debian_and_ubuntu
>        luarocks        luarocks install luasec
>
> SSL/TLS support will not be available
> More help can be found on our website, at http://prosody.im/doc/depends
> **************************
>

If you download the package from our site then it should "just work",
is this what you did?

If so, could you show the output of "lua -lssl" and "dpkg -L luasec"
(depending on which package you installed it may be called luasec,
lua-sec or liblua5.1-sec0).

Regards,
Matthew

Matthew Wild

unread,
May 6, 2010, 5:31:25 PM5/6/10
to prosod...@googlegroups.com
Hi,

On 6 May 2010 14:25, Maab <maa...@gmail.com> wrote:
> I can't solve it. I can add that I have this issue in spades. I built
> the prosody 6.1 release on an openSUSE system, 11.2, AMD64
> architecture. I have these installed lua components from openSUSE
> repositories:
>

Ah, OpenSUSE - this one is always a pain :(

>
> i | liblua5_1               | Small Embeddable Language with Simple
> Procedural Syntax
> i | liblua5_1-32bit         | Small Embeddable Language with Simple
> Procedural Syntax
> i | lua                     | Small Embeddable Language with Simple
> Procedural Syntax
> i | lua-devel               | Development files for lua
> i | luaexpat                | It is a SAX XML parser
> i | luafilesystem           | Lua library to Access Directories and
> FIles
> i | luasec                  | It is a binding for OpenSSL
> i | luasocket               | It is a Lua extension library
>
> prosody complains that it can't find three of them of them:
>
> Prosody was unable to find luaexpat
> Prosody was unable to find luafilesystem
> Prosody was unable to find LuaSec
>
> I did find in building the package that the prosody make files wanted
> to set a variable called LUA_SUFFIX to 5.1 and then append this to
> certain library directories or files. The openSUSE version of the lua
> packages doesn't store them that way, so I had to comment out those
> lines for it to compile successfully. The issue might be related to
> other hard-coded issues with differing names, I suppose.

You can change the suffix with ./configure --lua-suffix=""

The problem with Lua and its libraries on OpenSUSE has been that the
Lua package is built to look for libraries in one location, but the
library packages themselves install to another location. I have no
clue how it managed to get so broken, but to check this is the issues
you can run for example: "lua -llfs" to search for the luafilesystem
library. I suspect you'll see it looking for lfs.so in a place
different to where the package installed it.

I'm not sure what to suggest if this is still the case... probably the
best way would be to add to the Lua path through the Prosody config.

If you can find out where the library packages are being installed to
(ie. find the files that the luafilesystem package installed) then I
can tell you what you would need to put in the config to help Lua find
them.

Hope this helps,
Matthew

Maab

unread,
May 7, 2010, 11:30:06 AM5/7/10
to Prosody IM Users


On May 6, 5:31 pm, Matthew Wild <mwi...@gmail.com> wrote:
> You can change the suffix with ./configure --lua-suffix=""
>
> The problem with Lua and its libraries on OpenSUSE has been that the
> Lua package is built to look for libraries in one location, but the
> library packages themselves install to another location. I have no
> clue how it managed to get so broken, but to check this is the issues
> you can run for example: "lua -llfs" to search for the luafilesystem
> library. I suspect you'll see it looking for lfs.so in a place
> different to where the package installed it.
>
> I'm not sure what to suggest if this is still the case... probably the
> best way would be to add to the Lua path through the Prosody config.
>
> If you can find out where the library packages are being installed to
> (ie. find the files that the luafilesystem package installed) then I
> can tell you what you would need to put in the config to help Lua find
> them.

Ah. Okay, brill. Should have thought of that.

The issue seems to be that lua expects all it's components to be in
the /usr/local tree, and the openSUSE package is storing them in /usr.
That and also this is a 64-bit system, so libs built to that
architecture are in something/lib64.

So I can fix this I believe by creating symbolic links thus:

sudo ln -s /usr/share/lua /usr/local/share/
sudo ln -s /usr/lib64/lua /usr/local/lib/
sudo ln -s /usr/lib64/lua /usr/local/lib64/

Duuno if that's better than fixing the paths in prosody or not. I
suppose it would mean that other lua apps, did I have any, might work
better.

maab

Matthew Wild

unread,
May 7, 2010, 4:38:09 PM5/7/10
to prosod...@googlegroups.com
On 7 May 2010 16:30, Maab <maa...@gmail.com> wrote:
>
>
> On May 6, 5:31 pm, Matthew Wild <mwi...@gmail.com> wrote:
>> You can change the suffix with ./configure --lua-suffix=""
>>
>> The problem with Lua and its libraries on OpenSUSE has been that the
>> Lua package is built to look for libraries in one location, but the
>> library packages themselves install to another location. I have no
>> clue how it managed to get so broken, but to check this is the issues
>> you can run for example: "lua -llfs" to search for the luafilesystem
>> library. I suspect you'll see it looking for lfs.so in a place
>> different to where the package installed it.
>>
>> I'm not sure what to suggest if this is still the case... probably the
>> best way would be to add to the Lua path through the Prosody config.
>>
>> If you can find out where the library packages are being installed to
>> (ie. find the files that the luafilesystem package installed) then I
>> can tell you what you would need to put in the config to help Lua find
>> them.
>
> Ah. Okay, brill. Should have thought of that.
>
> The issue seems to be that lua expects all it's components to be in
> the /usr/local tree, and the openSUSE package is storing them in /usr.
> That and also this is a 64-bit system, so libs built to that
> architecture are in something/lib64.
>

OpenSUSE really need to fix this - if you know the relevant place to
file a bug against their lua package, tell them they should replace
/usr/local with /usr in src/luaconf.h :)

> So I can fix this I believe by creating symbolic links thus:
>
>  sudo ln -s /usr/share/lua /usr/local/share/
>  sudo ln -s /usr/lib64/lua /usr/local/lib/
>  sudo ln -s /usr/lib64/lua /usr/local/lib64/
>

Yes, that's one way. Though it could mess up other apps on your system
that you would ever install there. /usr/local is often used as a
convenient place to keep things separated from other
programs/libraries on the system (usually /usr is managed by a package
manager, /usr/local is not).

> Duuno if that's better than fixing the paths in prosody or not. I
> suppose it would mean that other lua apps, did I have any, might work
> better.
>

Try this at the top of your Prosody config:

package.path = package.path:gsub("/usr/local/", "/usr/")
package.cpath = package.cpath:gsub("/usr/local/", "/usr/")

The former is for the location of pure-Lua modules, the latter for
binary (.so) modules.

Regards,
Matthew
Reply all
Reply to author
Forward
0 new messages