lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


hello,

i'm a beginner trying to load luasql
i have followed the instructions but they are not so clear to me.
when i try to load it with require i get a string of errors

#> require "luasql.sqlite"
stdin:1: module 'luasql.sqlite' not found:
   no field package.preload['luasql.sqlite']
   no file './luasql/sqlite.lua'
   no file '/usr/share/lua/5.1/luasql/sqlite.lua'
   no file '/usr/share/lua/5.1/luasql/sqlite/init.lua'
   no file '/usr/lib/lua/5.1/luasql/sqlite.lua'
   no file '/usr/lib/lua/5.1/luasql/sqlite/init.lua'
   no file './luasql/sqlite.so'
   no file '/usr/lib/lua/5.1/luasql/sqlite.so'
   no file '/usr/lib/lua/5.1/loadall.so'
   no file './luasql.so'
   no file '/usr/lib/lua/5.1/luasql.so'
   no file '/usr/lib/lua/5.1/loadall.so'
stack traceback:
   [C]: in function 'require'
   stdin:1: in main chunk
   [C]: ?
>

a 'locate' reveals the files its looking for aren't on my system
where for example should luasql.so and loadall.so come from?

all the make install  process does is:

mkdir -p /usr/lib/lua/5.1/luasql
cp src/sqlite3.so /usr/lib/lua/5.1/luasql


i slightly edited the config file:

snip of luasql config file:
T= sqlite  <------------------  i uncommented this
T=sqlite3
# Installation directories
# Default prefix
PREFIX = /usr <------------------ i changed this from /usr/local to /usr so its in my package.path

######## SQLite
DRIVER_LIBS= -lsqlite <------------------  i uncommented this
DRIVER_INCS=

> =package.path
./?.lua;/usr/share/lua/5.1/?.lua;/usr/share/lua/5.1/?/init.lua;/usr/lib/lua/5.1/?.lua;/usr/lib/lua/5.1/?/init.lua

maybe its all here

http://www.keplerproject.org/luasql/manual.html#compiling

but i can't understand any of that :( perhaps someone could translate it into plain english :)

many thanks

rob c
(on debian testing  with lua 5.1.2 and luasql-2.1.1)