2012-03-20 120 views
0

安装LuaMongo我已经研究和观察后安装luamongo- http://groups.google.com/group/luamongo/browse_thread/thread/1eaa56974614dc90/c91c842e241aa4de#c91c842e241aa4de在Ubuntu 11.10

但安装将无法正常工作。我已经安装了mongodb-10gen版本2.0.3和lua5.1版本5.1.4.10。

如何从https://github.com/moai/luamongo下载luamongo并安装并在lua脚本中将其作为导入语句工作以便能够写入mongo db?任何建议都会有所帮助,迄今为止我所尝试过的或读过的东西都无法提供帮助。如果需要更多信息,我会发布它。提前致谢。

回答

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 [email protected]: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 
+0

我不能做混帐克隆得到luamongo,你可以与设在GitHub上的http地址wget的? – user1281838 2012-03-21 13:54:34