将mysql库移植到arm板上
来源:互联网 发布:vb语言基础常见语句 编辑:程序博客网 时间:2024/05/22 12:08
From: http://www.embedu.org/Column/9064.html
首先更新虚拟机下载源
sudo apt-get update
在安装mysql时./configure容易出现错误error: No curses/termcap library found
原因是缺少ncurses安装包
解决方法:
sudo apt-cache search ncursessudo 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.gzmkdir ncursescd ncurses-5.9/./configure --prefix=/home/farsight/ncurses CC=arm-none-linux-gnueabi-gcc --host=arm-none-linux-gnueabi --enable-static --enable-sharedmakemake install
安装完成后,开始编译mysql库
首先下载mysql数据库源码http://download.chinaunix.net/download.php?id=34712&ResourceID=7159
将源码拷贝到虚拟机中并解压,进入源码文件
tar xzvf mysql-5.1.51.tar.gzmkdir mysqlcd 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
其他相关:
MySQL数据库在嵌入式Linux平台上的移植和应用 https://wenku.baidu.com/view/0e25d506844769eae109ed04.html
将mysql库移植到arm板上 http://www.embedu.org/Column/9064.html
Sqlite嵌入式数据库移植 http://www.cnblogs.com/d442130165/p/5361054.html
- 将mysql库移植到arm板上
- 将SQLite移植到ARM板上
- 成功将qt程序移植到arm板上
- 将SQLite移植到ARM上
- 将SQLite移植到ARM上
- 移植mysql到arm
- mysql移植到arm
- wxX11移植到arm板上
- Python的移植到arm板上
- opencv2.4.9移植到arm板上
- 将Nodejs移植到Arm
- ffmpeg移植到arm上
- SSH 移植到ARM上
- libzdb移植到ARM上
- glib移植到ARM上
- 移植mysql到ARM平台
- 将node.js移植到arm开发板
- 主机中C程序移植到arm开发板上
- centos7安装Mysql5.7
- java中九种基本数据类型的大小,以及他们的封装类。
- 九度 题目1207:质因数的个数
- C++对象模型解析五
- Eclipse中创建新的Spring Boot项目
- 将mysql库移植到arm板上
- 思维树,人就是信息的载体
- 11. Yii 2.0 Cookie
- Git学习笔记
- OpenCV编程->USB摄像头打不开解决办法
- 【水题】HDU1017A Mathematical Curiosity
- PPT添加视频的路径问题
- lk启动流程分析
- dva-knowledgemap