mooc课程精选,成品人片观看入口众乐乐,久久久久人妻一区精品性色av,苍兰诀大结局是什么,白丝美女被狂躁免费视频网站

當前位置:首頁 > 嵌入式培訓(xùn) > 嵌入式學(xué)習(xí) > 講師博文 > 將mysql庫移植到arm板上

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

首先更新虛擬機下載源

sudo apt-get update

在安裝mysql時./configure容易出現(xiàn)錯誤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數(shù)據(jù)庫源碼//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預(yù)處理

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

make install 下載并安裝

完成后可在mysql中出現(xiàn)五個文件夾

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

將lib文件夾下的內(nèi)容拷貝到arm板的lib文件夾下

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

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

上一篇:根文件系統(tǒng)類型

下一篇:libpcap初試

熱點文章推薦
華清學(xué)員就業(yè)榜單
高薪學(xué)員經(jīng)驗分享
熱點新聞推薦
前臺專線:010-82525158 企業(yè)培訓(xùn)洽談專線:010-82525379 院校合作洽談專線:010-82525379 Copyright © 2004-2022 北京華清遠見科技集團有限公司 版權(quán)所有 ,京ICP備16055225號-5京公海網(wǎng)安備11010802025203號

回到頂部