-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not able to install lua-sql #26
Comments
Do you have a C compiler (such as Visual Studio) setup in your environment? You will need it to compile LuaSQL. Locate where in your system you have the files
If the files are under directories with spaces in their names (such as |
Hi, |
OK, there is no file mysqlclient.dll in MySQL for Windows distribution. Right file name to link with Luarocks' luasql-mysql is libmysql.dll. Current rockspec never compile on windows. You must replace "mysqlclient" with "libmysql" in luasql-mysql rockspec. Use cvs-1 version. |
Hello. I am installing mysql via luarocks. I followed the instruction in this thread and I got the following error: I use this code: luarocks install luasql-mysql MYSQL_INCDIR="C:\Program Files\MySQL\MySQL Connector.C 6.1\include" MYSQL_LIBDIR="C:\Program Files\MySQL\MySQL Connector.C 6.1\lib" . I found mysql.h and libmysql.dll. |
Try |
Hello. I tried running it but at least I have new error. package = "LuaSQL-MySQL" |
Hi bonez001 This message ("The specified module could not be found") does not seem Regards, On 2016-10-13 03:32, bonez001 wrote:
|
What is the compiler/linker? How can I run it? Do you think it is better to use other OS? |
Hi bonez001
There is an important difference between those two types of libraries. Another important thing to know is if your Lua executable was linked to Your linker (Microsoft (R) Incremental Linker Version 14.00.24215.1, It would be better to hear from someone with more knowledge of Regards, |
No, that is not necessary (or recommended!). |
This worked for me (Mac OS; MySQL and Lua installed via Homebrew): |
@bonez001 How'd you fix your issue (Click to view image)? I'm having this same issue but have no clue how to resolve it. Please help :/ Also sorry for reviving a dead issue |
I also get a error while installing via luarocks under windows: Error: Build error: Failed compiling object src/luasql.obj |
Hi Fantalic
I could not find these options nor this compiler (cl) in the rockspecs.
Could you send us more information? What driver are you trying to
install? How did you invoke LuaRocks to install the package?
Regards,
Tomás
2018-07-02 9:37 GMT-03:00 Fantalic <notifications@github.com>:
… I also get a error while installing via luarocks:
"
cl /nologo /MD /O2 -c -Fosrc/luasql.obj -ID:/.../include src/luasql.c
-Ic:/external/include
Der Befehl "cl" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
// cl comand not found
Error: Build error: Failed compiling object src/luasql.obj
"
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#26 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAIA7YJ1n-qj62FqOGBnVf7ryYG7nuOQks5uChQmgaJpZM4DUN-n>
.
|
@hishamhm Thank you very much |
Hi, please let me know the steps of installing luasql |
i really appreciate the help |
|
Hi Ankit It seems you have successfully installed luasql-mysql, but could not attempt to load it (with require). But note that there are two important lines of information at the end of the installing process: Creating library luasql/mysql.lib luasql-mysql cvs-1 is now installed in C:\gcc-lua-install\lua-5.1\src\systree The first one shows the name of the file produced and the last one shows that you choose a very old version (cvs-1, we are at 2.6 now) and that it was installed at "C:\gcc-lua-install\lua-5.1\src\systree". This "systree" surprises me! Could you check if there is such a path? I recommend you read the message that function require emmited carefully. The Lua Team have expended a great effort in providing us many importante information! Note that the function searches for a file called "luasql-mysql.dll" which is the wrong file name. You should load the module with: mysql = require"luasql.mysql" The variable mysql would store a reference to the module's table. Regards, |
Dear Developers, Help to connect the module to the Apache server. Configured httpd.conf, enabled modules: I am getting an error: I installed Lua separately and everything works there, the luasql.mysql module is located. Help, please, to connect luasql through Apache. |
Hi Alexey It seems you are taking Regards, |
LuaSQL is installed in a separate installation copy C:\Program Files (x86)\Lua\5.1\lua\luasql . Through the program "lua hello.lua" everything works. Doesn't work through the Apache 2.4 module that comes with it in the C:\xampp\apache\modules\mod_lua.so installation. Do I need to put something in httpd.conf to make linking to C:\Program Files (x86)\Lua\5.1\lua\luasql work? |
The problem was partially solved with the help of the LUA_CPATH environment variable, which pointed to: C:\Program Files (x86)\Lua\5.1\clibs?.dll;C:\Program Files (x86)\Lua\5.1\clibs\luasql\ ?.dll Is there a 64 bit version of LuaSQL compilation? |
I installed Apache x86 as an experiment. Now there is no message, but hangs on the line "mysql = require "luasql.mysql"". Browser message: "Unable to access site. Connection reset.". Connection code:
From the console, the code runs without the error "lua exLuaSQL.lua" without declaring function handle(r). What could be the problem? |
Hi Alexey The path you added to package.cpath = package.cpath .. ";C:/Program Files (x86)/Lua/5.1/lua/?.dll" When require"luasql.mysql" is executed, the '.' in the name of the module would be substituted by the directory separator, '/' or '' or whatever the OS standard is. Thus the '?' will be substituted by "luasql/mysql" and the file will be loaded from "C:/Program Files (x86)/Lua/5.1/lua/luasql/mysql.dll". I hope the correction above will solve your problem. Regards, |
Hi Alexey, Please check if the file is in If it is not, I recommend you correct the If the file is there, it seems the Apache Lua Module have a different Regards, |
Dear Tomás, the file exists. The problem was solved through my web server on require("socket") without using the module for Apache. Thanks for the help! Sincerely, |
Thus, i think we can end this issue |
I tried to install luasql both mysql and jdbc version. I am struggling to install these. Spent days doing this. Will Appreciate any help. I installed LUA 5.1 from
https://code.google.com/p/luaforwindows/downloads/list
1. lua-jdbc
C:\Program Files (x86)\LuaRocks\2.2>luarocks install luasql-jdbc
Error: No results matching query were found.
2. lua-mysql
C:\Program Files (x86)\LuaRocks\2.2>luarocks install luasql-mysql
Installing https://rocks.moonscript.org/luasql-mysql-2.3.0-1.src.rock...
Using https://rocks.moonscript.org/luasql-mysql-2.3.0-1.src.rock... switching to 'build' mode
Error: Could not find expected file mysql.h, or mysql.h for MYSQL -- you may have to install MYSQL in your system and/or pass MYSQL_DIR or MYSQL_INCDIR to the luarocks command. Example: luarocks install luasql-mysql MYSQL_DIR=/usr/local
I tried to install with MYSQL_DIR. But no help
The text was updated successfully, but these errors were encountered: