• Announcement: Lua.org now officially recommends this forum as a meeting place for the Lua community
  • The forum is currently open to new registrations. The registration will close for a short period of time when reaching 500 active members, to upgrade the server resources.

Lua Odbc With Debian Error Path ODBC? (1 Viewer)

Geoandroid

Newcomer
Joined
Apr 5, 2021
Messages
1
Reaction score
0
Code->
odbc = require "odbc"
dbassert = odbc.assert

cnn = odbc.connect('MariaDB-server', 'xx', 'x')

stmt = cnn:execute('SELECT Host, user, password FROM mysql.user;')
stmt:foreach(function(f1, f2, f3)
print(string.format("host: %s, user: %s, clave: %s", f1, f2, f3));
end)
assert(stmt:closed()) -- foreach close cursor
assert(not stmt:destroyed()) -- statement valid


Error:

[email protected]:/usr/src/ajto/lua_Mysql# lua prueba_mysql.lua
lua: prueba_mysql.lua:1: module 'odbc' not found:
no field package.preload['odbc']
no file '/usr/local/share/lua/5.3/odbc.lua'
no file '/usr/local/share/lua/5.3/odbc/init.lua'
no file '/usr/local/lib/lua/5.3/odbc.lua'
no file '/usr/local/lib/lua/5.3/odbc/init.lua'
no file '/usr/share/lua/5.3/odbc.lua'
no file '/usr/share/lua/5.3/odbc/init.lua'
no file './odbc.lua'
no file './odbc/init.lua'
no file '/usr/local/lib/lua/5.3/odbc.so'
no file '/usr/lib/x86_64-linux-gnu/lua/5.3/odbc.so'
no file '/usr/lib/lua/5.3/odbc.so'
no file '/usr/local/lib/lua/5.3/loadall.so'
no file './odbc.so'
stack traceback:
[C]: in function 'require'
prueba_mysql.lua:1: in main chunk
[C]: in ?
 
Top