luarocks错误 require ‘luasql.mysql' 报module 'luasql.mysql' not found:
错误:
require 'luasql.mysql'
stdin:1: module 'luasql.mysql' not found:
no field package.preload['luasql.mysql']
no file '/usr/local/share/lua/5.3/luasql/mysql.lua'
no file '/usr/local/share/lua/5.3/luasql/mysql/init.lua'
no file '/usr/local/lib/lua/5.3/luasql/mysql.lua'
no file '/usr/local/lib/lua/5.3/luasql/mysql/init.lua'
no file './luasql/mysql.lua'
no file './luasql/mysql/init.lua'
no file '/usr/local/lib/lua/5.3/luasql/mysql.so'
no file '/usr/local/lib/lua/5.3/loadall.so'
no file './luasql/mysql.so'
no file '/usr/local/lib/lua/5.3/luasql.so'
no file '/usr/local/lib/lua/5.3/loadall.so'
no file './luasql.so'
stack traceback:
[C]: in function 'require'
stdin:1: in main chunk
[C]: in ?
环境: ubuntu 已安装lua,未安装mysql
解决方案
一、先安装mysql
Ubuntu上安装MySQL非常简单只需要几条命令就可以完成。
1. sudo apt-get install mysql-server
2. apt-get isntall mysql-client
3. sudo apt-get install libmysqlclient-dev
参考链接
http://www.linuxidc.com/Linux/2016-07/133128.htm
二 安装luasql-mysql
luarocks install luasql-mysql
参考链接 http://www.runoob.com/lua/lua-database-access.html
三 安装luasql-mysql 出错
Error: Could not find header file for MYSQL
No file mysql.h in /usr/local/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
解决方法:
在终端执行whereis mysql 找到mysql 的include路径
luarocks install luasql-mysql MYSQL_INCDIR=/usr/include/mysql
注释:配置自己查到的mysql.h 所在路径
luarocks错误 require ‘luasql.mysql' 报module 'luasql.mysql' not found:的更多相关文章
- mysql报错“Starting MySQL...The server quit without updating PID file”处理
http://blog.csdn.net/lzq123_1/article/details/51354179 注意:要将/usr/bin/mysql_install_db替换成 /usr/bin/my ...
- 可视化工具连接mysql报1862【mysql修改登录密码】
1862是密码被修改了. 修改方法: 1.以root登录账户: 账户与密码都是root mysql -uroot -proot 2.修改密码 set password = password('1234 ...
- win7下安装MYSQL报错:"MYSQL 服务无法启动"的3534问题
上午在win7下安装MYSQL,只到“net start mysql”这一步报错:3534的错误: 于是在百度中搜索关键字“mysql服务无法启动3534”. 参考以下两个链接中的方法,解决了3534 ...
- 【mysql报错】MySQL host is blocked because of many connection errors; 解决方法
MySQL host is blocked because of many connection errors; 报错 环境 操作系统:Linux 数据库:mysql5.7.27 错误提示 jHost ...
- linux启动mysql报错 Starting MySQL... ERROR! The server quit without updating PID file (XXXX pid文件位置)
最近在云服务器上安装mysql 启动时报错了,从错误中可以看出,定位在pid文件上,有三种解决方案 1.重启服务器:因为服务器更新时,可能会禁用某些守护进程,重启后即可恢复 2.删除配置文件,重启试 ...
- mysql报错com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException
一.问题 运行java代码时报如下的错误: You have an error in your SQL syntax;Cause:com.mysql.jdbc.exceptions.jdbc4.MyS ...
- Java连接MySql报错—— com.mysql.cj.exceptions.InvalidConnectionAttributeException
详细报错 java.sql.SQLException: The server time zone value '�й���ʱ��' is unrecognized or represents mor ...
- mysql报错问题解决MySQL server PID file could not be found!
MySQL server PID file could not be found! 无法启动mysql服务 # service mysqld start MySQL server PID file c ...
- MySql报错(持续更新)
目录 MySql报错 1. 重复键报错1062- duplicate entry '0' for key 'xxx' 1.1 报错场景 1.2 报错原因 1.3 解决方法 1.4 具体举例 2. VS ...
随机推荐
- 将Cmder添加到系统右键菜单中
1.把 Cmder 加到环境变量 把Cmder.exe存放的目录添加到系统环境变量: 加完之后,Win+r一下输入cmder,即可. 2.添加 cmder 到右键菜单:环境变量添加后,在任意文件夹中即 ...
- PHP扩展开发及内核应用(未完)
转: https://github.com/walu/phpbook
- fs 小计
如果是export 就可以放到b-leg上 如果是set就可以对于a-leg
- 多线程-Thread、Runnable、Callbale、Future
Thread:java使用Thread代表线程,所有的线程对象都必须是Thread类或其子类,可以通过继承Thread类来创建并启动多线程. package org.github.lujiango; ...
- 安装Eclipse插件长时间卡在 calculating requirements and dependencies
把"Contact all update sites during install to find required software"前面的勾去掉,然后点击下一步,这样之后问题迎 ...
- Git-查看远程分支、本地分支、创建分支
1.查看本地分支 $ git branch * br-2.1.2.2 master 2.查看远程分支 $ git branch -r origin/HEAD -> origin/master o ...
- jquery几个按钮同时调用一个方法
- 如何编写Makefile?
//swap.c #include<stdio.h> int swap(int *x,int *y) {printf("a=%d b=%d\n",*x,*y); int ...
- python 的__FILE__,__LINE__功能实现
在C语言里,__FILE__和__LINE__给调试提供了很大的方便,今晚在写PYTHON的时候想到,PYTHON是否有类似的功能实现呢? GOOGLE一番发现两个方法,试验一下下面这句:print ...
- Java中的BlockingQueue小结
BlockingQueue是java.util.concurrent下的主要用来控制线程同步的工具. 主要的方法是:put.take一对阻塞存取:add.poll一对非阻塞存取. 插入: 1) add ...