Questions tagged [libmongoc]
11 questions
9
votes
5 answers
MongoDB Exception: Server reports wire version 0, but version of libmongoc requires at least 3
Fatal error: Uncaught MongoDB\Driver\Exception\ConnectionException: Server at localhost:27017 reports wire version 0, but this version of libmongoc requires at least 3 (MongoDB 3.0)
I have PHP 7.0.13, MAMP and MongoDB. The MongoDB extension for PHP…

Weirdali
- 413
- 1
- 7
- 16
3
votes
0 answers
Can't connect with SSL/TLS to mongodb
I'm trying to connect through SSL to a local mongodb instance through libmongoc. The connection works just fine if I don't use SSL, and I can do CRUD operations normally, but when I enable SSL and try to retrieve some data, the mongoc_cursor_next()…

Tyras
- 103
- 1
- 7
1
vote
0 answers
How to get number of documents returned in a cursor from a query in mongodb in C?
I am looking for a good way to get the number of documents returned by a query to mongodb in C language.
I am looking for something what cursor.count() does in python. But cannot find anything that could help me when I have to do the same work in C…

Rishabh Jain
- 21
- 3
1
vote
0 answers
fatal error: bson/bson.h: No such file or directory
I want to use libmongoc for my C program but whenever I try to establish a connection to my cloud database, it shows an error:
/usr/local/include/libmongoc-1.0/mongoc/mongoc.h:22:10: fatal error: bson/bson.h: No such file or directory
22 |…

lakshya
- 105
- 3
- 9
1
vote
0 answers
build mongo c driver
I'm trying to build the C driver with Kerberos support, from
mongo-c-driver-1.10.3.tar.gz. I'm on Ubuntu 16.04, 64-bit Intel, with gcc
5.4.0. I run CMake like::
$ cmake -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF ..
...
-- Build files have…

leao
- 11
- 1
1
vote
1 answer
Error connecting to mongoDB using Mongolite
I'm having issues connecting to my MongoDB via Mongolite, and I'm not sure if it is an issue on my side, or if I need to use a different package to connect to the database. Please keep in mind that I cannot change the software being run by the…

FiveCents
- 25
- 3
1
vote
1 answer
Running shell methods via libmongoc?
I'm trying to figure out if it's possible to run shell methods via libmongoc. I can run database commands by using the method mongoc_client_command. So for example, I can run listDatabases through mongoc_client_command, but I cannot run…

Kyle
- 17,317
- 32
- 140
- 246
0
votes
0 answers
Ubuntu Qt Cross Compiling: libmongocxx.so file is not recognized
Host: Ubuntu 22.04.1 LTS x64_86
Target: Raspberry Pi 4B Raspbian 10 (buster) 32bits
Qt Version: 5.15.7
MongoC and MongoCXX libraries built from source on both Host and Target. Checked libraries files and they are present in their locations (both…
0
votes
0 answers
While connecting to mongodb via PHP7.2 laravel, I am getting following error:
error : The SCRAM_SHA_256 authentication mechanism requires libmongoc built with ENABLE_SSL
i tried to configure and in terminal i found this when i run
php -i | grep mongo
mongodb libmongoc bundled version => 1.16.2 libmongoc SSL =>…

Pratik Vekariya
- 45
- 8
0
votes
1 answer
Error in createIndexes: Failed to send "createIndexes" command with database "mydb": Failed to read 4 bytes: socket error or timeout
I have been recently migrating python code to C using libmongoc-1.0 1.15. I am having troubles creating indexes. I am following the example here. I think it has something to do with me using MongoDB 4.2 since it changed all indexes to be background…

Yuki
- 3,857
- 5
- 25
- 43
0
votes
0 answers
How can I add and compile mongoc source code in projects and using locally (CMakeList config)
I want to add mongoc source code to My project then compile, build and use it locally without installing libmongoc on the system(Ubuntu). I want My project source code to be portable without having to install any library dependencies like mongoc in…

mohammad-nazari
- 51
- 7