{"id":120539,"date":"2018-09-22T08:13:28","date_gmt":"2018-09-22T00:13:28","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=120539"},"modified":"2018-09-17T10:14:35","modified_gmt":"2018-09-17T02:14:35","slug":"package-on-linux","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/package-on-linux.html","title":{"rendered":"\u5728 Linux \u4e0a\u5982\u4f55\u68c0\u67e5\u4e00\u4e2a\u8f6f\u4ef6\u5305\u7684\u8be6\u7ec6\u4fe1\u606f"},"content":{"rendered":"
\u5bfc\u8bfb<\/td>\n | \u6211\u4eec\u53ef\u4ee5\u5c31\u8fd9\u4e2a\u5df2\u7ecf\u88ab\u5e7f\u6cdb\u8ba8\u8bba\u7684\u8bdd\u9898\u5199\u51fa\u5927\u91cf\u7684\u6587\u7ae0\uff0c\u5927\u591a\u6570\u60c5\u51b5\u4e0b\uff0c\u56e0\u4e3a\u5404\u79cd\u5404\u6837\u7684\u539f\u56e0\uff0c\u6211\u4eec\u90fd\u613f\u610f\u8ba9\u5305\u7ba1\u7406\u5668package manager\u6765\u5e2e\u6211\u4eec\u505a\u8fd9\u4e9b\u4e8b\u60c5\u3002 \n<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n \u6bcf\u4e2a Linux \u53d1\u884c\u7248\u90fd\u6709\u81ea\u5df1\u7684\u5305\u7ba1\u7406\u5668\uff0c\u5e76\u4e14\u6bcf\u4e2a\u90fd\u6709\u5404\u81ea\u6709\u4e0d\u540c\u7684\u7279\u6027\uff0c\u8fd9\u4e9b\u7279\u6027\u5305\u62ec\u5141\u8bb8\u7528\u6237\u6267\u884c\u5b89\u88c5\u65b0\u8f6f\u4ef6\u5305\uff0c\u5220\u9664\u65e0\u7528\u7684\u8f6f\u4ef6\u5305\uff0c\u66f4\u65b0\u73b0\u5b58\u7684\u8f6f\u4ef6\u5305\uff0c\u641c\u7d22\u67d0\u4e9b\u5177\u4f53\u7684\u8f6f\u4ef6\u5305\uff0c\u4ee5\u53ca\u66f4\u65b0\u6574\u4e2a\u7cfb\u7edf\u5230\u5176\u6700\u65b0\u7684\u72b6\u6001\u4e4b\u7c7b\u7684\u64cd\u4f5c\u3002<\/p>\n \u4e60\u60ef\u4e8e\u547d\u4ee4\u884c\u7684\u7528\u6237\u5927\u591a\u6570\u65f6\u95f4\u90fd\u4f1a\u4f7f\u7528\u57fa\u4e8e\u547d\u4ee4\u884c\u65b9\u5f0f\u7684\u5305\u7ba1\u7406\u5668\u3002\u5bf9\u4e8e Linux \u800c\u8a00\uff0c\u8fd9\u4e9b\u57fa\u4e8e\u547d\u4ee4\u884c\u7684\u5305\u7ba1\u7406\u5668\u6709 yum\u3001dnf\u3001rpm\u3001apt\u3001apt-get\u3001dpkg\u3001pacman \u548c zypper\u3002<\/span><\/p>\n \u4f5c\u4e3a\u4e00\u4e2a\u7cfb\u7edf\u7ba1\u7406\u5458\u4f60\u5e94\u8be5\u6e05\u695a\u5730\u77e5\u9053\uff1a\u5b89\u88c5\u5305\u6765\u81ea\u4f55\u65b9\uff0c\u5177\u4f53\u6765\u81ea\u54ea\u4e2a\u8f6f\u4ef6\u4ed3\u5e93\uff0c\u5305\u7684\u5177\u4f53\u7248\u672c\uff0c\u5305\u7684\u5927\u5c0f\uff0c\u7248\u672c\uff0c\u5305\u7684\u6e90\u4ee3\u7801 URL\uff0c\u5305\u7684\u8bb8\u53ef\u8bc1\u4fe1\u606f\uff0c\u7b49\u7b49\u3002<\/p>\n \u8fd9\u7bc7\u77ed\u6587\u5c06\u7528\u5c3d\u53ef\u80fd\u7b80\u5355\u7684\u65b9\u5f0f\u5e2e\u4f60\u4ece\u968f\u5305\u81ea\u5e26\u7684\u603b\u7ed3\u548c\u63cf\u8ff0\u4e2d\u4e86\u89e3\u8be5\u5305\u7684\u7528\u6cd5\u3002\u6309\u4f60\u6240\u4f7f\u7528\u7684 Linux \u53d1\u884c\u7248\u7684\u4e0d\u540c\uff0c\u8fd0\u884c\u4e0b\u9762\u76f8\u5e94\u7684\u547d\u4ee4\uff0c\u4f60\u80fd\u5f97\u5230\u4f60\u6240\u4f7f\u7528\u7684\u53d1\u884c\u7248\u4e0b\u7684\u5305\u7684\u8be6\u7ec6\u4fe1\u606f\u3002 YUM \u82f1\u6587\u76f4\u8bd1\u662f\u201c\u9ec4\u72d7\u66f4\u65b0\u5668\u2013\u4fee\u6539\u7248Yellowdog Updater, Modified\u201d\uff0c\u5b83\u662f\u4e00\u4e2a\u5f00\u6e90\u7684\u57fa\u4e8e\u547d\u4ee4\u884c\u7684\u5305\u7ba1\u7406\u5668\u524d\u7aef\u5b9e\u7528\u5de5\u5177\u3002\u5b83\u88ab\u5e7f\u6cdb\u5e94\u7528\u5728\u57fa\u4e8e RPM \u7684\u7cfb\u7edf\u4e0a\uff0c\u4f8b\u5982\uff1aRHEL \u548c CentOS\u3002 yumdb info \u8fd9\u4e2a\u547d\u4ee4\u63d0\u4f9b\u4e0e yum info \u76f8\u7c7b\u4f3c\u7684\u7684\u4fe1\u606f\uff0c\u4e0d\u8fc7\u5b83\u8fd8\u989d\u5916\u63d0\u4f9b\u4e86\u8bf8\u5982\u5305\u6821\u9a8c\u503c\u3001\u5305\u7c7b\u578b\u3001\u7528\u6237\u4fe1\u606f\uff08\u7531\u4f55\u4eba\u5b89\u88c5\uff09\u3002\u4ece yum 3.2.26 \u7248\u672c\u540e\uff0cyum \u5f00\u59cb\u5728 rpm \u6570\u636e\u5e93\u5916\u50a8\u5b58\u989d\u5916\u7684\u4fe1\u606f\u4e86\uff08\u6b64\u5904\u5982\u663e\u793a user \u8868\u660e\u8be5\u5305\u7531\u7528\u6237\u5b89\u88c5\uff0c\u800c dep \u8bf4\u660e\u8be5\u5305\u662f\u88ab\u4f5c\u4e3a\u88ab\u4f9d\u8d56\u7684\u5305\u800c\u88ab\u5b89\u88c5\u7684\uff09\u3002 RPM \u82f1\u6587\u76f4\u8bd1\u4e3a\u201c\u7ea2\u5e3d\u5305\u7ba1\u7406\u5668Red Hat Package Manager\u201d\uff0c\u8fd9\u662f\u4e00\u4e2a\u5728 RedHat \u4ee5\u53ca\u5176\u53d8\u79cd\u53d1\u884c\u7248\uff08\u5982RHEL\u3001CentOS\u3001Fedora\u3001openSUSE\u3001Megeia\uff09\u4e0b\u7684\u529f\u80fd\u5f3a\u5927\u7684\u547d\u4ee4\u884c\u5305\u7ba1\u7406\u5de5\u5177\u3002\u5b83\u80fd\u8ba9\u4f60\u8f7b\u677e\u7684\u5b89\u88c5\u3001\u5347\u7ea7\u3001\u5220\u9664\u3001\u67e5\u8be2\u4ee5\u53ca\u6821\u9a8c\u4f60\u7684\u7cfb\u7edf\u6216\u670d\u52a1\u5668\u4e0a\u7684\u8f6f\u4ef6\u3002RPM \u6587\u4ef6\u4ee5 .rpm \u7ed3\u5c3e\u3002RPM \u5305\u7531\u5b83\u6240\u4f9d\u8d56\u7684\u8f6f\u4ef6\u5e93\u4ee5\u53ca\u5176\u4ed6\u4f9d\u8d56\u6784\u6210\uff0c\u5b83\u4e0d\u4f1a\u4e0e\u7cfb\u7edf\u4e0a\u5df2\u7ecf\u5b89\u88c5\u7684\u5305\u51b2\u7a81\u3002 DNF \u6307\u201c\u65f6\u9ae6\u7248\u7684 YumDandified yum\u201d\uff0c\u6211\u4eec\u4e5f\u53ef\u4ee5\u8ba4\u4e3a DNF \u662f\u4e0b\u4e00\u4ee3\u7684 yum \u5305\u7ba1\u7406\u5668\uff08Yum \u7684\u4e00\u4e2a\u5206\u652f\uff09\uff0c\u5b83\u5728\u540e\u53f0\u4f7f\u7528\u4e86 hawkey\/libsolv \u5e93\u3002Ale\u0161 Kozumpl\u00edk \u5728Fedora 18 \u4e0a\u5f00\u59cb\u5f00\u53d1 DNF\uff0c\u5728 Fedora 22 \u4e0a\u6b63\u5f0f\u6700\u540e\u53d1\u5e03\u3002 dnf \u547d\u4ee4\u7528\u6765\u5728 Fedora 22 \u53ca\u4ee5\u540e\u7684\u7cfb\u7edf\u4e0a\u5b89\u88c5\u3001\u66f4\u65b0\u3001\u641c\u7d22\u4ee5\u53ca\u5220\u9664\u5305\u3002\u5b83\u80fd\u81ea\u52a8\u7684\u89e3\u51b3\u5305\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u7684\u5305\u4f9d\u8d56\u95ee\u9898\u3002 zypper \u662f\u4e00\u4e2a\u4f7f\u7528 libzypp \u5e93\u7684\u547d\u4ee4\u884c\u5305\u7ba1\u7406\u5668\u3002zypper \u63d0\u4f9b\u8bf8\u5982\u8f6f\u4ef6\u4ed3\u5e93\u8bbf\u95ee\uff0c\u5b89\u88c5\u4f9d\u8d56\u89e3\u51b3\uff0c\u8f6f\u4ef6\u5305\u5b89\u88c5\u7b49\u7b49\u529f\u80fd\u3002 Pacman \u610f\u5373\u5305\u7ba1\u7406\u5668package manager\u5b9e\u7528\u5de5\u5177\u3002pacman \u662f\u4e00\u4e2a\u7528\u4e8e\u5b89\u88c5\u3001\u6784\u5efa\u3001\u5220\u9664\u3001\u7ba1\u7406 Arch Linux \u4e0a\u5305\u7684\u547d\u4ee4\u884c\u5de5\u5177\u3002\u5b83\u540e\u7aef\u4f7f\u7528 libalpm\uff08Arch Linux package Manager\uff08ALPM\uff09\u5e93\uff09\u6765\u5b8c\u6210\u6240\u6709\u529f\u80fd\u3002 apt-cache \u547d\u4ee4\u80fd\u663e\u793a apt \u5185\u90e8\u6570\u636e\u5e93\u4e2d\u7684\u5927\u91cf\u4fe1\u606f\u3002\u8fd9\u4e9b\u4fe1\u606f\u662f\u4ece sources.list \u4e2d\u7684\u4e0d\u540c\u7684\u8f6f\u4ef6\u6e90\u4e2d\u641c\u96c6\u800c\u6765\uff0c\u56e0\u6b64\u4ece\u67d0\u79cd\u610f\u4e49\u4e0a\u8fd9\u4e9b\u4fe1\u606f\u4e5f\u53ef\u4ee5\u88ab\u8ba4\u4e3a\u662f\u67d0\u79cd\u7f13\u5b58\u3002\u8fd9\u4e9b\u4fe1\u606f\u641c\u96c6\u5de5\u4f5c\u662f\u5728\u8fd0\u884c apt update \u547d\u4ee4\u65f6\u6267\u884c\u7684\u3002 APT \u610f\u4e3a\u9ad8\u7ea7\u6253\u5305\u5de5\u5177Advanced Packaging Tool\uff0c\u5c31\u50cf DNF \u5c06\u5982\u4f55\u66ff\u4ee3 YUM \u4e00\u6837\uff0cAPT \u662f apt-get \u7684\u66ff\u4ee3\u7269\u3002\u5b83\u529f\u80fd\u4e30\u5bcc\u7684\u547d\u4ee4\u884c\u5de5\u5177\u5305\u62ec\u4e86\u5982\u4e0b\u6240\u6709\u547d\u4ee4\u7684\u529f\u80fd\u5982 apt-cache\u3001apt-search\u3001dpkg\u3001apt-cdrom\u3001apt-config\u3001apt-key \u7b49\u7b49\uff0c\u6211\u4eec\u53ef\u4ee5\u65b9\u4fbf\u7684\u901a\u8fc7 apt \u6765\u5b89\u88c5 .dpkg \u5305\uff0c\u4f46\u662f\u6211\u4eec\u5374\u4e0d\u80fd\u901a\u8fc7 apt-get \u6765\u5b8c\u6210\u8fd9\u4e00\u70b9\uff0c\u8fd8\u6709\u4e00\u4e9b\u5176\u4ed6\u7684\u7c7b\u4f3c\u7684\u529f\u80fd\u4e5f\u4e0d\u80fd\u7528 apt-get \u6765\u5b8c\u6210\uff0c\u6240\u4ee5 apt-get \u56e0\u4e3a\u6ca1\u6709\u89e3\u51b3\u4e0a\u8ff0\u529f\u80fd\u7f3a\u4e4f\u7684\u539f\u56e0\u800c\u88ab apt \u6240\u53d6\u4ee3\u3002 dpkg \u610f\u6307 Debian \u5305\u7ba1\u7406\u5668Debian package manager\u3002dpkg \u662f\u7528\u4e8e Debian \u7cfb\u7edf\u4e0a\u5b89\u88c5\u3001\u6784\u5efa\u3001\u79fb\u9664\u4ee5\u53ca\u7ba1\u7406 Debian \u5305\u7684\u547d\u4ee4\u884c\u5de5\u5177\u3002dpkg \u4f7f\u7528 aptitude\uff08\u56e0\u4e3a\u5b83\u66f4\u4e3a\u4e3b\u6d41\u53ca\u7528\u6237\u53cb\u597d\uff09\u4f5c\u4e3a\u524d\u7aef\u5de5\u5177\u6765\u5b8c\u6210\u6240\u6709\u7684\u529f\u80fd\u3002\u5176\u4ed6\u7684\u5de5\u5177\u5982dpkg-deb \u548c dpkg-query \u4f7f\u7528 dpkg \u505a\u4e3a\u524d\u7aef\u6765\u5b9e\u73b0\u529f\u80fd\u3002\u5c3d\u7ba1\u7cfb\u7edf\u7ba1\u7406\u5458\u8fd8\u662f\u65f6\u4e0d\u65f6\u4f1a\u5728\u5fc5\u8981\u65f6\u4f7f\u7528 dpkg \u6765\u5b8c\u6210\u4e00\u4e9b\u8f6f\u4ef6\u5b89\u88c5\u7684\u4efb\u52a1\uff0c\u4ed6\u5927\u591a\u6570\u60c5\u51b5\u4e0b\u8fd8\u662f\u4f1a\u56e0\u4e3a apt\u3001apt-get \u4ee5\u53ca aptitude \u7684\u5065\u58ee\u6027\u800c\u4f7f\u7528\u540e\u8005\u3002 \uff08LCTT \u8bd1\u6ce8\uff1a \u7528 dpkg -p \u67e5\u770b python3 \u5305\u7684\u4fe1\u606f\uff09<\/p>\n aptitude \u662f Debian GNU\/Linux \u5305\u7ba1\u7406\u7cfb\u7edf\u7684\u6587\u672c\u754c\u9762\u3002\u5b83\u5141\u8bb8\u7528\u6237\u67e5\u770b\u5df2\u5b89\u88c5\u7684\u5305\u7684\u5217\u8868\uff0c\u4ee5\u53ca\u5b8c\u6210\u8bf8\u5982\u5b89\u88c5\u3001\u5347\u7ea7\u3001\u5220\u9664\u5305\u4e4b\u7c7b\u7684\u5305\u7ba1\u7406\u4efb\u52a1\u3002\u8fd9\u4e9b\u7ba1\u7406\u884c\u4e3a\u4e5f\u80fd\u4ece\u56fe\u5f62\u63a5\u53e3\u6765\u6267\u884c\u3002 via:\u00a0https:\/\/www.2daygeek.com\/how-to-view-detailed-information-about-a-package-in-linux\/<\/a><\/p>\n \u4f5c\u8005\uff1aPrakash Subramanian<\/a>\u00a0\u9009\u9898\uff1alujun9972<\/a>\u00a0\u8bd1\u8005\uff1aDavidChenLiang<\/a>\u00a0\u6821\u5bf9\uff1awxy<\/a><\/p>\n \u539f\u6587\u6765\u81ea\uff1ahttps:\/\/www.linuxidc.com\/Linux\/2018-09\/154135.htm<\/a><\/p>\n |