我已经研究并查看了帖子以安装luamongo- http://groups.google.com/group/luamongo/browse_thread/thread/1eaa56974614dc90/c91c842e241aa4de#c91c842e241aa4de
但是安装不起作用。我已经安装了mongodb-10gen版本2.0.3和lua5.1版本5.1.4.10。
如何从https://github.com/moai/luamongo下载luamongo并安装它并将其作为lua脚本中的import语句运行,以便能够写入mongo db?任何建议都会有所帮助,到目前为止我没有尝试过任何建议或阅读能够提供帮助。如果需要更多信息,我会发布。提前谢谢。
答案 0 :(得分:1)
我从我的一个朋友那里得到了这个剧本,应该会有所帮助:
# Download mongodb and driver
wget http://downloads.mongodb.org/cxx-driver/mongodb-linux-x86_64-v2.0-latest.tgz
wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.0.2.tgz
# Extract each
tar xvzf mongodb-linux-x86_64-2.0.2.tgz
tar xvzf mongodb-linux-x86_64-v2.0-latest.tgz
# Add mongo bin to PATH
export PATH=$PATH:~/mongodb-linux-x86_64-2.0.2/bin
# Grab dev tools and dependencies (May need to run apt-get update to download all)
sudo apt-get -y install tcsh scons libpcre++-dev libboost-dev libreadline-dev libboost-program-options-dev libboost-thread-dev libboost-filesystem-dev libboost-date-time-dev gcc g++ git lua5.1-dev make
# Grab latest luamongo (will need to add your github ssh key)
git clone git@github.com:moai/luamongo
# Compile mongo driver
cd mongo-cxx-driver-v2.0
sudo scons install
# Install where lua can load it
sudo cp libmongoclient.* /usr/lib