#1 2008-12-04 22:22:52
[OpenWrt] opkg 套件管理
在OpenWrt裡提到opkg. 以下是opkg說明
opkg version 0.1.5
usage: opkg [options...] sub-command [arguments...]
where sub-command is one of:
Package Manipulation:
update Update list of available packages
upgrade Upgrade all installed packages to latest version
install Download and install (and dependencies)
install Install package
configure [] Configure unpacked packages
remove Remove package
flag ... Flag package(s)
=hold|noprune|user|ok|installed|unpacked (one per invocation)
Informational Commands:
list List available packages and descriptions
list_installed List all and only the installed packages and description
files List all files belonging to
search Search for a package providing
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 prints the architecture.
print_installation_architecture
whatdepends [-A] [pkgname|pat]+
whatdependsrec [-A] [pkgname|pat]+
whatprovides [-A] [pkgname|pat]+
whatconflicts [-A] [pkgname|pat]+
whatreplaces [-A] [pkgname|pat]+
prints the installation architecture.
Options:
-A Query all packages with whatdepends, whatprovides, whatreplaces, whatconflicts
-V Set verbosity level to . If no value is
--verbosity provided increase verbosity by one. Verbosity levels:
0 errors only
1 normal messages (default)
2 informative messages
3 debug output
-f Use as the opkg configuration file
-conf Default configuration file location
is /etc/opkg.conf
-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 Use as the root directory for
-offline offline installation of packages.
Force Options (use when opkg is too smart for its own good):
-force-depends Make dependency checks warnings instead of errors
Install/remove package in spite of failed dependences
-force-defaults Use default options for questions asked by opkg.
(no prompts). Note that this will not prevent
package installation scripts from prompting.
-force-reinstall Allow opkg to reinstall a package.
-force-overwrite Allow opkg to overwrite files from another package during an install.
-force-downgrade Allow opkg to downgrade packages.
-force_space Install even if there does not seem to be enough space.
-noaction No action -- test only
-nodeps Do not follow dependences
-force-removal-of-dependent-packages
-recursive Allow opkg to remove package and all that depend on it.
-autoremove Allow opkg to remove packages that where installed automatically to satisfy dependencies.
-test No action -- test only
-t Specify tmp-dir.
--tmp-dir Specify tmp-dir.
regexp could be something like 'pkgname*' '*file*' or similar
eg: opkg info 'libstd*' or opkg search '*libop*' or opkg remove 'libncur*'
尚未比較與ipkg的差異, 不知是否會取代ipkg?
離線
#3 2009-10-19 22:12:17
#4 2011-08-12 11:18:54
Re: [OpenWrt] opkg 套件管理
為了不與Optware的ipkg-opt產生衝突混淆, 編譯Opkg套件管理程式.
編譯平台: Mageia x86_64
交叉編譯器: wl500g Toolchain (gcc 4.4.6 uClibc 0.9.32) K26 x86_64 build 2011.07.08
1. 下載, 解壓縮, 說明
$ aria2c http://opkg.googlecode.com/files/opkg-0.1.8.tar.gz
$ tar -xzvf opkg-0.1.8.tar.gz
$ cd opkg-0.1.8/
$ ./configure --help
2. 編譯
$ export PATH=/opt/brcm/hndtools-mipsel-uclibc/bin:$PATH
$ export CC=mipsel-uclibc-gcc
$ export CPP=mipsel-uclibc-cpp
$ ./configure --disable-curl --disable-gpg --host=mipsel-linux --prefix=/opt --with-opkglibdir=/opt/lib
...
$ make
3. 結果
$ file src/.libs/opkg-cl
src/.libs/opkg-cl: ELF 32-bit LSB executable, MIPS, MIPS32 version 1, dynamically linked (uses shared libs), with unknown capability 0xf41 = 0x756e6700, with unknown capability 0x70100 = 0x1040000, stripped
4. 測試(Tomato PL K26@WL-500W)
# opkg-cl
opkg-cl: unknown sub-command (null)
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 Upgrade installed 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)
...
備註:
--with-ipkgetcdir=DIR 無效, configure: WARNING: unrecognized options: --with-ipkgetcdir
離線
相關討論主題
主題 | 回覆 | 點閱 | 最後發表 |
---|---|---|---|
openwrt 破解WIFI 作者 zhengguowang132
|
0 | 11873 | 2017-10-20 18:12:09 作者 zhengguowang132 |
|
11 | 33501 | 2017-01-15 08:56:27 作者 bug2000 |
[OpenWRT] Attitude Adjustment (12.09-beta) 作者 changeway
|
1 | 15966 | 2012-12-07 15:35:22 作者 changeway |
[OpenWRT]讓你的Router支援WiMAX 網卡(CDC)! 作者 changeway
|
2 | 17475 | 2012-11-01 09:30:35 作者 changeway |
Openwrt 編譯筆記....跟一些心得 作者 thx
|
2 | 14003 | 2012-08-15 23:58:48 作者 Aven |