Re: LuaMongo Question

115 views
Skip to first unread message

Evan Wies

unread,
Mar 24, 2012, 1:22:54 AM3/24/12
to Haley S., nr...@iinet.net.au, luam...@googlegroups.com
Hi Haley,

You are the second person to do this...

The mongodb cxx-driver is new thing -- luamongo doesn't use it (but maybe it should when the driver is more official). 

luamongo uses the C++ header/libs from the main mongodb installation.   It looks like you are on debian/ubuntu, so install mongodb-dev.  Or build it and install from source.   And don't install the cxx-driver with "sudo cp libmongoclient.* /usr/lib"

Good luck,
Evan




On 3/22/12 8:27 AM, Haley S. wrote:
Neil or Evan,
I have been trying to get luamongo installed and working properly for a while 
now and I am at a loss as to why it isn't working. The instructions 
I followed to get it installed are below. They seemed to work, meaning I 
received no errors, but when I create a .lua file and try to run it, it says 
"require:command not found" and if I try it in lua shell it says "loop or previous
error loading module 'mongo'". Any thoughts as to why this will not work?

Thank you,
Haley Sibley


# 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-option

s-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

Reply all
Reply to author
Forward
0 new messages