新聞中心
按照官網(wǎng)(https://github.com/MongoDB/mongo-cxx-driver/wiki/Quickstart-Guide-(New-Driver))上說(shuō)的,C++ driver內(nèi)部使用了libbson和 MongoDB C driver。所以要安裝C++ driver,需要先安裝C driver。我的系統(tǒng)gcc版本4.8.5,cmake版本3.5.2,達(dá)到官網(wǎng)要求的安裝版本。
創(chuàng)新互聯(lián)從2013年開(kāi)始,是專業(yè)互聯(lián)網(wǎng)技術(shù)服務(wù)公司,擁有項(xiàng)目網(wǎng)站制作、網(wǎng)站設(shè)計(jì)網(wǎng)站策劃,項(xiàng)目實(shí)施與項(xiàng)目整合能力。我們以讓每一個(gè)夢(mèng)想脫穎而出為使命,1280元咸寧做網(wǎng)站,已為上家服務(wù),為咸寧各地企業(yè)和個(gè)人服務(wù),聯(lián)系電話:13518219792
1.安裝automake, autoconf and libtool,這里全部yum安裝即可
yum -y install automake autoconf libtool
2.安裝C driver,按照官網(wǎng)(https://github.com/mongodb/mongo-c-driver)給的安裝方法安裝。這里我裝的是1.3.5版本。
wget https://github.com/mongodb/mongo-c-driver/releases/download/1.3.5/mongo-c-driver-1.3.5.tar.gz tar xzf mongo-c-driver-1.3.5.tar.gz cd mongo-c-driver-1.3.5 ./configure make make install
3.安裝C++ driver,按照官網(wǎng)(https://github.com/mongodb/mongo-cxx-driver/wiki/Quickstart-Guide-(New-Driver))給的安裝方法安裝。這里我裝的是3.0.1版本。
wget https://github.com/mongodb/mongo-cxx-driver/archive/r3.0.1.tar.gz tar xzf r3.0.1.tar.gz cd mongo-cxx-driver-r3.0.1/build #需要先安裝好git,yum -y install git,不然會(huì)報(bào)錯(cuò) PKG_CONFIG_PATH=/usr/local/lib/pkgconfig cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/ .. make make install
網(wǎng)站題目:Centos7安裝Mongodb的C++driver
文章源于:http://fisionsoft.com.cn/article/pcpigc.html