mysql ipk 编译_OpenWrt的ipk包安装
在 make menuconfig 进行裁减 OpenWrt 时,为了让系统更精小一点,我们会把部分功能以“模块”的方式编译,即不编入内核,只是在后期用户可以进行安装与卸载。
包安装示例
如下关于Lua的配置项:
其中 json4lua, lua-cjson, lua-copas, lua-coxpcall 是没有编入原生系统的。
在 make 完成之后。
在 bin/ar71xx/packages/ 路径下全是 ipk 安装包。其中上面对应的安装包就在 bin/ar71xx/packages/packages/ 目录下。
#--开发机--
$ ls lua*
lua-cjson_2.1.0-1_ar71xx.ipk lua-rs232_1.0.3-1_ar71xx.ipk
lua-copas_2.0.0-1_ar71xx.ipk luasocket_3.0-rc1-20130909-3_ar71xx.ipk
lua-coxpcall_1.15.0-1_ar71xx.ipk luasql-mysql_2.3.0-1_ar71xx.ipk
luaposix_v33.2.1-4_ar71xx.ipk luasql-sqlite3_2.3.0-1_ar71xx.ipk
怎么安装到 OpenWrt上呢?
首先,用 scp 将 ipk 包发送到 OpenWrt 系统上。本人的 OpenWrt 的 IP 为 192.168.1.2,以 luasql 为例
#--开发机--
$ scp luasql-mysql_2.3.0-1_ar71xx.ipk root@192.168.1.2:
root@192.168.1.2's password:
luasql-mysql_2.3.0-1_ar71xx.ipk 100% 6441 6.3KB/s 00:00
SSH登入 OpenWrt,查看文件。luasql-mysql_2.3.0-1_ar71xx.ipk 已在 /root/ 目录下了。
#--OpenWrt---
$ opkg install luasql-mysql_2.3.0-1_ar71xx.ipk
Installing luasql-mysql (2.3.0-1) to root...
Collected errors:
* satisfy_dependencies_for: Cannot satisfy the following dependencies for luasql-mysql:
* libmysqlclient *
* opkg_install_cmd: Cannot install package luasql-mysql.
Oops,出师不力(不用惊慌,这也是常常遇到的事儿)~缺 libmysqlclient 库。
那就看看 libmysqlclient 库的 ipk 包有没有。如果 bin/ar71xx/packages 路径下没有,则是 make menuconfig 时没有加进来。这时,修改配置,再make一下就会有了。
在 bin/ar71xx/packages/ 路径下 find 一下。
#--开发机---
$ find -name "libmysqlclient*"
./packages/libmysqlclient_5.1.73-1_ar71xx.ipk
有!那就不用再make一遍了。
同样,用 scp 将 libmysqlclient_5.1.73-1_ar71xx.ipk 文件传送到 OpenWrt。
#--开发机---
$ scp libmysqlclient_5.1.73-1_ar71xx.ipk root@192.168.1.2:
再在 OpenWrt 的 SSH 里安装刚发送过来的 ipk 包。
#--OpenWrt---
$ opkg install libmysqlclient_5.1.73-1_ar71xx.ipk
Installing libmysqlclient (5.1.73-1) to root...
Collected errors:
* satisfy_dependencies_for: Cannot satisfy the following dependencies for libmysqlclient:
* uclibcxx *
* opkg_install_cmd: Cannot install package libmysqlclient.
Oops~Again,libmysqlclient还依赖于uclibcxx库。安装 uclibcxx 库。
#--开发机---
$ scp base/uclibcxx_0.2.4-1_ar71xx.ipk root@192.168.1.2:
#--OpenWrt---
$ opkg install uclibcxx_0.2.4-1_ar71xx.ipk
Installing uclibcxx (0.2.4-1) to root...
Configuring uclibcxx.
uclibcxx库OK了
再来安装 libmysqlclient 库
#--OpenWrt---
$ opkg install libmysqlclient_5.1.73-1_ar71xx.ipk
Installing libmysqlclient (5.1.73-1) to root...
Configuring libmysqlclient.
libmysqlclient库OK了。
最后安装 luasql 库
#--OpenWrt---
$ opkg install luasql-mysql_2.3.0-1_ar71xx.ipk
Installing luasql-mysql (2.3.0-1) to root...
Configuring luasql-mysql.
就这样,luasql 库安装完成了。
在 OpenWrt 系统的 /usr/lib/lua/ 目录下多出一个 luasql 目录,在该目录下有一个 mysql.so 文件。
启动 Lua 试试看:
#--OpenWrt---
$ lua
Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio (double int32)
> require 'luasql.mysql'
成功。
opkg 的使用
opkg 有点类似地 ubuntu 中的 dpkg 包管理工具。常见的用法是:安装、卸载软件包。
usage: opkg [options...] sub-command [arguments...]
where sub-command is one of:
Package Manipulation:
update Update list of available packages
upgrade Upgrade packages
install Install package(s)
configure Configure unpacked package(s)
remove Remove package(s)
flag Flag package(s)
=hold|noprune|user|ok|installed|unpacked (one per invocation)
Informational Commands:
list List available packages
list-installed List installed packages
list-upgradable List installed and upgradable packages
list-changed-conffiles List user modified configuration files
files List files belonging to
search List package providing
find List packages whose name or description matches
info [pkg|regexp] Display all info for
status [pkg|regexp] Display all status for
download Download to current directory
compare-versions
compare versions using <= >= = <>
print-architecture List installable package architectures
depends [-A] [pkgname|pat]+
whatdepends [-A] [pkgname|pat]+
whatdependsrec [-A] [pkgname|pat]+
whatrecommends[-A] [pkgname|pat]+
whatsuggests[-A] [pkgname|pat]+
whatprovides [-A] [pkgname|pat]+
whatconflicts [-A] [pkgname|pat]+
whatreplaces [-A] [pkgname|pat]+
Options:
-A Query all packages not just those installed
-V[] Set verbosity level to .
--verbosity[=] Verbosity levels:
0 errors only
1 normal messages (default)
2 informative messages
3 debug
4 debug level 2
-f Use as the opkg configuration file
--conf
--cache Use a package cache
-d Use as the the root directory for
--dest package installation, removal, upgrading.
should be a defined dest name from
the configuration file, (but can also be a
directory name in a pinch).
-o
--offline-root
--add-arch : Register architecture with given priority
--add-dest : Register destination with given path
Force Options:
--force-depends Install/remove despite failed dependencies
--force-maintainer Overwrite preexisting config files
--force-reinstall Reinstall package(s)
--force-overwrite Overwrite files from other package(s)
--force-downgrade Allow opkg to downgrade packages
--force-space Disable free space checks
--force-postinstall Run postinstall scripts even in offline mode
--force-remove Remove package even if prerm script fails
--force-checksum Don't fail on checksum mismatches
--noaction No action -- test only
--download-only No action -- download only
--nodeps Do not follow dependencies
--nocase Perform case insensitive pattern matching
--force-removal-of-dependent-packages
Remove package and all dependencies
--autoremove Remove packages that were installed
automatically to satisfy dependencies
-t Specify tmp-dir.
--tmp-dir Specify tmp-dir.
regexp could be something like 'pkgname*' '*file*' or similar
e.g. opkg info 'libstd*' or opkg search '*libop*' or opkg remove 'libncur*'
mysql ipk 编译_OpenWrt的ipk包安装相关推荐
- mysql 5.6.23 源码包安装报错_Ubuntu 14.10下编译安装MySQL 5.6.23
1. 安装环境: Ubuntu Server 14.10 MySQL-5.6.23.tar.gz 2. 安装必备的工具 sudo apt-get install make bison g++ buil ...
- mysql 5.6.23 源码包安装报错_大环境下MySQL5.6源码安装实战一步步教你 CentOS6.5_64bit下编译安装...
一.关闭防火墙 chkconfig iptables off service iptables stop 二.检查操作系统上是否安装了MySQL [[email protected] backup]# ...
- mysql 5.6.23 源码包安装报错_CentOS6.5_64bit下编译安装MySQL-5.6.23
************************************************************ CentOS6.5_64bit下编译安装MySQL-5.6.23 ****** ...
- linux安装mysql社区版 rpm_linux系统rpm包安装mysql
最后就是享受你的mysql带来的乐趣: [root@db02 ~]# mysql -uroot -p Enter password: Welcome to the MySQL monitor. Co ...
- mysql 5.7源码包安装教程_MYSQL5.7源码包编译安装
Centos下用cmake编译安装MySQL 5.7 安装依赖包 yum -y install gcc gcc-c++ ncurses ncurses-devel cmake 下载相应源码包 cd / ...
- 用RPM包安装MySQL的默认安装路径问题
在安装PHP时候要对一些配置选项进行设置,其中就有: --with-mysql[=DIR]:包含MySQL扩展,[=DIR]指定mysql安装目录,省略[=DIR]则为默认位置/usr --with- ...
- lamp平台的搭建:mysql的编译安装【转】
2019独角兽企业重金招聘Python工程师标准>>> 本篇主要讲解如何编译安装mysql,写的很完善,转来好了 一:卸载旧版本 使用下面的命令检查是否安装有MySQL Server ...
- 源码包安装mysql_源码包安装MySQL
MySQL安装方式 1.二进制安装2.源码包安装3.rpm包安装 一.源码包安装 源码包安装比较繁琐,但是更加灵活,可以按自己需求配置 1.下载源码包 [root@db03~]# wget https ...
- mysql国内源码安装,mysql 源码包安装
mysql 源码包安装 #downloads 不同的mysql rpm包介绍: MySQL-devel:mysql开发包.针对mysql进行二次开发使用 MySQL-embedded:嵌入式环境使用的 ...
- mysql pacemaker_编译安装MySQL实现corosync+pacemaker+drbd+mysql高可用
编译安装MySQL实现corosync+pacemaker+drbd+mysql高可用 实验拓扑图: 实验节点:节点一:IP:172.16.249.248 host: node1.stu11. ...
最新文章
- 【Android 逆向】IDA 工具使用 ( 交叉引用数量设置 | 调试设置 )
- 贵港天气预报软件测试,贵港天气预报15天
- java 代码发送邮件添加附件_Java实现163邮箱发送邮件到QQ邮箱
- 思维模型篇:五大生命周期理论
- sap wad_使用网真和WAD热部署Kubernetes
- 【kafka】Kafka Fetch Session 剖析
- 中小微企业一大重要数据解析|司法数据指标与报告维度
- typescript vuex_将已有的Vue项目升级支持TypeScript
- Mysql表引擎的切换
- CentOS 7 常用命令
- python数据分析的概念_Python数据分析入门篇
- protel 99se中文版
- 黑苹果固态硬盘_三款小软件解决MacOS黑苹果下电脑固态硬盘测速难题
- jmeter perfMon插件的使用
- [转]脑梗塞的诊治指南
- Hack movies
- Git如何修改commit信息
- LeetCode刷题笔记 - 175.Combine Two Tables
- 互联网最后一个绯闻女友出嫁 大众点评联姻腾讯
- iphone4s改装 linux,iPhone4S降级教程(支持iOS5.1.1)可实现完美越狱