Comments (5)
No worries, man!
Now let's see what your
$ nm -D /usr/lib/libmongoc-1.0.so | grep mongoc_database_drop
has to say.
On my Arch with libmongoc-1.9.3, it produces the following:
$ nm -D /usr/lib/libmongoc-1.0.so | grep mongoc_database_drop
000000000002f800 T mongoc_database_drop
000000000002f6d0 T mongoc_database_drop_with_opts
which shows that mongoc_database_drop_with_opts()
is defined.
If your output is different, the version of the underlying binaries the package contains is probably far from 1.9.3 to say the least. Try uninstalling the package and building libmongoc
from source. For example, this is what we do on our Debian Stretch images:
# libmongoc
wget https://github.com/mongodb/mongo-c-driver/releases/download/1.9.3/mongo-c-driver-1.9.3.tar.gz
tar -xvzf mongo-c-driver-1.9.3.tar.gz
cd mongo-c-driver-1.9.3
./configure --enable-extra-align=no
make
make install
# lua-mongo
luarocks install lua-mongo 1.1.0
and it works without a hitch.
After you have done the above, repeat the ldd
and nm
checks you've made to make sure lua-mongo
is linked against the correct .so-library (the one that you built and installed from source).
from lua-mongo.
What system are you on? luarocks
is unable to check versions of external dependencies. I suspect your lua-mongo
module is linked against an older version of mongoc
because mongoc_database_drop_with_opts()
is around since mongoc-1.7.0
.
Please check ldd's output for your mongo.so
instance:
ldd /usr/local/lib/lua/5.1/mongo.so
to make sure it's linked against the correct version (1.9.0 or higher).
Additionally, you could try building with CMake which will strict check versions of installed dependencies prior to building and enable you to run tests. This could be helpful to discover more about the issue.
from lua-mongo.
by the way does it support replica set?
lua-mongo
is a binding to mongo-c-driver
, so it virtually supports everything that is supported by the underlying driver (within the provided API, of course). Since replica set is supported by the driver, it is supported by lua-mongo
as well. Check out this link for example: https://docs.mongodb.com/manual/reference/connection-string/#replica-set-option
from lua-mongo.
Hey Arseny,
Thanks for your quick response.
I am on Debian 8, here is the output of ldd /usr/local/lib/lua/5.1/mongo.so
linux-vdso.so.1 (0x00007ffe051bc000)
libmongoc-1.0.so.0 => /usr/lib/libmongoc-1.0.so.0 (0x00007f070b163000)
libbson-1.0.so.0 => /usr/lib/libbson-1.0.so.0 (0x00007f070af36000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f070ab8b000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f070a88a000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f070a682000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f070a465000)
/lib64/ld-linux-x86-64.so.2 (0x00007f070b59c000)
I have installed libmongoc from Debian testing repo
libmongoc-1.0-0 1.9.3+dfsg-2 amd64 MongoDB C client library - runtime files
Thanks,
Arsen.
from lua-mongo.
I've rebuilt libmongoc and it works like a charm now even with replica set :)
Thanks for your great support!
from lua-mongo.
Related Issues (20)
- Requiring the library from Lua results in error ("undefined symbol: lua_tointeger") HOT 12
- Find method how to select the specified column? HOT 1
- have a question HOT 1
- Install error HOT 5
- undefined symbol: mongoc_collection_replace_one HOT 4
- i have problem guy.how to find or aggregation ISODate. HOT 1
- Compile error HOT 2
- nginx content_by_lua_block gives an error if ssl is used HOT 3
- Process aborts due to a zero server_id HOT 1
- Session support HOT 4
- Unable to install lua-mongo with luarocks HOT 2
- insertOne question HOT 1
- cant get build via luarocks in windows HOT 1
- How to install on Windows? HOT 3
- When mongo has username and password, how can I do? HOT 2
- How to create a TTL index? HOT 4
- Lua-mongo can't be used with mongo-c-driver_v1.19 HOT 2
- Cannot create bson document with array indexed by numbers HOT 3
- building with luarocks mingw64 HOT 7
- The specified module could not be found? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lua-mongo.