{"id":242127,"date":"2022-05-16T10:40:36","date_gmt":"2022-05-16T02:40:36","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=242127"},"modified":"2022-05-09T11:01:48","modified_gmt":"2022-05-09T03:01:48","slug":"share-linux-dpkg","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/share-linux-dpkg.html","title":{"rendered":"\u5206\u4eab5\u4e2aLinux\u4e0b\u7684\u6700\u4f73\u8f6f\u4ef6\u5305\u7ba1\u7406\u5668"},"content":{"rendered":"
\u5bfc\u8bfb<\/td>\n | \u4e00\u4e2a Linux \u65b0\u7528\u6237\u5e94\u8be5\u77e5\u9053\u4ed6\u6216\u5979\u7684\u8fdb\u6b65\u6e90\u81ea\u4e8e\u5bf9 Linux \u53d1\u884c\u7248\u7684\u4f7f\u7528\uff0c\u800c Linux \u53d1\u884c\u7248\u6709\u597d\u51e0\u79cd\uff0c\u5e76\u4ee5\u4e0d\u540c\u7684\u65b9\u5f0f\u7ba1\u7406\u8f6f\u4ef6\u5305\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n <\/p>\n \u5728 Linux \u4e2d\uff0c\u5305\u7ba1\u7406\u5668\u975e\u5e38\u91cd\u8981\uff0c\u77e5\u9053\u5982\u4f55\u4f7f\u7528\u591a\u79cd\u5305\u7ba1\u7406\u5668\u53ef\u4ee5\u8ba9\u4f60\u50cf\u4e00\u4e2a\u9ad8\u624b\u4e00\u6837\u6d3b\u5f97\u5f88\u8212\u9002\uff0c\u4ece\u5728\u4ed3\u5e93\u4e0b\u8f7d\u8f6f\u4ef6\u3001\u5b89\u88c5\u8f6f\u4ef6\uff0c\u5230\u66f4\u65b0\u8f6f\u4ef6\u3001\u5904\u7406\u4f9d\u8d56\u548c\u5220\u9664\u8f6f\u4ef6\u662f\u975e\u5e38\u91cd\u8981\u7684\uff0c\u8fd9\u4e5f\u662fLinux \u7cfb\u7edf\u7ba1\u7406\u7684\u4e00\u4e2a\u91cd\u8981\u90e8\u5206\u3002<\/p>\n \u6210\u4e3a\u4e00\u4e2a Linux \u9ad8\u624b\u7684\u4e00\u4e2a\u6807\u5fd7\u662f\u4e86\u89e3\u4e3b\u8981\u7684 Linux \u53d1\u884c\u7248\u5982\u4f55\u5904\u7406\u5305\uff0c\u5728\u8fd9\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u5e94\u8be5\u770b\u4e00\u4e9b\u4f60\u5728 Linux \u4e0a\u80fd\u627e\u5230\u7684\u6700\u4f73\u7684\u5305\u7ba1\u7406\u5668\uff0c 1. DPKG - Debian \u5305\u7ba1\u7406\u7cfb\u7edf(Debian Package Management System)<\/strong><\/div>\n Dpkg \u662f Debian Linux \u5bb6\u65cf\u7684\u57fa\u7840\u5305\u7ba1\u7406\u7cfb\u7edf\uff0c\u5b83\u7528\u4e8e\u5b89\u88c5\u3001\u5220\u9664\u3001\u5b58\u50a8\u548c\u63d0\u4f9b.deb\u5305\u7684\u4fe1\u606f\u3002<\/p>\n \u8fd9\u662f\u4e00\u4e2a\u4f4e\u5c42\u9762\u7684\u5de5\u5177\uff0c\u5e76\u4e14\u6709\u591a\u4e2a\u524d\u7aef\u5de5\u5177\u53ef\u4ee5\u5e2e\u52a9\u7528\u6237\u4ece\u8fdc\u7a0b\u7684\u4ed3\u5e93\u83b7\u53d6\u5305\uff0c\u6216\u5904\u7406\u590d\u6742\u7684\u5305\u5173\u7cfb\u7684\u5de5\u5177\uff0c\u5305\u62ec\u5982\u4e0b\uff1a<\/p>\n \u201cdpkg\u7684\u547d\u4ee4\u201d\u57fa\u4e8eDebian\u53d1\u884c\u724815\u4e2a\u5b9e\u9645\u7684\u4f8b\u5b50\"\u201chttps:\/\/www.howtoing.com\/dpkg-command-examples\/\"<\/p>\n APT\uff08\u9ad8\u7ea7\u5305\u88c5\u5de5\u5177\uff09<\/strong><\/span><\/div>\n \u8fd9\u662f\u4e00\u4e2a\u975e\u5e38\u53d7\u6b22\u8fce\u7684\uff0c\u514d\u8d39\u7684\uff0c\u529f\u80fd\u5f3a\u5927\uff0c\u8d8a\u662f\u8fd9\u6837\uff0c\u6709\u7528\u7684\u547d\u4ee4\u884c\u5305\u7ba1\u7406\u7cfb\u7edf\uff0c\u8be5\u7cfb\u7edf\u6709\u5173dpkg\u5305\u7ba1\u7406\u7cfb\u7edf\u7684\u524d\u7aef\u3002 Debian\u6216\u8005\u5b83\u7684\u884d\u751f\u7269\uff0c\u5982Ubuntu\u548cLinux Mint\u7684\u7528\u6237\u5e94\u8be5\u719f\u6089\u8fd9\u4e2a\u5305\u7ba1\u7406\u5de5\u5177\u3002 \u8981\u4e86\u89e3\u5b83\u5b9e\u9645\u5982\u4f55\u5de5\u4f5c\uff0c\u4f60\u53ef\u4ee5\u53bb\u770b\u8fd9\u4e9b\u5982\u4f55\u6307\u5bfc\uff1a<\/p>\n \u5982\u4f55\u5728Ubuntu\u7684\/ Debian\u7684\u4f7f\u7528\u65b0\u7684\u9ad8\u7ea7\u5305\u7ba1\u7406\u5de5\u5177\uff08APT\uff0915\u4f8b \"https:\/\/www.howtoing.com\/apt-advanced-package-command-examples-in-ubuntu\/\"<\/p>\n 25\u4e2a\u6709\u7528\u7684\u57fa\u672c\u547d\u4ee4apt-get\u548cAPT-CACHE\u7684\u5305\u7ba1\u7406\"https:\/\/www.howtoing.com\/useful-basic-commands-of-apt-get-and-apt-cache-for-package-management\/\"<\/p>\n Aptitude\u8f6f\u4ef6\u5305\u7ba1\u7406\u5668<\/strong><\/span><\/div>\n \u8fd9\u4e5f\u662fDebian\u7684 Linux\u7684\u5bb6\u5ead\u6d41\u884c\u7684\u547d\u4ee4\u884c\u524d\u7aef\u5305\u7ba1\u7406\u5de5\u5177\uff0c\u5b83\u7684\u5de5\u4f5c\u539f\u7406\u76f8\u4f3c\uff0cAPT\u4e5f\u6709\u8fc7\u4e0d\u5c11\u4e24\u4eba\u4e4b\u95f4\u7684\u6bd4\u8f83\uff0c\u4f46\u9996\u5148\uff0c\u6d4b\u8bd5\u51fa\u65e2\u80fd\u8ba9\u4f60\u660e\u767d\u54ea\u4e00\u4e2a\u5b9e\u9645\u5de5\u4f5c\u66f4\u597d\u3002 \u5b83\u59cb\u5efa\u4e8eDebian\u548c\u5b83\u7684\u884d\u751f\u7269\uff0c\u4f46\u73b0\u5728\u5b83\u7684\u529f\u80fd\u5ef6\u4f38\u5230\u5bb6\u5eadRHEL\u4e5f\u3002\u60a8\u53ef\u4ee5\u53c2\u8003\u672c\u6307\u5357\uff0c\u4e86\u89e3\u66f4\u591aAPT\u548c\u80fd\u529b\u7684\u7406\u89e3\uff1a<\/p>\n \u4ec0\u4e48\u662fAPT\u548c\u80fd\u529b\u503e\u5411\uff1f \u548c\u4ed6\u4eec\u771f\u6b63\u7684\u533a\u522b\u662f\u4ec0\u4e48\uff1f\"https:\/\/www.howtoing.com\/difference-between-apt-and-aptitude\/\"<\/p>\n \u7a81\u89e6\u5305\u7ba1\u7406\u5668<\/strong><\/span><\/div>\n Synaptic\u662f\u4e00\u4e2a\u7528\u4e8e\u57fa\u4e8eGTK +\u7684APT\u7684GUI\u5305\u7ba1\u7406\u5de5\u5177\uff0c\u5b83\u5bf9\u4e8e\u53ef\u80fd\u4e0d\u60f3\u5728\u547d\u4ee4\u884c\u4e0a\u5f04\u810f\u4ed6\u4eec\u7684\u624b\u7684\u7528\u6237\u5de5\u4f5c\u826f\u597d\u3002\u5b83\u5b9e\u73b0\u4e86\u76f8\u540c\u7684\u529f\u80fd\uff0capt-get\u547d\u4ee4\u884c\u5de5\u5177\u3002<\/p>\n 2. RPM\uff08Red Hat\u8f6f\u4ef6\u5305\u7ba1\u7406\u5668\uff09<\/strong><\/div>\n \u8fd9\u662fLinux\u6807\u51c6\u5e93\u7684\u5305\u88c5\u683c\u5f0f\u548cRedHat\u7684\u521b\u5efa\u57fa\u672c\u5305\u7ba1\u7406\u7cfb\u7edf\u3002\u4f5c\u4e3a\u5e95\u5c42\u7cfb\u7edf\uff0c\u6709\u51e0\u4e2a\u524d\u7aef\u5305\u7ba1\u7406\u5de5\u5177\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u5b83\uff0c\u4f46\u6211\u4eec\u5c06\u53ea\u770b\u6700\u597d\u7684\uff0c\u662f\uff1a<\/p>\n YUM\uff08Yellowdog Updater\uff0c\u4fee\u6539\uff09<\/strong><\/span><\/div>\n \n\u5b83\u662f\u4e00\u4e2a\u5f00\u6e90\u548c\u6d41\u884c\u7684\u547d\u4ee4\u884c\u5305\u7ba1\u7406\u5668\uff0c\u7528\u4f5c\u7528\u6237\u5230RPM\u7684\u754c\u9762\u3002\u60a8\u53ef\u4ee5\u5728Debian\u7684Linux\u7cfb\u7edf\u628a\u5b83\u6bd4\u4f5cAPT\uff0c\u5b83\u96c6\u6210\u4e86APT\u5177\u6709\u5171\u540c\u7684\u529f\u80fd\u3002\u60a8\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u793a\u4f8b\u6765\u4e86\u89e3YUM\uff1a<\/p>\n 20\u4e2a\u5305\u7ba1\u7406\u7684Linux YUM\u547d\u4ee4\"https:\/\/www.howtoing.com\/20-linux-yum-yellowdog-updater-modified-commands-for-package-mangement\/\"<\/p>\n DNF - Dandified Yum<\/strong><\/span><\/div>\n \u8fd9\u4e5f\u662f\u57fa\u4e8eRPM\u7684\u53d1\u884c\uff0c\u5bf9Fedora 18\u63a8\u51fa\u7684\u8f6f\u4ef6\u5305\u7ba1\u7406\u5668\uff0c\u5b83\u662f\u4e0b\u4e00\u4ee3YUM\u7248\u672c\u3002 \u5982\u679c\u4f60\u4e00\u76f4\u4f7f\u7528\u7684Fedora 22\u65e5\u8d77\uff0c\u60a8\u5fc5\u987b\u610f\u8bc6\u5230\u8fd9\u662f\u9ed8\u8ba4\u7684\u5305\u7ba1\u7406\u5668\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u94fe\u63a5\uff0c\u5c06\u4e3a\u60a8\u63d0\u4f9b\u6709\u5173DNF\u53ca\u5176\u4f7f\u7528\u65b9\u6cd5\u7684\u66f4\u591a\u4fe1\u606f\uff1a<\/p>\n DNF -\u4e0b\u4e00\u4ee3\u8f6f\u4ef6\u5305\u7ba1\u7406\u7684\u57fa\u4e8eRPM\u7684\u5206\u5e03\"https:\/\/www.howtoing.com\/dnf-next-generation-package-management-utility-for-linux\/\"<\/p>\n 27\u201c\u5730\u4e0b\u57ce\u4e0e\u52c7\u58eb\u201d\u547d\u4ee4\u7684\u4f8b\u5b50\u6765\u7ba1\u7406Fedora\u7684\u8f6f\u4ef6\u5305\u7ba1\u7406\"https:\/\/www.howtoing.com\/dnf-commands-for-fedora-rpm-package-management\/\"<\/p>\n 3. Pacman\u5305\u7ba1\u7406\u5668 - Arch Linux<\/strong><\/div>\n \u5b83\u662f\u4e00\u4e2a\u6d41\u884c\u548c\u529f\u80fd\u5f3a\u5927\u4f46\u7b80\u5355\u7684\u5305\u7ba1\u7406\u5668\u4e3aArch Linux\u548c\u4e00\u4e9b\u5c0f\u77e5\u540d\u7684Linux\u53d1\u884c\u7248\uff0c\u5b83\u63d0\u4f9b\u4e86\u5176\u4ed6\u5e38\u89c1\u8f6f\u4ef6\u5305\u7ba1\u7406\u5668\u63d0\u4f9b\u7684\u4e00\u4e9b\u57fa\u672c\u529f\u80fd\uff0c\u5305\u62ec\u5b89\u88c5\uff0c\u81ea\u52a8\u4f9d\u8d56\u5173\u7cfb\u89e3\u6790\uff0c\u5347\u7ea7\uff0c\u5378\u8f7d\u548c\u964d\u7ea7\u8f6f\u4ef6\u3002 \u4f46\u6700\u6709\u6548\u5730\uff0c\u5b83\u88ab\u5efa\u7acb\u4e3a\u7b80\u5355\u7684\u5bb9\u6613\u7531Arch\u7528\u6237\u7684\u5305\u7ba1\u7406\u3002\u4f60\u53ef\u4ee5\u9605\u8bfb\u8be5\u5403\u8c46\u5b50\u6982\u8ff0\u8fd9\u4e5f\u89e3\u91ca\u4e86\u8be6\u8c08\u4e0a\u8ff0\u4e00\u4e9b\u5b83\u7684\u529f\u80fd\u3002<\/p>\n 4. Zypper\u8f6f\u4ef6\u5305\u7ba1\u7406\u5668 - openSUSE<\/strong><\/div>\n \u5b83\u662f\u5728openSUSE Linux\u7684\u547d\u4ee4\u884c\u5305\u7ba1\u7406\u5668\uff0c\u5e76\u4f7f\u7528\u4e86libzypp\u5e93\uff0c\u5176\u5e38\u89c1\u7684\u529f\u80fd\u5305\u62ec\u5b58\u50a8\u5e93\u8bbf\u95ee\uff0c\u5305\u5b89\u88c5\uff0c\u76f8\u5173\u6027\u95ee\u9898\uff0c\u8fd8\u6709\u66f4\u591a\u7684\u5206\u8fa8\u7387\u3002 \u91cd\u8981\u7684\u662f\uff0c\u5b83\u8fd8\u53ef\u4ee5\u5904\u7406\u5b58\u50a8\u5e93\u6269\u5c55\uff0c\u5982\u6a21\u5f0f\uff0c\u8865\u4e01\u548c\u4ea7\u54c1\u3002\u65b0\u7684OpenSUSE\u7528\u6237\u53ef\u4ee5\u53c2\u8003\u4ee5\u4e0b\u6307\u5357\u6765\u638c\u63e1\u5b83\u3002<\/p>\n 45\u4e2azypper\u7684\u547d\u4ee4\u6765\u638c\u63e1\u7684OpenSUSE\u8f6f\u4ef6\u5305\u7ba1\u7406\"https:\/\/www.howtoing.com\/zypper-commands-to-manage-suse-linux-package-management\/\"<\/p>\n 5. Portage\u5305\u7ba1\u7406\u5668 - Gentoo<\/strong><\/div>\n \u8fd9\u662fGentoo\u7684 \uff0c\u4e0d\u592a\u6d41\u884c\u7684Linux\u53d1\u884c\uff0c\u622a\u81f3\u76ee\u524d\u7684\u8f6f\u4ef6\u5305\u7ba1\u7406\u5668\uff0c\u4f46\u662f\u8fd9\u4e0d\u4f1a\u9650\u5236\u5b83\u5728Linux\u4e2d\u6700\u597d\u5305\u7ba1\u7406\u5668\u4e4b\u4e00\u3002 Portage\u9879\u76ee\u7684\u4e3b\u8981\u76ee\u7684\u662f\u521b\u5efa\u4e00\u4e2a\u7b80\u5355\u548c\u65e0\u6545\u969c\u7684\u5305\u7ba1\u7406\u7cfb\u7edf\uff0c\u5305\u62ec\u5411\u540e\u517c\u5bb9\u6027\uff0c\u81ea\u52a8\u5316\u7b49\u529f\u80fd\u3002 \u4e3a\u4e86\u66f4\u597d\u5730\u7406\u89e3\uff0c\u5c1d\u8bd5\u9605\u8bfbPortage\u7684\u9879\u76ee\u9875\u9762\u3002<\/p>\n \u6b63\u5982\u6211\u5728\u5f00\u59cb\u65f6\u5df2\u7ecf\u6697\u793a\u7684\uff0c\u672c\u6307\u5357\u7684\u4e3b\u8981\u76ee\u7684\u662f\u4e3aLinux\u7528\u6237\u63d0\u4f9b\u6700\u4f73\u5305\u7ba1\u7406\u5668\u5217\u8868\uff0c\u4f46\u662f\u4e86\u89e3\u5982\u4f55\u4f7f\u7528\u5b83\u4eec\u53ef\u4ee5\u901a\u8fc7\u63d0\u4f9b\u5fc5\u8981\u7684\u94fe\u63a5\u5e76\u5c1d\u8bd5\u8fdb\u884c\u6d4b\u8bd5\u3002 \u4e0d\u540cLinux\u53d1\u884c\u7248\u7684\u7528\u6237\u5fc5\u987b\u81ea\u5df1\u5b66\u4e60\u66f4\u591a\uff0c\u4ee5\u4fbf\u66f4\u597d\u5730\u4e86\u89e3\u4e0a\u8ff0\u4e0d\u540c\u7684\u8f6f\u4ef6\u5305\u7ba1\u7406\u5668\u3002<\/p>\n","protected":false},"excerpt":{"rendered":" \u5728 Linux \u4e2d\uff0c\u5305\u7ba1\u7406\u5668\u975e\u5e38\u91cd\u8981\uff0c\u77e5\u9053\u5982\u4f55\u4f7f\u7528\u591a\u79cd\u5305\u7ba1\u7406\u5668\u53ef\u4ee5\u8ba9\u4f60\u50cf\u4e00\u4e2a\u9ad8\u624b\u4e00\u6837\u6d3b\u5f97\u5f88\u8212\u9002\uff0c\u4ece\u5728\u4ed3\u5e93\u4e0b\u8f7d\u8f6f […]<\/p>\n","protected":false},"author":310,"featured_media":242140,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-242127","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/242127","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/310"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=242127"}],"version-history":[{"count":13,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/242127\/revisions"}],"predecessor-version":[{"id":242224,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/242127\/revisions\/242224"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/242140"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=242127"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=242127"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=242127"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}} |