opkg是个安装器,小乔,功能全。

root@hbg:/# opkg files opkg
Package opkg (9c97d5ecd795709c8584e972bfdf3aee3a5b846d-7) is installed on root and has the following files:
/bin/opkg             --命令存放地
/etc/opkg.conf      --配置文件

查看已经安装的包信息:

cat /usr/lib/opkg/status

root@hbg:# cat /usr/lib/opkg/status
Package: snmp-utils          --包名称
Version: 5.4.4-1               --版本信息
Depends: libc, libnetsnmp      --依赖库
Status: install user installed   --状态信息,用户后来安装,还是包安装时已经内置的
Architecture: ar71xx             --架构信息
Installed-Time: 1450492264  --安装时间

Package: kmod-usb-storage
Version: 3.10.49-1
Depends: kernel (= 3.10.49-1-df26e12aa07bfcf42c989a3a108d9f47), kmod-scsi-core, kmod-usb-core
Status: install hold installed
Architecture: ar71xx
Installed-Time: 1450492264

安装包的详细信息

/usr/lib/opkg/info

列表信息:

/usr/lib/opkg/list

目前支持的操作:

root@hbg:/# opkg
opkg must have one sub-command argument
usage: opkg [options...] sub-command [arguments...]
where sub-command is one of:

Package Manipulation:
        update                  Update list of available packages                        --更新所有可以更新的包
        upgrade <pkgs>          Upgrade packages                                      --更新某个包
        install <pkgs>          Install package(s)                                           --安装某个包
        configure <pkgs>        Configure unpacked package(s) 
        remove <pkgs|regexp>    Remove package(s)                                 --移除某个包
        flag <flag> <pkgs>      Flag package(s)
         <flag>=hold|noprune|user|ok|installed|unpacked (one per invocation)

Informational Commands:
        list                    List available packages                                           --列出所有可以列出的包
        list-installed          List installed packages                                        --列出安装的包     (在本地设备中测试出跟list命令结果一样)
        list-upgradable         List installed and upgradable packages       --列出安装的可以更新的包
        list-changed-conffiles  List user modified configuration files                --列出用户更改过配置文件的包
        files <pkg>             List files belonging to <pkg>
        search <file|regexp>    List package providing <file>
        find <regexp>           List packages whose name or description matches <regexp>
        info [pkg|regexp]       Display all info for <pkg>                                --列出相关包的信息
        status [pkg|regexp]     Display all status for <pkg>                           --列出相关包的状态
        download <pkg>          Download <pkg> to current directory
        compare-versions <v1> <op> <v2>
                            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[<level>]             Set verbosity level to <level>.
        --verbosity[=<level>]   Verbosity levels:
                                        0 errors only
                                        1 normal messages (default)
                                        2 informative messages
                                        3 debug
                                        4 debug level 2
        -f <conf_file>          Use <conf_file> as the opkg configuration file
        --conf <conf_file>
        --cache <directory>     Use a package cache
        -d <dest_name>          Use <dest_name> as the the root directory for
        --dest <dest_name>      package installation, removal, upgrading.
                                <dest_name> should be a defined dest name from
                                the configuration file, (but can also be a
                                directory name in a pinch).
        -o <dir>                Use <dir> as the root directory for
        --offline-root <dir>    offline installation of packages.
        --add-arch <arch>:<prio>        Register architecture with given priority
        --add-dest <name>:<path>        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*'

opkg的更多相关文章

  1. openwrt opkg update wget returned 4 wget returned 1

    最近在正捣鼓mt7620芯片的路由器,刷入openwrt Pandora系统以后想装wifidog实现web认证. 我用我自己的一个水星的路由器PPPOE拨号,通过水星的lan口连接网线到我openw ...

  2. openwrt上opkg更新报错&quot;opkg_download: Failed to download .............&quot;

    開始搞op的时候,看到op居然能够直接安装一些插件.激动坏了,由于这东西对嵌入式的小系统来说简直不敢想,可是op就支持了,就是这么任性. 好不easy编译了固件.依照网上的教程.telnet进去.首先 ...

  3. OpenWrt配置opkg.conf

    傻人干活才累. 用openwrt有一年多了, 数据传输一直使用wget从外部的webserver取. 这样的方法我个人认为还算轻松. 可是调试的多了,写大型一点的程序,总是这样就有点麻烦了. 安装软件 ...

  4. R8500 MPv2 版本 刷 Kong编译的 ddwrt 后,使用Entware-ng 安装opkg安装第三方软件

    先说R8500吧. 由于Netgear网件的问题导致R8500在去年双11前夕出现了全球范围的Boot Loop的问题,现象为新设备开机一段时间后,路由器进入不停重启的状态,电源灯桔黄色.在和网件工程 ...

  5. OpenWrt包管理软件opkg的使用(极路由)

    说明: 1.OpenWrt本身系统没什么问题,关键点是一些路由器尝试的限制,比如一些厂商设置成内存分区为只读,那么这个安装软件就变得没什么意义了. 2.opkg的操作有点反人类,正常步骤是查询,安装: ...

  6. opkg 不能更新和安装openwrt软件的方法

    首先,将所有的IPK 放在自己的虚拟HTTP服务器上.2,用Telnet进入路由器,使用VI编辑器,编程Opkg.conf,命令:       vi /etc/opkg.conf3,修改文件,将第一行 ...

  7. 小米r3g旧版开发版固件,安装opkg

    1.开启ssh 1.1.刷入固件 在路由器更新界面,刷入 miwifi_r3g_firmware_c2175_2.25.122.bin 固件 下载地址: http://bigota.miwifi.co ...

  8. 【ARM-Linux开发】如何使用opkg在RicoBoard上在线安装软件包

    类似于debian的apt-get,Redhat的yum类似,嵌入式Linux平台可以使用opkg实现在线安装软件包的功能,在我们提供的matrix文件系统中,已经包含了opkg工具,但是还没有配置一 ...

  9. 10年前文章_使用opkg 管理软件更新

    为避免调试过程中每次都要刷写flash, 可以使用opkg 管理工具来实现单个包更新 一.首先配置http 服务器,使之能访问生成的ipkg 格式的包,例如你的工作目录在/home/xxx/build ...

随机推荐

  1. linux 学习-用户&群组&权限

    Linux用户&群组&权限  ⦁ Linux安全性模型   1)Linux使用User和Group控制使用者对文件的存取权限   2)用户使用账号和口令登录Linux   3) ...

  2. spring mvc @ResponseStatus 注解 注释返回中文乱码的问题

    前言 前文中讲到,使用@ResponseStatus注解,可以修饰一个异常类,在发生异常的时候返回指定的错误码和消息,在返回的 reason中包含中文的时候,就会出现中文乱码的问题 现象 reason ...

  3. hadoop bug 笔记

    1.sqoop从mysql导入数据到hdfs的时候,总是在本地运行,而没有运行在集群上 sqoop  配置文件的问题 在 /usr/lib/sqoop/conf 目录下新增文件 sqoop-env.s ...

  4. app兼容性测试的几种方案

    1.统计自己的应用被使用的数据 通过友盟或Flurry等在应用嵌入,得到应用在哪些机型上被安装了,排名前十的就是测试的重点机型 2.可参考兼容性测试平台的测试结果 比如Testin或百度的MTC平台, ...

  5. C/C++-style输入输出函数

    C风格的输入输出 (1) int getchar() 与 int putchar(int c) getchar从stdin输入流中读取字符,每次只能读取一个字符.若想一次性读取多个字符,则可将其放入循 ...

  6. 基于AFN的多张图片上传

    不废话,直接上代码 NSString *urlString = [NSString stringWithFormat:@"http://192.168.1.166:8080/Discipli ...

  7. Android服务

    开启服务 (startservice) 服务一旦开启与调用者没有任何的关系 , 调用着的activity 即便是退出了 也不会影响 后台的service的运行. 在activity里面 不能去调用服务 ...

  8. String to Double出现误差

    场景描述 做实际项目的时候,由于使用Double类的valueOf得到一个用String类型保存的金额参数(单位为元),当需要转换成以分为单位即整形表示(Integer类表示)时,需要用之前得到的do ...

  9. 使用Java注解开发自动生成SQL

    使用注解开发的好处就是减少配置文件的使用.在实际过程中,随着项目越来越复杂,功能越来越多,会产生非常多的配置文件.但是,当配置文件过多,实际维护过程中产生的问题就不容易定位,这样就会徒劳的增加工作量. ...

  10. linux下获取硬盘、内存、U盘大小及使用大小

    /* * 获取硬盘大小;内存大小;usb大小 */ #ifndef SYSINFOGET_H #define SYSINFOGET_H #include <stdio.h> //磁盘信息 ...