編譯安裝mysql時報缺少boost1.59後,編譯安裝boost1.59

來源:互聯網
上載者:User

標籤:boost1.59源碼安裝

1、下載:

       網址:https://nchc.dl.sourceforge.net/project/boost/boost/1.59.0/boost_1_59_0.tar.gz

2、編譯:

    2.1 快速安裝Boost:

    在Linux核心的作業系統下安裝boost 1.59.0很容易,最簡單的方式是在Boost解壓縮後的目錄下直接執行命令:

   ./bootstrap.sh   ./b2 install

    第一條命令語句booststrap.sh是編譯前的配置工作,第二條命令b2開始真正的編譯並安裝Boost。由於未指定額外選項,Boost將編譯Release版本的庫檔案,把標頭檔安裝到/usr/local/include,庫檔案安裝到/usr/local/lib。

        2.2 完整安裝Boost:

    完整編譯Boost,使用buildtype選項指定編譯類型(如不指定預設使用release模式),在bootstrap.sh之後執行如下命令:

   ./b2 --buildtype=complete install

          這樣將開始對Boost的完整編譯,安裝所有調試版、發行版的靜態庫和動態庫。

         2.3  定製安裝Boost:

          完整編譯Boost費時費力,在實際開發中這些庫也不會都用到,因此,Boost也允許使用者自行選擇要編譯的庫。執行命令:

    ./b2 --show-libraries

          可查看所有必須編譯才能使用的庫。

          在完全編譯的基礎上,可使用--with或者--without選項開啟或者關閉某個庫的編譯,如:

    ./b2 --with-date_time --buildtype=complete install

         將僅編譯安裝date_time庫。

         一般可使用如下安裝命令:

   sudo ./b2 link=static install       #編譯安裝所有靜態庫

error 解決:

使用需要python庫

否則出現如下error:

./boost/python/detail/wrap_python.hpp:50:23: fatal error: pyconfig.h: No such file or directory
compilation terminated.

"g++" -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -march=i686 -pthread -fPIC -m32 -DBOOST_ALL_NO_LIB=1 -DBOOST_PYTHON_SOURCE -DNDEBUG -I"." -I"/usr/include/python2.7" -c -o "bin.v2/libs/python/build/gcc-5.4.0/release/threading-multi/object/function_doc_signature.o" "libs/python/src/object/function_doc_signature.cpp"

...failed gcc.compile.c++ bin.v2/libs/python/build/gcc-5.4.0/release/threading-multi/object/function_doc_signature.o...

..failed updating 58 targets...
...skipped 12 targets...
...updated 11810 targets...

 

使用

yum -y install python-dev


本文出自 “夜色” 部落格,請務必保留此出處http://liuqun.blog.51cto.com/3544993/1983726

編譯安裝mysql時報缺少boost1.59後,編譯安裝boost1.59

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.