[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: "dynamic libraries not enabled"?
- From: Gilles Ganault <gilles.ganault@...>
- Date: Mon, 24 Jan 2011 13:43:13 +0100
On Mon, 24 Jan 2011 08:56:31 -0200, Luiz Henrique de Figueiredo
>This is *not* the way to use LuaSocket! You need to install it somewhere.
>require "socket" should load socket.lua which in turn loads socket.core,
>typically from socket/core.so.
Damn... When I saw that the Makefile created two .so files, I figured
I could just copy those files in the same directory as the Lua
interpreter and call "require" to use them, instead of actually
checking with the documentation :-/
And to make matters worse, the error message (Unable to resolve
symbol") led me to believe it was a (cross-)compiling issue...
After going through those steps, I can successfully load the Socket
1. Go through LuaSocket's config/makefile and src/makefile to figure
out how to cross-compile this module and what to install where with
which name on the target host
2. LuaSocket requires a bunch of .lua scripts and the two shared
libraries, under a different name:
tar xzvf luasocket.binaries.tar.gz
mkdir -p /usr/local/share/lua/5.1.4/socket
cp ltn12.lua mime.lua socket.lua /usr/local/share/lua/5.1.4/
cp http.lua tp.lua ftp.lua smtp.lua url.lua
mkdir -p /usr/local/lib/lua/5.1.4/mime
mkdir -p /usr/local/lib/lua/5.1.4/socket
cp socket.2.0.2.so /usr/local/lib/lua/5.1.4/socket/core.so
cp mime.1.0.2.so /usr/local/lib/lua/5.1.4/mime/core.so
> cd /var/tmp/
Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio
> socket = require("socket")
Thanks much to you and everyone else in this thread, and sorry for
wasting your time. I'll pay more attention to what resources are
available for a given module.