mongoDB C驱动编译安装

参考http://mongoc.org/libmongoc/current/installing.html

$ wget https://github.com/mongodb/mongo-c-driver/releases/download/x.y.z/mongo-c-driver-x.y.z.tar.gz
$ tar xzf mongo-c-driver-x.y.z.tar.gz
$ cd mongo-c-driver-x.y.z
$ mkdir cmake-build
$ cd cmake-build
$ cmake -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF ..
$ make
$ sudo make install

如:
$ wget https://github.com/mongodb/mongo-c-driver/releases/download/1.17.3/mongo-c-driver-1.17.3.tar.gz
$ tar xzf mongo-c-driver-1.17.3.tar.gz
$ cd mongo-c-driver-1.17.3
$ mkdir cmake-build
$ cd cmake-build
$ cmake -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF ..

$ make
$ sudo make install

你可能感兴趣的:(服务端开发)