{"id":48,"date":"2021-05-20T00:17:29","date_gmt":"2021-05-19T16:17:29","guid":{"rendered":"https:\/\/www.web-log.cn\/?p=48"},"modified":"2021-05-20T01:49:03","modified_gmt":"2021-05-19T17:49:03","slug":"opkg-%e8%bd%af%e4%bb%b6%e5%8c%85%e7%ae%a1%e7%90%86","status":"publish","type":"post","link":"https:\/\/www.web-log.cn\/index.php\/2021\/05\/20\/opkg-%e8%bd%af%e4%bb%b6%e5%8c%85%e7%ae%a1%e7%90%86\/","title":{"rendered":"OPKG \u8f6f\u4ef6\u5305\u7ba1\u7406"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Opkg \u662f\u4e00\u4e2a\u8f7b\u91cf\u5feb\u901f\u7684\u5957\u4ef6\u7ba1\u7406\u7cfb\u7edf\uff0c\u76ee\u524d\u5df2\u6210\u4e3a Opensource \u754c\u5d4c\u5165\u5f0f\u7cfb\u7edf\u6807\u51c6\u3002\u5e38\u7528\u4e8e&nbsp;<a rel=\"noreferrer noopener\" target=\"_blank\" href=\"https:\/\/baike.baidu.com\/item\/%E8%B7%AF%E7%94%B1\">\u8def\u7531<\/a>\u3001&nbsp;<a rel=\"noreferrer noopener\" target=\"_blank\" href=\"https:\/\/baike.baidu.com\/item\/%E4%BA%A4%E6%8D%A2%E6%9C%BA\">\u4ea4\u6362\u673a<\/a>\u7b49&nbsp;<a rel=\"noreferrer noopener\" target=\"_blank\" href=\"https:\/\/baike.baidu.com\/item\/%E5%B5%8C%E5%85%A5%E5%BC%8F%E8%AE%BE%E5%A4%87\">\u5d4c\u5165\u5f0f\u8bbe\u5907<\/a>\u4e2d\uff0c\u7528\u6765\u7ba1\u7406\u8f6f\u4ef6\u5305\u7684\u5b89\u88c5\u5347\u7ea7\u4e0e\u4e0b\u8f7d\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">opkg \u5de5\u5177 (\u4e00\u4e2a ipkg \u53d8\u79cd) \u662f\u4e00\u4e2a\u7528\u6765\u4ece\u672c\u5730\u8f6f\u4ef6\u4ed3\u5e93\u6216\u4e92\u8054\u7f51\u8f6f\u4ef6\u4ed3\u5e93\u4e0a\u4e0b\u8f7d\u5e76\u5b89\u88c5 OpenWrt \u8f6f\u4ef6\u5305\u7684\u8f7b\u91cf\u578b\u8f6f\u4ef6\u5305\u7ba1\u7406\u5668\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">GNU\/Linux \u7528\u6237\u53ef\u80fd\u4f1a\u5bf9&nbsp;<code>apt-get<\/code>\uff0c<code>aptitude<\/code>\uff0c<code>pacman<\/code>\uff0c<code>yum<\/code>&nbsp;\u7b49\u6bd4\u8f83\u719f\u6089\uff0c\u4e5f\u4f1a\u770b\u51fa\u5176\u76f8\u4f3c\u4e4b\u5904\u3002\u5b83\u4e0e NSLU2 \u4e0a\u540c\u6837\u7528\u4e8e\u5d4c\u5165\u5f0f\u8bbe\u5907\u7684&nbsp;<code>Optware<\/code>&nbsp;\u4e5f\u6709\u76f8\u4f3c\u4e4b\u5904\u3002OPKG \u6ca1\u6709\u4ec5\u4ec5\u5c06\u8f6f\u4ef6\u5b89\u88c5\u5230\u4e00\u4e2a\u5355\u72ec\u7684\u8def\u5f84\uff08\u5982\uff1a<code>\/opt<\/code>\uff09\uff0c\u800c\u662f\u6839\u6587\u4ef6\u7cfb\u7edf\u4e0a\u7684\u4e00\u4e2a\u5b8c\u6574\u7684\u5305\u7ba1\u7406\u5668\u3002\u5b83\u4e5f\u5305\u542b\u4e86\u589e\u52a0\u5185\u6838\u6a21\u5757\u4e0e\u9a71\u52a8\u7684\u53ef\u80fd\u6027\u3002OPKG \u6709\u65f6\u88ab\u79f0\u4e3a&nbsp;<em>Entware<\/em>&nbsp;\uff0c\u4f46\u8fd9\u4e3b\u8981\u662f\u9488\u5bf9\u4e3a\u5d4c\u5165\u5f0f\u8bbe\u5907\u51c6\u5907\u7684 Entware \u4ed3\u5e93\u3002<\/p>\n\n\n\n<!--more-->\n\n\n\n<p class=\"wp-block-paragraph\">opkg \u8bd5\u56fe\u5728\u8f6f\u4ef6\u5305\u4ed3\u5e93\u5185\u6765\u89e3\u51b3\u4f9d\u8d56\u5173\u7cfb\u3002\u5982\u679c\u5931\u8d25\u4e86\uff0c\u5b83\u5c06\u4f1a\u62a5\u544a\u4e00\u4e2a\u9519\u8bef\u5e76\u505c\u6b62\u5b89\u88c5\u8be5\u8f6f\u4ef6\u5305\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u4e22\u5931\u7b2c\u4e09\u65b9\u5305\u7684\u4f9d\u8d56\u5173\u7cfb\uff0c\u6e90\u7801\u5305\u4f9d\u7136\u53ef\u7528\u7684\u8bdd\uff0c\u4e3a\u4e86\u5ffd\u7565\u4f9d\u8d56\u5173\u7cfb\u7684\u9519\u8bef\u53ef\u4ee5\u4f7f\u7528&nbsp;<code>\u2013force-depends<\/code>&nbsp;\u9009\u9879\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"\u8f6f\u4ef6\u5305\u7ba1\u7406\">\u8f6f\u4ef6\u5305\u7ba1\u7406<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><code><strong>update<\/strong><\/code><\/td><td>\u66f4\u65b0\u53ef\u7528\u8f6f\u4ef6\u5305\u5217\u8868<br>\u6b64\u547d\u4ee4\u76f4\u63a5\u4e3a\u4f60\u5b89\u88c5\u7684 OpenWrt \u83b7\u53d6\u4e00\u4e2a\u7c7b\u4f3c<a target=\"_blank\" href=\"http:\/\/downloads.openwrt.org\/snapshots\/trunk\/ar71xx\/packages\/Packages\" rel=\"noreferrer noopener\">\u6837\u4f8b<\/a>\u7684\u6587\u4ef6\uff0c\u4fdd\u5b58\u5230<a target=\"_blank\" href=\"https:\/\/en.wikipedia.org\/wiki\/tmpfs\" rel=\"noreferrer noopener\">\u5185\u5b58\u5206\u533a<\/a>\u7684&nbsp;<code>\/tmp\/opkg-lists\/snapshots<\/code>&nbsp;\u4e2d\u3002\u73b0\u5728\u5927\u7ea6\u5360\u7528 1.3MB \u7a7a\u95f4\u3002OPKG \u9700\u8981\u5b83\u7684\u5185\u5bb9\u624d\u80fd\u5b89\u88c5\u3001\u5347\u7ea7\u8f6f\u4ef6\u5305\u6216\u6253\u5370\u8f6f\u4ef6\u5305\u4fe1\u606f\u3002\u6b64\u6587\u4ef6\u5185\u5bb9\u987b\u4f53\u73b0\u8f6f\u4ef6\u4ed3\u5e93\u4e2d\u5f53\u524d\u7684\u53ef\u7528\u8f6f\u4ef6\u5305\u3002\u4e3a\u91ca\u653e\u5185\u5b58\u7a7a\u95f4\uff0c\u4f60\u53ef\u4ee5\u5b89\u5168\u5730\u5220\u9664\u8fd9\u4e2a\u6587\u4ef6\uff0c\u4f46\u4e0d\u8981\u5fd8\u8bb0\u5728\u5b89\u88c5\u8f6f\u4ef6\u524d\u91cd\u65b0\u83b7\u53d6\u4e00\u4e2a\u3002<\/td><\/tr><tr><td><code><strong>upgrade<\/strong> &lt;pkgs&gt;<\/code><\/td><td>\u5347\u7ea7\u8f6f\u4ef6\u5305<br>\u8981\u5347\u7ea7\u4e00\u7ec4\u8f6f\u4ef6\u5305\uff0c\u8fd0\u884c&nbsp;<code>opkg upgrade<em>\u8f6f\u4ef6\u5305\u540d1 \u8f6f\u4ef6\u5305\u540d2<\/em><\/code>&nbsp;\u5373\u53ef\u3002<br>\u547d\u4ee4&nbsp;<code>opkg list-upgradable<\/code>&nbsp;\u53ef\u4ee5\u83b7\u53d6\u4e00\u4e2a\u53ef\u5347\u7ea7\u8f6f\u4ef6\u5305\u7684\u5217\u8868\u3002<br>\u901a\u5e38\u6211\u4eec<strong>\u4e0d\u63a8\u8350<\/strong>\u666e\u901a\u7528\u6237\u53bb\u5347\u7ea7\u8f6f\u4ef6\u5305\uff0c\u56e0\u4e3a\u4e00\u4e2a\u5178\u578b\u7684 OpenWrt \u7cfb\u7edf\u662f\u5b58\u50a8\u5728\u53ea\u8bfb\u7684 SquashFS \u6587\u4ef6\u7cfb\u7edf\u4e2d\u3002\u540c\u65f6\u5f53\u5347\u7ea7\u5de5\u4f5c\u505a\u5b8c\u540e\uff0c\u4f7f\u7528\u4e86\u8fdc\u8d85\u51fa\u5728 SquashFS \u6587\u4ef6\u7cfb\u7edf\u6216 JFFS2 \u6587\u4ef6\u7cfb\u7edf\u9ed8\u8ba4\u5b89\u88c5\u57fa\u672c\u8f6f\u4ef6\u5305\u7684\u5bb9\u91cf\u3002<br>\u56e0\u6b64\uff0c\u63a8\u8350\u7528\u5237\u4e00\u4e2a\u66f4\u65b0\u7684 OpenWrt \u56fa\u4ef6\u6765\u4ee3\u66ff\u5347\u7ea7\u8f6f\u4ef6\u5305\u3002\u5f53\u7136\uff0c\u5347\u7ea7\u5df2\u5b89\u88c5\u7684\u8f6f\u4ef6\u5305\u6ca1\u6709\u8fd9\u79cd\u95ee\u9898\u3002Keep in mind though that for OpenWrt releases upgrading is for the most part not possible, since there is nothing to upgrade without changing the package repository. This is because the package repositories for OpenWrt&#8217;s releases are generally not updated. However, the package repository in the trunk snapshots are updated by the build bots to new versions very often, as this is where the packages are updated, like the OpenWrt builds themselves. Note however that for kernel packages updating can be a risky business as it may brick the device if the trunk build kernel is incompatible with the new upgraded kernel package. You should therefore only upgrade non-kernel packages.<\/td><\/tr><tr><td><code><strong>install<\/strong> &lt;pkgs|FQDN&gt;<\/code><\/td><td>\u5b89\u88c5\u4e00\u4e2a\u6216\u591a\u4e2a\u8f6f\u4ef6\u5305<br>\u4f8b\u5982\uff1aopkg install hiawathaopkg install http:\/\/downloads.openwrt.org\/snapshots\/trunk\/ar71xx\/packages\/hiawatha_7.7-2_ar71xx.ipkopkg install \/tmp\/hiawatha_7.7-2_ar71xx.ipk<\/td><\/tr><tr><td><code><strong>configure<\/strong> &lt;pkgs&gt;<\/code><\/td><td>\u914d\u7f6e\u4e00\u4e2a\u6216\u591a\u4e2a\u672a\u5b89\u88c5\u7684\u5305<\/td><\/tr><tr><td><code><strong>remove<\/strong> &lt;pkgs|globp&gt;<\/code><\/td><td>\u79fb\u9664\u4e00\u4e2a\u6216\u591a\u4e2a\u8f6f\u4ef6\u5305<\/td><\/tr><tr><td><code><strong>flag<\/strong> &lt;flag&gt; &lt;pkgs&gt;<\/code><\/td><td>\u6807\u8bb0\u4e00\u4e2a\u6216\u591a\u4e2a\u8f6f\u4ef6\u5305<br>\u6bcf\u6b21\u8c03\u7528\u4ec5\u5141\u8bb8\u4e00\u4e2a\u6807\u8bb0\u3002\u53ef\u7528\u6807\u8bb0\u6709\uff1a<br><code>hold<\/code>&nbsp;\u2022&nbsp;<code>noprune<\/code>&nbsp;\u2022&nbsp;<code>user<\/code>&nbsp;\u2022&nbsp;<code>ok<\/code>&nbsp;\u2022&nbsp;<code>installed<\/code>&nbsp;\u2022&nbsp;<code>unpacked<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u9605\u8bfb\u6709\u5173 \u6b63\u5219\u8868\u8fbe\u5f0f<a target=\"_blank\" href=\"http:\/\/en.wikipedia.org\/wiki\/Regular_expression\" rel=\"noreferrer noopener\">http:\/\/en.wikipedia.org\/wiki\/Regular_expression<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"\u4fe1\u606f\u547d\u4ee4\">\u4fe1\u606f\u547d\u4ee4<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><code><strong>list<\/strong> [pkg|globp]<\/code><\/td><td>\u5217\u51fa\u53ef\u7528\u8f6f\u4ef6\u5305<br>Package name &#8211; Version &#8211; Description\u63cf\u8ff0\u4fe1\u606f (Description) \u53ef\u80fd\u5305\u542b\u6362\u884c\uff0cso using merely grep is inapt since grep is line-based.<\/td><\/tr><tr><td><code><strong>list-installed<\/strong><\/code><\/td><td>\u5217\u51fa\u5df2\u5b89\u88c5\u8f6f\u4ef6\u5305<\/td><\/tr><tr><td><code><strong>list-upgradable<\/strong><\/code><\/td><td>\u5217\u51fa\u53ef\u5347\u7ea7\u7684\u5df2\u5b89\u88c5\u8f6f\u4ef6\u5305<\/td><\/tr><tr><td><code><strong>list-changed-conffiles<\/strong><\/code><\/td><td>\u5217\u51fa\u7528\u6237\u4fee\u6539\u8fc7\u7684\u914d\u7f6e\u6587\u4ef6<\/td><\/tr><tr><td><code><strong>files<\/strong> &lt;pkg&gt;<\/code><\/td><td>\u5217\u51fa\u5c5e\u4e8e\u8f6f\u4ef6\u5305&nbsp;<code>&lt;pkg&gt;<\/code>&nbsp;\u7684\u6587\u4ef6<br>\u4ec5\u9002\u7528\u4e8e\u5df2\u5b89\u88c5\u7684\u8f6f\u4ef6\u5305\u3002\u4f8b\u5982\uff1aopkg files asterisk18 Package asterisk18 (1.8.4.4-1) is installed on root and has the following files: \/usr\/lib\/asterisk\/modules\/res_rtp_multicast.so \/usr\/lib\/asterisk\/modules\/codec_ulaw.so \/etc\/asterisk\/features.conf \/usr\/lib\/asterisk\/modules\/format_wav_gsm.so \/usr\/lib\/asterisk\/modules\/app_macro.so \/usr\/lib\/asterisk\/modules\/chan_sip.so \/usr\/lib\/asterisk\/modules\/app_dial.so \/usr\/lib\/asterisk\/modules\/app_playback.so \/usr\/lib\/asterisk\/modules\/format_gsm.so \/usr\/lib\/asterisk\/modules\/func_callerid.so \/usr\/lib\/asterisk\/modules\/func_timeout.so \/etc\/asterisk\/asterisk.conf \/etc\/asterisk\/modules.conf \/usr\/lib\/asterisk\/modules\/format_wav.so \/etc\/asterisk\/extensions.conf \/etc\/init.d\/asterisk \/etc\/asterisk\/manager.conf \/usr\/lib\/asterisk\/modules\/res_rtp_asterisk.so \/etc\/asterisk\/logger.conf \/etc\/asterisk\/rtp.conf \/usr\/lib\/asterisk\/modules\/codec_gsm.so \/etc\/asterisk\/indications.conf \/usr\/lib\/asterisk\/modules\/func_strings.so \/usr\/lib\/asterisk\/modules\/app_echo.so \/usr\/lib\/asterisk\/modules\/format_pcm.so \/etc\/asterisk\/sip_notify.conf \/etc\/asterisk\/sip.conf \/etc\/default\/asterisk \/usr\/sbin\/asterisk \/usr\/lib\/asterisk\/modules\/pbx_config.so \/usr\/lib\/asterisk\/modules\/func_logic.so<\/td><\/tr><tr><td><code><strong>search<\/strong> &lt;file|globp&gt;<\/code><\/td><td>\u5217\u51fa\u5305\u542b&nbsp;<code>&lt;file&gt;<\/code><\/td><\/tr><tr><td><code><strong>info<\/strong> [pkg|globp]<\/code><\/td><td>\u663e\u793a\u8f6f\u4ef6\u5305&nbsp;<code>&lt;pkg&gt;<\/code>&nbsp;\u7684\u6240\u6709\u4fe1\u606fPackage: horst Version: 2.0-rc1-2 Depends: libncurses Provides: Status: install user installed Section: net Architecture: ar71xx Maintainer: Bruno Randolf &lt;br1@einfach.org&gt; MD5Sum: 378cea9894ec971c419876e822666a6a Size: 19224 Filename: horst_2.0-rc1-2_ar71xx.ipk Source: feeds\/packages\/net\/horst Description: [horst] is a scanning and analysis tool for 802.11 wireless networks and especially IBSS (ad-hoc) mode and mesh networks (OLSR).<strong><code>\u6ce81:<\/code><\/strong>&nbsp;size&nbsp;\u662f gzip \u538b\u7f29\u540e\u7684 tar \u5305\u5c3a\u5bf8\u3002\u5b89\u88c5\u9636\u6bb5\uff0c\u8f6f\u4ef6\u5305\u4f1a\u88ab\u5c55\u5f00\u89e3\u538b\u7f29\uff0cJFFS2 \u4f1a\u518d\u6b21\u5c06\u4e4b\u538b\u7f29\u3002<br><strong><code>\u6ce82:<\/code><\/strong>&nbsp;\u56e0 JFFS2 \u538b\u7f29\u662f\u300e\u900f\u660e\u300f\u7684\uff0c\u50cf&nbsp;<code>ls<\/code>&nbsp;\u4e4b\u7c7b\u7684\u547d\u4ee4\u4ecd\u4f1a\u8fd4\u56de\u672a\u538b\u7f29\u7684\u6587\u4ef6\u5c3a\u5bf8\u3002<\/td><\/tr><tr><td><code><strong>status<\/strong> [pkg|globp]<\/code><\/td><td>\u663e\u793a\u8f6f\u4ef6\u5305&nbsp;<code>&lt;pkg&gt;<\/code>&nbsp;\u7684\u72b6\u6001<\/td><\/tr><tr><td><code><strong>download<\/strong> &lt;pkg&gt;<\/code><\/td><td>\u4e0b\u8f7d\u8f6f\u4ef6\u5305&nbsp;<code>&lt;pkg&gt;<\/code>&nbsp;\u5230\u5f53\u524d\u76ee\u5f55<\/td><\/tr><tr><td><code><strong>compare-versions<\/strong> &lt;v1&gt; &lt;op&gt; &lt;v2&gt;<\/code><\/td><td>\u4f7f\u7528\u5173\u7cfb\u7b26&nbsp;<code>&lt;=<\/code>\uff0c<code>&lt;<\/code>\uff0c<code>&gt;<\/code>\uff0c<code>&gt;=<\/code>\uff0c<code>=<\/code>\uff0c<code>&lt;&lt;<\/code>&nbsp;\u6216&nbsp;<code>&gt;&gt;<\/code>&nbsp;\u6765\u6bd4\u8f83\u4e24\u4e2a\u7248\u672c&nbsp;<code>v1<\/code>&nbsp;\u548c&nbsp;<code>v2<\/code>&nbsp;\u3002<\/td><\/tr><tr><td><code><strong>print-architecture<\/strong><\/code><\/td><td>\u5217\u51fa\u53ef\u5b89\u88c5\u8f6f\u4ef6\u5305\u7684\u7ed3\u6784<\/td><\/tr><tr><td><code><strong>whatdepends<\/strong> [-A] [pkgname|pat]+<\/code><\/td><td>\u4ec5\u9002\u7528\u4e8e\u5df2\u5b89\u88c5\u7684\u8f6f\u4ef6\u5305\u3002\u6240\u4ee5\u5982\u679c\u4f60\u60f3\u77e5\u9053\u4e00\u4e2a\u8f6f\u4ef6\u5305\u53ca\u5176\u6240\u6709\u4f9d\u8d56\u5360\u7528\u7684\u7a7a\u95f4\uff0c\u4f60\u53ea\u80fd\u5c06\u8fd9\u4e2a\u9009\u9879\u7684\u8f93\u51fa\u5206\u62c6\u540e\u4f20\u7ed9&nbsp;<code>info<\/code>&nbsp;\u9009\u9879\u6765\u8ba1\u7b97\u3002<\/td><\/tr><tr><td><code><strong>whatdependsrec<\/strong> [-A] [pkgname|pat]+<\/code><\/td><td>\u4ec5\u9002\u7528\u4e8e\u5df2\u5b89\u88c5\u7684\u8f6f\u4ef6\u5305\u3002\u6240\u4ee5\u6240\u4ee5\u5982\u679c\u4f60\u60f3\u77e5\u9053\u4e00\u4e2a\u8f6f\u4ef6\u5305\u53ca\u5176\u6240\u6709\u4f9d\u8d56\u5360\u7528\u7684\u7a7a\u95f4\uff0c\u4f60\u53ea\u80fd\u5c06\u8fd9\u4e2a\u9009\u9879\u7684\u8f93\u51fa\u5206\u62c6\u540e\u4f20\u7ed9&nbsp;<code>info<\/code>&nbsp;\u9009\u9879\u6765\u8ba1\u7b97\u3002<\/td><\/tr><tr><td><code><strong>whatprovides<\/strong> [-A] [pkgname|pat]+<\/code><\/td><td>&nbsp;<\/td><\/tr><tr><td><code><strong>whatconflicts<\/strong> [-A] [pkgname|pat]+<\/code><\/td><td>&nbsp;<\/td><\/tr><tr><td><code><strong>whatreplaces<\/strong> [-A] [pkgname|pat]+<\/code><\/td><td>&nbsp;<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"\u9009\u9879\">\u9009\u9879<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>\u77ed\u9009\u9879<\/th><th>\u957f\u9009\u9879<\/th><th>\u63cf\u8ff0<\/th><\/tr><\/thead><tbody><tr><td><code>-A<\/code><\/td><td>&nbsp;<\/td><td>\u67e5\u8be2\u5168\u90e8\u8f6f\u4ef6\u5305\uff08\u4e0d\u4ec5\u662f\u5df2\u5b89\u88c5\u7684\uff09<\/td><\/tr><tr><td><code>-V[&lt;level&gt;]<\/code><\/td><td><code>--verbosity[=&lt;level&gt;]<\/code><\/td><td>\u8bbe\u7f6e\u300e\u5520\u53e8\u300f\u7ea7\u522b\u4e3a&nbsp;<code>&lt;level&gt;<\/code>&nbsp;\u3002<br>\u53ef\u7528\u7684\u7ea7\u522b\u6709\uff1a<br>0 \u4ec5\u9519\u8bef<br>1 \u666e\u901a\u6d88\u606f\uff08\u7f3a\u7701\u60c5\u51b5\uff09<br>2 \u6709\u7528\u7684\u6d88\u606f<br>3 \u8c03\u8bd5<br>4 \u8c03\u8bd5\u7b49\u7ea72<\/td><\/tr><tr><td><code>-f &lt;conf_file&gt;<\/code><\/td><td><code>--conf &lt;conf_file&gt;<\/code><\/td><td>\u8bbe\u7f6e opkg \u914d\u7f6e\u6587\u4ef6\u4e3a&nbsp;<code>&lt;conf_file&gt;<\/code>&nbsp;\u3002\u7f3a\u7701\u4e3a&nbsp;<code>\/etc\/opkg.conf<\/code><\/td><\/tr><tr><td>&nbsp;<\/td><td><code>--cache &lt;directory&gt;<\/code><\/td><td>\u6307\u5b9a\u5305\u7f13\u5b58<\/td><\/tr><tr><td><code>-d &lt;dest_name&gt;<\/code><\/td><td><code>--dest &lt;dest_name&gt;<\/code><\/td><td>\u8bbe\u7f6e\u8f6f\u4ef6\u5305\u5b89\u88c5\u3001\u5220\u9664\u3001\u5347\u7ea7\u7684\u6839\u76ee\u5f55\u4e3a&nbsp;<code>&lt;dest_name&gt;<\/code>&nbsp;\u3002<br><code>&lt;dest_name&gt;<\/code>&nbsp;\u5e94\u4e3a\u5df2\u5728\u914d\u7f6e\u6587\u4ef6\u4e2d\u5b9a\u4e49\u7684\u76ee\u7684\u540d\u79f0\uff08but can also be a directory name in a pinch\uff09\u3002<\/td><\/tr><tr><td><code>-o &lt;dir&gt;<\/code><\/td><td><code>--offline-root &lt;dir&gt;<\/code><\/td><td>\u6307\u5b9a\u79bb\u7ebf\u5b89\u88c5\u8f6f\u4ef6\u5305\u7684\u6839\u76ee\u5f55\u3002<\/td><\/tr><tr><td>&nbsp;<\/td><td><code>--add-arch &lt;arch&gt;:&lt;prio&gt;<\/code><\/td><td>\u6ce8\u518c\u67b6\u6784\u53ca\u5176\u4f18\u5148\u7ea7<\/td><\/tr><tr><td>&nbsp;<\/td><td><code>--add-dest &lt;name&gt;:&lt;path&gt;<\/code><\/td><td>\u6ce8\u518c\u76ee\u7684\u540d\u53ca\u5176\u8def\u5f84<\/td><\/tr><tr><th>\u5f3a\u5236\u6027\u9009\u9879<\/th><\/tr><tr><td>&nbsp;<\/td><td><code>--force-depends<\/code><\/td><td>\u5728\u5b89\u88c5\u3001\u5220\u9664\u8f6f\u4ef6\u5305\u65f6\u65e0\u89c6\u5931\u8d25\u7684\u4f9d\u8d56<\/td><\/tr><tr><td>&nbsp;<\/td><td><code>--force-maintainer<\/code><\/td><td>\u8986\u76d6\u5df2\u7ecf\u5b58\u5728\u7684\u914d\u7f6e\u6587\u4ef6<\/td><\/tr><tr><td>&nbsp;<\/td><td><code>--force-reinstall<\/code><\/td><td>\u91cd\u5b89\u88c5\u8f6f\u4ef6\u5305<\/td><\/tr><tr><td>&nbsp;<\/td><td><code>--force-overwrite<\/code><\/td><td>\u8986\u76d6\u5176\u5b83\u8f6f\u4ef6\u5305\u7684\u6587\u4ef6<\/td><\/tr><tr><td>&nbsp;<\/td><td><code>--force-downgrade<\/code><\/td><td>\u5141\u8bb8 opkg \u964d\u7ea7\u8f6f\u4ef6\u5305<\/td><\/tr><tr><td>&nbsp;<\/td><td><code>--force-space<\/code><\/td><td>\u7981\u7528\u53ef\u7528\u7a7a\u95f4\u68c0\u67e5<\/td><\/tr><tr><td>&nbsp;<\/td><td><code>--force-checksum<\/code><\/td><td>\u5ffd\u7565\u6821\u9a8c\u548c\u5931\u914d<\/td><\/tr><tr><td>&nbsp;<\/td><td><code>--force-postinstall<\/code><\/td><td>\u79bb\u7ebf\u6a21\u5f0f\u4e0b\u4ecd\u8fd0\u884c\u5b89\u88c5\u540e\u811a\u672c<\/td><\/tr><tr><td>&nbsp;<\/td><td><code>--noaction<\/code><\/td><td>\u65e0\u64cd\u4f5c \u2013 \u4ec5\u6d4b\u8bd5<\/td><\/tr><tr><td>&nbsp;<\/td><td><code>--download-only<\/code><\/td><td>\u65e0\u64cd\u4f5c \u2013 \u4ec5\u4e0b\u8f7d<\/td><\/tr><tr><td>&nbsp;<\/td><td><code>--nodeps<\/code><\/td><td>\u4e0d\u8ddf\u8e2a\u4f9d\u8d56<\/td><\/tr><tr><td>&nbsp;<\/td><td><code>--force-removal-of-dependent-packages<\/code><\/td><td>\u79fb\u9664\u8f6f\u4ef6\u5305\u7684\u540c\u65f6\uff0c\u79fb\u9664\u5176\u6240\u6709\u4f9d\u8d56\u8f6f\u4ef6\u5305<\/td><\/tr><tr><td>&nbsp;<\/td><td><code>--autoremove<\/code><\/td><td>\u79fb\u9664\u81ea\u52a8\u5b89\u88c5\u4ee5\u6ee1\u8db3\u4f9d\u8d56\u7684\u8f6f\u4ef6\u5305<\/td><\/tr><tr><td><code>-t<\/code><\/td><td><code>--tmp-dir<\/code><\/td><td>\u6307\u5b9a\u4e34\u65f6\u76ee\u5f55<\/td><\/tr><\/tbody><\/table><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Opkg \u662f\u4e00\u4e2a\u8f7b\u91cf\u5feb\u901f\u7684\u5957\u4ef6\u7ba1\u7406\u7cfb\u7edf\uff0c\u76ee\u524d\u5df2\u6210\u4e3a Opensource \u754c\u5d4c\u5165\u5f0f\u7cfb\u7edf\u6807\u51c6\u3002\u5e38\u7528\u4e8e&nbsp; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[6,14],"class_list":["post-48","post","type-post","status-publish","format-standard","hentry","category-openwrt","tag-entware","tag-opkg"],"_links":{"self":[{"href":"https:\/\/www.web-log.cn\/index.php\/wp-json\/wp\/v2\/posts\/48","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.web-log.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.web-log.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.web-log.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.web-log.cn\/index.php\/wp-json\/wp\/v2\/comments?post=48"}],"version-history":[{"count":3,"href":"https:\/\/www.web-log.cn\/index.php\/wp-json\/wp\/v2\/posts\/48\/revisions"}],"predecessor-version":[{"id":53,"href":"https:\/\/www.web-log.cn\/index.php\/wp-json\/wp\/v2\/posts\/48\/revisions\/53"}],"wp:attachment":[{"href":"https:\/\/www.web-log.cn\/index.php\/wp-json\/wp\/v2\/media?parent=48"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.web-log.cn\/index.php\/wp-json\/wp\/v2\/categories?post=48"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.web-log.cn\/index.php\/wp-json\/wp\/v2\/tags?post=48"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}