久久婷婷香蕉热狠狠综合,精品无码国产自产拍在线观看蜜,寡妇房东在做爰3,中文字幕日本人妻久久久免费,国产成人精品三上悠亚久久

當前位置:首頁 > 嵌入式培訓 > 嵌入式學習 > 講師博文 > 將mysql庫移植到arm板上

將mysql庫移植到arm板上 時間:2018-09-29      來源:未知

首先更新虛擬機下載源

sudo apt-get update

 在安裝mysql時./configure容易出現錯誤error: No curses/termcap library found

原因是缺少ncurses安裝包

解決方法:

sudo apt-cache search ncurses

sudo apt-get install libncurses5-dev

如果要將庫移植到arm板上的話就需要下載ncurses包進行安裝

下載ncurses-5.9.tar.gz

 ftp://ftp.gnu.org/gnu/ncurses/ncurses-5.9.tar.gz

先安裝ncurses

tar -xzvf ncurses-5.9.tar.gz

mkdir ncurses

cd ncurses-5.9/

 ./configure --prefix=/home/farsight/ncurses CC=arm-none-linux-gnueabi-gcc --host=arm-none-linux-gnueabi --enable-static --enable-shared

make

make install

安裝完成后,開始編譯mysql庫

 首先下載mysql數據庫源碼//download.chinaunix.net/download.php?id=34712&ResourceID=7159

將源碼拷貝到虛擬機中并解壓,進入源碼文件

tar xzvf mysql-5.1.51.tar.gz

mkdir mysql

cd mysql-5.1.51/

修改文件中的configure配置文件(注釋掉不允許交叉編譯的部分)

 修改配置文件:打開configure,可以使用gedit configure 分別在第26453行、 48175行、 48282行、 48485行附近有類似代碼: 

         if test "$cross_compiling" = yes; then 

        { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 

         { { $as_echo "$as_me:$LINENO: error: cannot run test program while cross 

        compiling See \`config.log' for more details." >&5 

        $as_echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} 

         { (exit 1); exit 1; }; }; } 

        Else 

        將這些代碼改為: 

         if test "$cross_compiling" = yes;  then 

         echo “skip …..!” 

        #{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 #$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 

        #{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 

        #$as_echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} 

         #{ (exit 1); exit 1; }; }; } 

        Else 

         一定注意,這樣的代碼有4部分,要全部改掉

接下來進行庫的安裝

 ./configure --prefix=/home/farsight/mysql CC=arm-none-linux-gnueabi-gcc --host=arm-none-linux-gnueabi 

--enable-static --enable-shared預處理

make 編譯(在這個過程中可能會出現一個錯誤,但是對庫的影響不大,可忽略)

make install 下載并安裝

完成后可在mysql中出現五個文件夾

需要將include文件夾下的文件考到/usr/include下進行編譯

將lib文件夾下的內容拷貝到arm板的lib文件夾下

在虛擬機中進行編譯時需要注意如果連接不到庫可在編譯時加入連接庫的方式

-L//home/farsight/mysql/lib/mysql

上一篇:根文件系統類型

下一篇:libpcap初試

熱點文章推薦
華清學員就業榜單
高薪學員經驗分享
熱點新聞推薦
前臺專線:010-82525158 企業培訓洽談專線:010-82525379 院校合作洽談專線:010-82525379 Copyright © 2004-2022 北京華清遠見科技集團有限公司 版權所有 ,,京公海網安備11010802025203號

回到頂部