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)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • win10 卸载cuda10.1

    win10 卸载cuda10.1创建于:@2020.04.19修改于:@2020.04.19文章目录1.背景2.cuda卸载1.背景在尝试安装tensorflow-gpu时,cuda安装版本错误。需要卸载。2.cuda卸载(1)在控制面板中打开【程序】–>【程序和功能】(2)确定要卸载的内容,图中红框内的内容(3)删除C盘里面C:\ProgramFiles\NVIDIAGPUComputi…

    2022年6月16日
    32
  • c#获取当前应用程序所在路径

    一、获取当前文件的路径1.System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName获取模块的完整路径,包括文件名。2.

    2021年12月25日
    45
  • encodeURIComponent() 函数

    encodeURIComponent() 函数

    2021年10月9日
    53
  • 沟通和认同:自我的塑造与展现

    沟通和认同:自我的塑造与展现一、沟通和自我1、自我概念:指对自己所持有的相对稳定的知觉2、自尊:对自我价值的评估3、反映评价:我们每个人得出的自我概念反映的是我们认为别人看待我们的方式4、社会比较:依据与他人对照的方式评估自身5、自我概念是被周遭环境塑造出来的,塑造的过程以两种方式呈现:反映评价和社会比较6、自我概念的特征:6.1、自我概念是主观的(有些人长期乃至永久地经受着过度的自我怀疑和批判之苦)(当我们经历负面情绪的时候要比我们心情好时对自己更挑剔)6.2、自我概念抗拒改变7、接受一个

    2022年6月25日
    30
  • 局域网服务器传输大文件方案,局域网快速传输大文件【操作方案】

    局域网服务器传输大文件方案,局域网快速传输大文件【操作方案】很多小伙伴都遇到过局域网快速传输大文件的困惑吧,一些朋友看过网上零散的局域网快速传输大文件的处理方法,并没有完完全全明白局域网快速传输大文件是如何解决的,今天小编准备了简单的解决办法,只需要按照1:首先需要传递文件的两台电脑之间都需要下载安装一个工具软件飞秋(feiQ),其是一款局域网聊天传送文件的即时通讯软件,如下图所示:2:两台电脑之间通过一根网线连接在一起(通过网线水晶头插入网孔的方式),如…

    2022年5月5日
    154
  • photoscan空三教程(无人机影像三维模型构建)

    PhotoScan无人机影像空三处理流程前言Photoscan是一款操作轻便,速度快的处理软件,以前一直被利用在处理实景三维或者近景建模,但是被用在测绘中,也是十分方便和精准。更重要的是photoscan可以轻松导出其他空三格式文件,后续很方便在Contextcapture进行重建,还可以在航天远景Mapmatrix或者CHCmapping中进行立体测图。本文重点介绍如何进行空三,并导出…

    2022年4月16日
    146

发表回复

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

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