2012-03-20 121 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