opkg[通俗易懂]

opkg[通俗易懂]opkg是个安装器,小巧,功能全。root@hbg:/#opkgfilesopkgPackageopkg(9c97d5ecd795709c8584e972bfdf3aee3a5b846d-7)isinstalledonrootandhasthefollowingfiles:/bin/opkg–命令存放地/etc/opkg.conf…

大家好,又见面了,我是你们的朋友全栈君。

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*’

 

转载于:https://www.cnblogs.com/rohens-hbg/p/5147391.html

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/130157.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 如何激活成功教程SQLyog 企业版,无限期试用[通俗易懂]

    如何激活成功教程SQLyog 企业版,无限期试用[通俗易懂]如何激活成功教程SQLyog企业版,无限期试用SQLyog是一个功能强大,界面简洁大方的MysqlGUI客户端。截止到这篇博客日期2009-08-15,sqlyog8.13已经释出。其通用版是免费的版本——已经是同类软件的佼佼者了但其打开、关闭软件提示画面,软件界面里灰色的不可用企业功能这是让人心里痒痒!网上也有不少的激活成功教程版,先不管其是否真的完美激活成功教程,这使用激活成功教程的软件总是叫人底气

    2022年9月23日
    4
  • es6 padstart方法不兼容处理

    es6 padstart方法不兼容处理string.polyfill.js /***String.padStart()*version1.0.1*Feature ChromeFirefoxInternetExplorerOpera Safari Edge*Basicsupport 57 51(No) 44 1015…

    2025年10月12日
    3
  • 向 J2EE 架构师 学习之路[通俗易懂]

    向 J2EE 架构师 学习之路[通俗易懂]首先表明下这个只是个人记录,看到觉得很烂莫怪。认真看点书学点知识,脚踏实地的走,记录学到的东西,收获的东西,慢慢的成长。今天心血来潮,想看下书,百度搜索了下到csdn下载了一本《TheJ2EEArchitect’sHandbook》,毕竟想成为J2EE架构师自己觉得自己路还很长,一直觉得自己很笨,做事方法肯定有问题,一会看js,一会看java,一会看j2ee,感觉确认很烦,自己未来…

    2022年6月24日
    28
  • 香农编码熵怎么算_香农范诺编码

    香农编码熵怎么算_香农范诺编码一、香农编码的概念概念:香农编码是是采用信源符号的累计概率分布函数来分配字码的。香农编码是根据香农第一定理直接得出的,指出了平均码长与信息之间的关系,同时也指出了可以通过编码使平均码长达到极限值。香农第一定理是将原始信源符号转化为新的码符号,使码符号尽量服从等概分布,从而每个码符号所携带的信息量达到最大,进而可以用尽量少的码符号传输信源信息。香农编码属于不等长编码,通常将经常出现的

    2025年10月22日
    0
  • java arraylist遍历_java 遍历arrayList的四种方法

    java arraylist遍历_java 遍历arrayList的四种方法importjava.util.ArrayList;importjava.util.Iterator;importjava.util.List;publicclassArrayListDemo{publicstaticvoidmain(Stringargs[]){Listlist=newArrayList();list.add(“luojiahui”);list.add(“…

    2022年7月22日
    9
  • 虚拟存储技术「建议收藏」

    虚拟存储技术「建议收藏」一.实现内存扩充的技术:(1)覆盖技术:在程序运行中,在不同时刻把同一个存储区分配给不同程序段和数据段,实现存储区共享。适用于连续存储(单一连续区分配,分区)如图BDG共享一个存储区(三个进程不同时发生),CEFH同理(2)交换技术(对换技术):1.定义:将内存中某进程的的程序和数据(全部或部分)写入外存的交换区,从而腾出内存空间给其他进程使用。2.相关涉及知识

    2022年9月26日
    1

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号