目次
文書の過去の版を表示しています。
パッケージ管理
使い方
# opkg -help
opkg: unrecognized option: h
opkg: unrecognized option: e
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-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
--no-check-certificate Don't validate SSL certificates
--noaction No action -- test only
--download-only No action -- download only
--nodeps Do not follow dependencies
--nocase Perform case insensitive pattern matching
--size Print package size when listing available packages
--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.
-l Specify lists-dir.
--lists-dir Specify lists-dir.
regexp could be something like 'pkgname*' '*file*' or similar
e.g. opkg info 'libstd*' or opkg search '*libop*' or opkg remove 'libncur*'
利用可能なパッケージリストを更新
# opkg update Downloading https://fw.gl-inet.com/releases/kmod-3.2/ar71xx/nand/Packages.gz Updated list of available packages in /var/opkg-lists/glinet_core Downloading https://fw.gl-inet.com/releases/packages-3.x/ar71xx/sync_kmod-3.2/Packages.gz Updated list of available packages in /var/opkg-lists/glinet_sync Downloading https://fw.gl-inet.com/releases/packages-3.x/ar71xx/base/Packages.gz Updated list of available packages in /var/opkg-lists/glinet_base Downloading https://fw.gl-inet.com/releases/packages-3.x/ar71xx/gli_pub/Packages.gz Updated list of available packages in /var/opkg-lists/glinet_gli_pub Downloading https://fw.gl-inet.com/releases/packages-3.x/ar71xx/packages/Packages.gz Updated list of available packages in /var/opkg-lists/glinet_packages Downloading https://fw.gl-inet.com/releases/packages-3.x/ar71xx/luci/Packages.gz Updated list of available packages in /var/opkg-lists/glinet_luci Downloading https://fw.gl-inet.com/releases/packages-3.x/ar71xx/routing/Packages.gz Updated list of available packages in /var/opkg-lists/glinet_routing Downloading https://fw.gl-inet.com/releases/packages-3.x/ar71xx/telephony/Packages.gz Updated list of available packages in /var/opkg-lists/glinet_telephony Downloading https://fw.gl-inet.com/releases/packages-3.x/ar71xx/glinet/Packages.gz Updated list of available packages in /var/opkg-lists/glinet_glinet
インストール済みパッケージ一覧
# opkg list-installed ath10k-firmware-qca9887 - 2018-04-19-71e50312-1 base-files - 194-r7258-5eb055306f blkid - 2.32-2 ~省略~ wpa-cli - 2018-04-09-fa617ee6-5 wpad - 2018-04-09-fa617ee6-5 wwan - 2014-07-17-1 zlib - 1.2.11-2
該当パッケージの絞り込み
# opkg list-installed | grep luci liblucihttp - 2018-05-18-cb119ded-1 liblucihttp-lua - 2018-05-18-cb119ded-1 luci - git-18.196.56128-9112198-1 luci-app-firewall - git-18.196.56128-9112198-1 luci-app-minidlna - git-18.196.56128-9112198-1 luci-base - git-18.196.56128-9112198-1 luci-lib-ip - git-18.196.56128-9112198-1 luci-lib-json - git-18.196.56128-9112198-1 luci-lib-jsonc - git-18.196.56128-9112198-1 luci-lib-nixio - git-18.196.56128-9112198-1 luci-mod-admin-full - git-18.196.56128-9112198-1 luci-mod-rpc - git-18.196.56128-9112198-1 luci-proto-ipv6 - git-18.196.56128-9112198-1 luci-proto-ppp - git-18.196.56128-9112198-1 luci-theme-bootstrap - git-18.196.56128-9112198-1
インストール可能なパッケージ一覧
# opkg list ath10k-firmware-qca9887 - 2018-04-19-71e50312-1 base-files - 194-r7258-5eb055306f blkid - 2.32-2 ~省略~ wpad - 2018-04-09-fa617ee6-5 wwan - 2014-07-17-1 zlib - 1.2.11-2
該当パッケージの絞り込み
# opkg list | grep gdisk gdisk - 1.0.3-1
現在アップグレード可能なパッケージを全て更新
# opkg list-upgradable | cut -f 1 -d ' ' | xargs opkg upgrade