mongorover模块是mongodb官方提供的lua语言的驱动,官网API文档:http://api.mongodb.org/lua/0.1/index.html
通过luarocks方式安装lua模块
一、安装luarocks工具
1 | $ wget http://luarocks.org/releases/luarocks-2.2.2.tar.gz |
二、安装mongorover模块
1 | $ luarocks install mongorover |
安装时,报以下错误信息
Error: Could not find expected file libbson-1.0/bson.h, or libbson-1.0/bson.h for LIBMONGOC – you may have to install LIBMONGOC in your system and/or pass LIBMONGOC_DIR or LIBMONGOC_INCDIR to the luarocks command. Example: luarocks install mongorover LIBMONGOC_DIR=/usr/local
三、安装bson库
官方安装参照:http://api.mongodb.org/libbson/current/installing.html
1 | $ wget https://github.com/mongodb/libbson/releases/download/1.1.10/libbson-1.1.10.tar.gz |
再执行,安装mongorover模块,又报以下错误
Error: Could not find expected file libmongoc-1.0/mongoc.h, or libmongoc-1.0/mongoc.h for LIBMONGOC – you may have to install LIBMONGOC in your system and/or pass LIBMONGOC_DIR or LIBMONGOC_INCDIR to the luarocks command. Example: luarocks install mongorover LIBMONGOC_DIR=/usr/local
四、安装libmongoc库
官方安装参照:http://api.mongodb.org/c/current/installing.html
1 | $ wget https://github.com/mongodb/mongo-c-driver/releases/download/1.1.10/mongo-c-driver-1.1.10.tar.gz |
再执行,安装mongorover模块,安装成功