本部落格在linux下編譯使用c++ mongodb driver
the c++ driver uses libbson and the mongodb c driver internally.
安裝c++driver前需要先安裝libbson 和 c driver:
$ sudo apt-get install pkg-config libssl-dev libsasl2-dev如果都配置正確的話機會看到:wget
$ tar xzf mongo-c-driver-1.3.5.tar.gz
$cd mongo-c-driver-1.3.5/
$ ./configure
libmongoc was configured with the following options:mongo-c-driver 已經包含了 libbson , make 安裝:build configuration:
enable debugging (slow) : no
compile with debug symbols (slow) : no
enable gcc build optimization : yes
enable automatic binary hardening : yes
code coverage support : no
cross compiling : no
fast counters : no
sasl : sasl2
ssl : yes
libbson : bundled
documentation:
generate man pages : no
install man pages : no
$ make$ sudo make install
$git clone -b master$git checkout r3.0.0
$cd build/
$cmake -dcmake_build_type=release -dcmake_install_prefix=/usr/local ..
$sudo make ; //注意這裡要加上sudo許可權 因為上一條命令加上了 /usr/local
$sudo make install
vim ~/.bashrc編寫例項**,參考後續部落格export ld_library_path=/usr/lib/:$ld_library_path
export ld_library_path=/usr/local/lib/:$ld_library_path
export pkg_config_path=/usr/local/lib/pkgconfig/:$pkg_config_path //新增這個環境變數,不然pkg-config找不到庫的路徑
參考:
/wiki/quickstart-guide-(new-driver)
搭建開發環境
1.py3 預設帶虛擬環境。scripts virtualenv.exe scripts virtualenv.exe file name2.啟動虛擬環境.windows下 cmd 下執行activate.bat 啟用虛擬環境 scripts activate.bat 退出環境 scripts de...
開發環境搭建
1 在ubuntu上面安裝ftp服務 book 100ask sudo apt get install vsftpdbook 100ask sudo vi etc vsftpd.conf local enable yes write enable yes book 100ask sudo etc i...
go語言開發環境搭建 GO語言開發環境搭建
go語言支援以下系統1 linux 2 freebsd 3 mac os x 也稱為 darwin 4 windows 本文以linux系統進行展開 將將 usr local go bin 目錄新增至path環境變數 export path path usr local go bin重啟 sourc...