{"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":"\n\n\n
\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
\n\"\"<\/p>\n

YUM \u547d\u4ee4\uff1a\u5728 RHEL \u548c CentOS \u7cfb\u7edf\u4e0a\u83b7\u5f97\u5305\u7684\u4fe1\u606f<\/strong><\/div>\n

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
\nYum \u662f\u7528\u4e8e\u5728\u5b98\u65b9\u53d1\u884c\u7248\u4ed3\u5e93\u4ee5\u53ca\u5176\u4ed6\u7b2c\u4e09\u65b9\u53d1\u884c\u7248\u4ed3\u5e93\u4e0b\u83b7\u53d6\u3001\u5b89\u88c5\u3001\u5220\u9664\u3001\u67e5\u8be2 RPM \u5305\u7684\u4e3b\u8981\u5de5\u5177\u3002
\n\uff08LCTT \u8bd1\u6ce8\uff1a\u7528 yum info \u83b7\u53d6 python \u5305\u7684\u4fe1\u606f\uff09<\/p>\n

#yuminfo python\r\nLoaded plugins: fastestmirror, security\r\nLoading mirror speeds from cached hostfile\r\n* epel: epel.mirror.constant.com\r\nInstalledPackages\r\nName: python\r\nArch: x86_64\r\nVersion:2.6.6\r\nRelease:66.el6_8\r\nSize:78 k\r\nRepo: installed\r\nFrom repo : updates\r\nSummary:An interpreted, interactive, object-oriented programming language\r\nURL : http:\/\/www.python.org\/\r\nLicense:Python\r\nDescription:Pythonis an interpreted, interactive, object-oriented programming\r\n: language often compared to Tcl,Perl,SchemeorJava.Python includes\r\n: modules, classes, exceptions, very high level dynamic data types and\r\n: dynamic typing.Python supports interfaces to many system calls and\r\n: libraries,as well as to various windowing systems (X11,Motif,Tk,\r\n:Macand MFC).\r\n:\r\n:Programmers can writenew built-in modules forPythonin C or C++.\r\n:Python can be used as an extension language for applications that need\r\n: a programmable interface.\r\n:\r\n:Note that documentation forPythonis provided in the python-docs\r\n:package.\r\n:\r\n:Thispackage provides the \"python\" executable; most of the actual\r\n: implementation is within the \"python-libs\"package.\r\n<\/pre>\n
YUMDB \u547d\u4ee4\uff1a\u67e5\u770b RHEL \u548c CentOS \u7cfb\u7edf\u4e0a\u7684\u5305\u4fe1\u606f<\/strong><\/div>\n

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
\n\uff08LCTT \u8bd1\u6ce8\uff1a\u7528 yumdb info \u6765\u83b7\u53d6 python \u5305\u7684\u4fe1\u606f\uff09<\/p>\n

# yumdb info python\r\nLoaded plugins: fastestmirror\r\npython-2.6.6-66.el6_8.x86_64\r\nchanged_by =4294967295\r\nchecksum_data =53c75a1756e5b4f6564c5229a37948c9b4561e0bf58076bd7dab7aff85a417f2\r\nchecksum_type = sha256\r\ncommand_line = update -y\r\nfrom_repo = updates\r\nfrom_repo_revision =1488370672\r\nfrom_repo_timestamp =1488371100\r\ninstalled_by =4294967295\r\nreason = dep\r\nreleasever =6\r\n<\/pre>\n
RPM \u547d\u4ee4\uff1a\u5728 RHEL\/CentOS\/Fedora \u7cfb\u7edf\u4e0a\u67e5\u770b\u5305\u7684\u4fe1\u606f<\/strong><\/div>\n

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
\n\uff08LCTT \u8bd1\u6ce8\uff1a\u7528 rpm -qi \u67e5\u8be2 nano \u5305\u7684\u5177\u4f53\u4fe1\u606f\uff09<\/p>\n

# rpm -qi nano\r\nName:nanoRelocations:(not relocatable)\r\nVersion:2.0.9Vendor:CentOS\r\nRelease:7.el6BuildDate:Fri12Nov201002:18:36 AM EST\r\nInstallDate:Fri03Mar201708:57:47 AM EST BuildHost: c5b2.bsys.dev.centos.org\r\nGroup:Applications\/EditorsSource RPM:nano-2.0.9-7.el6.src.rpm\r\nSize:1588347License:GPLv3+\r\nSignature: RSA\/8,Sun03Jul201112:46:50 AM EDT,Key ID 0946fca2c105b9de\r\nPackager:CentOSBuildSystem\r\nURL : http:\/\/www.nano-editor.org\r\nSummary: A small text editor\r\nDescription:\r\nGNU nanois a small and friendly text editor.\r\n<\/pre>\n
DNF \u547d\u4ee4\uff1a\u5728 Fedora \u7cfb\u7edf\u4e0a\u67e5\u770b\u5305\u4fe1\u606f<\/strong><\/div>\n

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
\n\uff08LCTT \u8bd1\u6ce8\uff1a \u7528 dnf info \u67e5\u770b tilix \u5305\u4fe1\u606f\uff09<\/p>\n

$ dnf info tilix\r\nLast metadata expiration check:27 days,10:00:23 ago on Wed04Oct201706:43:27 AM IST.\r\nInstalledPackages\r\nName: tilix\r\nVersion:1.6.4\r\nRelease:1.fc26\r\nArch: x86_64\r\nSize:3.6 M\r\nSource: tilix-1.6.4-1.fc26.src.rpm\r\nRepo:@System\r\nFrom repo :@commandline\r\nSummary:Tiling terminal emulator\r\nURL : https:\/\/github.com\/gnunn1\/tilix\r\nLicense:MPLv2.0andGPLv3+and CC-BY-SA\r\nDescription:Tilixis a tiling terminal emulator with the following features:\r\n:\r\n:-Layout terminals in any fashion by splitting them horizontally or vertically\r\n:-Terminals can be re-arranged using drag and drop both within and between\r\n: windows\r\n:-Terminals can be detached into a new window via drag and drop\r\n:-Input can be synchronized between terminals so commands typed in one\r\n: terminal are replicated to the others\r\n:-The grouping of terminals can be saved and loaded from disk\r\n:-Terminals support custom titles\r\n:-Color schemes are stored in files and custom color schemes can be created by\r\n: simply creating a newfile\r\n:-Transparent background\r\n:-Supports notifications when processes are completed out of view\r\n:\r\n:The application was written using GTK 3and an effort was made to conform to\r\n: GNOME HumanInterfaceGuidelines(HIG).\r\n<\/pre>\n
Zypper \u547d\u4ee4\uff1a\u5728 openSUSE \u7cfb\u7edf\u4e0a\u67e5\u770b\u5305\u4fe1\u606f<\/strong><\/div>\n

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
\n\uff08LCTT \u8bd1\u6ce8\uff1a \u7528 zypper info \u67e5\u8be2 nano \u5305\u7684\u4fe1\u606f\uff09<\/p>\n

$ zypper infonano\r\nLoading repository data...\r\nReading installed packages...\r\nInformationforpackagenano:\r\n-----------------------------\r\nRepository:MainRepository(OSS)\r\nName:nano\r\nVersion:2.4.2-5.3\r\nArch: x86_64\r\nVendor: openSUSE\r\nInstalledSize:1017.8KiB\r\nInstalled:No\r\nStatus:not installed\r\nSourcepackage:nano-2.4.2-5.3.src\r\nSummary:Pico editor clonewith enhancements\r\nDescription:\r\nGNU nanois a small and friendly text editor.It aims to emulate\r\nthe Pico text editor while also offering a few enhancements.\r\n<\/pre>\n
Pacman \u547d\u4ee4\uff1a\u5728 ArchLinux \u53ca Manjaro \u7cfb\u7edf\u4e0a\u67e5\u770b\u5305\u4fe1\u606f<\/strong><\/div>\n

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
\n\uff08LCTT \u8bd1\u6ce8\uff1a \u7528 pacman -Qi \u6765\u67e5\u8be2 bash \u5305\u4fe1\u606f\uff09<\/p>\n

$ pacman -Qibash\r\nName:bash\r\nVersion:4.4.012-2\r\nDescription:The GNU BourneAgain shell\r\nArchitecture: x86_64\r\nURL : http:\/\/www.gnu.org\/software\/bash\/bash.html\r\nLicenses: GPL\r\nGroups: base\r\nProvides: sh\r\nDependsOn: readline>=7.0 glibc ncurses\r\nOptionalDeps:bash-completion:for tab completion\r\nRequiredBy: autoconf automake bison bzip2 ca-certificates-utils db\r\ndhcpcd diffutils e2fsprogs fakeroot figlet findutils\r\nflex freetype2 gawk gdbm gettext gmp grub gzip icu\r\niptables keyutils libgpg-error libksba libpcap libpng\r\nlibtool lvm2 m4 man-db mkinitcpio nano neofetch nspr\r\nnss openresolv os-prober pacman pcre pcre2 shadow\r\nsystemd texinfo vte-common which xdg-user-dirs xdg-utils\r\nxfsprogs xorg-mkfontdir xorg-xpr xz\r\nOptionalFor:None\r\nConflictsWith:None\r\nReplaces:None\r\nInstalledSize:7.13MiB\r\nPackager:JanAlexanderSteffens(heftig)\r\nBuildDate:Tue14Feb201701:16:51 PM UTC\r\nInstallDate:Thu24Aug201706:08:12 AM UTC\r\nInstallReason:Explicitly installed\r\nInstallScript:No\r\nValidatedBy:Signature\r\n<\/pre>\n
apt-cache \u547d\u4ee4\uff1a\u5728 Debian\/Ubuntu\/Mint \u7cfb\u7edf\u4e0a\u67e5\u770b\u5305\u4fe1\u606f<\/strong><\/div>\n

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
\n\uff08LCTT \u8bd1\u6ce8\uff1a\u7528\u7ba1\u7406\u5458\u6743\u9650\u67e5\u8be2 apache2 \u5305\u7684\u4fe1\u606f\uff09<\/p>\n

$ sudo apt-cache show apache2\r\nPackage: apache2\r\nPriority: optional\r\nSection: web\r\nInstalled-Size:473\r\nMaintainer:UbuntuDevelopers\r\nOriginal-Maintainer:DebianApacheMaintainers\r\nArchitecture: amd64\r\nVersion:2.4.12-2ubuntu2\r\nReplaces: apache2.2-common\r\nProvides: httpd, httpd-cgi\r\nDepends: lsb-base, procps, perl, mime-support, apache2-bin (=2.4.12-2ubuntu2), apache2-utils (>=2.4), apache2-data (=2.4.12-2ubuntu2)\r\nPre-Depends: dpkg (>=1.17.14)\r\nRecommends: ssl-cert\r\nSuggests: www-browser, apache2-doc, apache2-suexec-pristine | apache2-suexec-custom, ufw\r\nConflicts: apache2.2-common (<<2.3~)\r\nFilename: pool\/main\/a\/apache2\/apache2_2.4.12-2ubuntu2_amd64.deb\r\nSize:91348\r\nMD5sum: ab0ee0b0d1c6b3d19bd87aa2a9537125\r\nSHA1:350c9a1a954906088ed032aebb77de3d5bb24004\r\nSHA256:03f515f7ebc3b67b050b06e82ebca34b5e83e34a528868498fce020bf1dbbe34\r\nDescription-en:Apache HTTP Server\r\nTheApache HTTP ServerProject's goal is to build a secure, efficient and\r\nextensible HTTP server as standards-compliant open source software. The\r\nresult has long been the number one web server on the Internet.\r\n.\r\nInstalling this package results in a full installation, including the\r\nconfiguration files, init scripts and support scripts.\r\nDescription-md5: d02426bc360345e5acd45367716dc35c\r\nHomepage: http:\/\/httpd.apache.org\/\r\nBugs: https:\/\/bugs.launchpad.net\/ubuntu\/+filebug\r\nOrigin: Ubuntu\r\nSupported: 9m\r\nTask: lamp-server, mythbuntu-frontend, mythbuntu-desktop, mythbuntu-backend-slave, mythbuntu-backend-master, mythbuntu-backend-master\r\n<\/pre>\n
APT \u547d\u4ee4\uff1a\u67e5\u770b Debian\/Ubuntu\/Mint \u7cfb\u7edf\u4e0a\u7684\u5305\u4fe1\u606f<\/strong><\/div>\n

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
\n\uff08LCTT \u8bd1\u6ce8\uff1a \u7528 apt show \u67e5\u770b nano \u5305\u4fe1\u606f\uff09<\/p>\n

$ apt show nano\r\nPackage:nano\r\nVersion:2.8.6-3\r\nPriority: standard\r\nSection: editors\r\nOrigin:Ubuntu\r\nMaintainer:UbuntuDevelopers\r\nOriginal-Maintainer:JordiMallach\r\nBugs: https:\/\/bugs.launchpad.net\/ubuntu\/+filebug\r\nInstalled-Size:766 kB\r\nDepends: libc6 (>=2.14), libncursesw5 (>=6), libtinfo5 (>=6)\r\nSuggests: spell\r\nConflicts: pico\r\nBreaks:nano-tiny (<<2.8.6-2)\r\nReplaces:nano-tiny (<<2.8.6-2), pico\r\nHomepage: https:\/\/www.nano-editor.org\/\r\nTask: standard, ubuntu-touch-core, ubuntu-touch\r\nSupported:9m\r\nDownload-Size:222 kB\r\nAPT-Manual-Installed:yes\r\nAPT-Sources: http:\/\/in.archive.ubuntu.com\/ubuntu artful\/main amd64 Packages\r\nDescription: small, friendly text editor inspired by Pico\r\nGNU nanois an easy-to-use text editor originally designed as a replacement\r\nforPico, the ncurses-based editor from the non-free mailer packagePine\r\n(itself now available under the ApacheLicenseasAlpine).\r\n.\r\nHowever, GNU nano also implements many features missing in pico, including:\r\n- undo\/redo\r\n- line numbering\r\n- syntax coloring\r\n- soft-wrapping of overlong lines\r\n- selecting text by holding Shift\r\n- interactive search and replace (with regular expression support)\r\n- a go-to line (and column) command\r\n- support for multiple file buffers\r\n-auto-indentation\r\n- tab completion of filenames and search terms\r\n- toggling features while running\r\n-and full internationalization support\r\n<\/pre>\n
dpkg \u547d\u4ee4\uff1a\u67e5\u770bDebian\/Ubuntu\/Mint\u7cfb\u7edf\u4e0a\u7684\u5305\u4fe1\u606f<\/strong><\/div>\n

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
\n\uff08LCTT \u8bd1\u6ce8\uff1a \u7528 dpkg -s \u67e5\u770b python \u5305\u7684\u4fe1\u606f\uff09<\/p>\n

$ dpkg -s python\r\nPackage: python\r\nStatus: install ok installed\r\nPriority: optional\r\nSection: python\r\nInstalled-Size:626\r\nMaintainer:UbuntuDevelopers\r\nArchitecture: amd64\r\nMulti-Arch: allowed\r\nSource: python-defaults\r\nVersion:2.7.14-2ubuntu1\r\nReplaces: python-dev (<<2.6.5-2) Provides: python-ctypes, python-email, python-importlib, python-profiler, python-wsgiref Depends: python2.7(>=2.7.14-1~), libpython-stdlib (=2.7.14-2ubuntu1)\r\nPre-Depends: python-minimal (=2.7.14-2ubuntu1)\r\nSuggests: python-doc (=2.7.14-2ubuntu1), python-tk (>=2.7.14-1~)\r\nBreaks: update-manager-core (<<0.200.5-2)\r\nConflicts: python-central (<<0.5.5)\r\nDescription: interactive high-level object-oriented language (default version)\r\nPython, the high-level, interactive object oriented language,\r\nincludes an extensive class library with lots of goodies for\r\nnetwork programming, system administration, sounds and graphics.\r\n.\r\nThispackageis a dependency package, which depends on Debian's default\r\nPython version (currently v2.7).\r\nHomepage: http:\/\/www.python.org\/\r\nOriginal-Maintainer: Matthias Klose\r\n<\/pre>\n
\u6211\u4eec\u4e5f\u53ef\u4f7f\u7528 dpkg \u7684 -p \u9009\u9879\uff0c\u8fd9\u4e2a\u9009\u9879\u63d0\u4f9b\u548c dpkg -s \u76f8\u7c7b\u4f3c\u7684\u4fe1\u606f\uff0c\u4f46\u662f\u5b83\u8fd8\u63d0\u4f9b\u4e86\u5305\u7684\u6821\u9a8c\u503c\u548c\u5305\u7c7b\u578b\u3002<\/strong><\/div>\n

\uff08LCTT \u8bd1\u6ce8\uff1a \u7528 dpkg -p \u67e5\u770b python3 \u5305\u7684\u4fe1\u606f\uff09<\/p>\n

$ dpkg -p python3\r\nPackage: python3\r\nPriority: important\r\nSection: python\r\nInstalled-Size:67\r\nOrigin:Ubuntu\r\nMaintainer:UbuntuDevelopers\r\nBugs: https:\/\/bugs.launchpad.net\/ubuntu\/+filebug\r\nArchitecture: amd64\r\nMulti-Arch: allowed\r\nSource: python3-defaults\r\nVersion:3.6.3-0ubuntu2\r\nReplaces: python3-minimal (<<3.1.2-2) Provides: python3-profiler Depends: python3.6(>=3.6.3-1~), libpython3-stdlib (=3.6.3-0ubuntu2), dh-python\r\nPre-Depends: python3-minimal (=3.6.3-0ubuntu2)\r\nSuggests: python3-doc (>=3.6.3-0ubuntu2), python3-tk (>=3.6.3-1~), python3-venv (>=3.6.3-0ubuntu2)\r\nFilename: pool\/main\/p\/python3-defaults\/python3_3.6.3-0ubuntu2_amd64.deb\r\nSize:8712\r\nMD5sum: a8bae494c6e5d1896287675faf40d373\r\nDescription: interactive high-level object-oriented language (default python3 version)\r\nOriginal-Maintainer:MatthiasKlose\r\nSHA1:2daec885cea7d4dc83c284301c3bebf42b23e095\r\nSHA256:865e509c91d2504a16c4b573dbe27e260c36fceec2add3fa43a30c1751d7e9bb\r\nHomepage: http:\/\/www.python.org\/\r\nTask: minimal, ubuntu-core, ubuntu-core\r\nDescription-md5:950ebd8122c0a7340f0a740c295b9eab\r\nSupported:9m\r\n<\/pre>\n
aptitude \u547d\u4ee4\uff1a\u67e5\u770b Debian\/Ubuntu\/Mint \u7cfb\u7edf\u4e0a\u7684\u5305\u4fe1\u606f<\/strong><\/div>\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
\n\uff08LCTT \u8bd1\u6ce8\uff1a \u7528 aptitude show \u67e5\u770b htop \u5305\u4fe1\u606f\uff09<\/p>\n

$ aptitude show htop\r\nPackage:htop\r\nVersion:2.0.2-1\r\nState: installed\r\nAutomatically installed:no\r\nPriority: optional\r\nSection: universe\/utils\r\nMaintainer:UbuntuDevelopers\r\nArchitecture: amd64\r\nUncompressedSize:216 k\r\nDepends: libc6 (>=2.15), libncursesw5 (>=6), libtinfo5 (>=6)\r\nSuggests:lsof,strace\r\nConflicts:htop:i386\r\nDescription: interactive processes viewer\r\nHtopis an ncursed-based process viewer similar to top, but it allows one to scroll the list vertically and horizontally to see all processes and their full command lines.\r\nTasks related to processes (killing, renicing) can be done without entering their PIDs.\r\nHomepage: http:\/\/hisham.hm\/htop\/\r\n<\/pre>\n

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

\n

\u539f\u6587\u6765\u81ea\uff1ahttps:\/\/www.linuxidc.com\/Linux\/2018-09\/154135.htm<\/a><\/p>\n

\u672c\u6587\u5730\u5740\uff1ahttps:\/\/lrxjmw.cn\/package-on-linux.html<\/a>\u7f16\u8f91\uff1a\u738b\u5065\u8fbe\uff0c\u5ba1\u6838\u5458\uff1a\u9004\u589e\u5b9d<\/span><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"

\u5bfc\u8bfb \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\u5668 […]<\/p>\n","protected":false},"author":1893,"featured_media":120551,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-120539","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\/120539","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\/1893"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=120539"}],"version-history":[{"count":4,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/120539\/revisions"}],"predecessor-version":[{"id":120573,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/120539\/revisions\/120573"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/120551"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=120539"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=120539"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=120539"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}