从 PPA 下载包的简单方法?

从 PPA 下载包的简单方法?

我想知道是否有一个命令行工具可以用来从源(标准 Ubuntu 或 PPA 源)下载包?

我知道我只是安装的所有文件都在 /var/cache/apt/archives 中,因此我可以从那里检出包。

但是,如果我很久以前就安装了该软件包,我不想重新安装它,只想检查源包中的几项内容,我怎样才能轻松地找到它而不必在互联网上搜索它?

答案1

如果您知道软件包名称,则可以使用apt它来获取源代码或二进制文件:

apt-get download packageName  

将会把二进制文件下载到当前目录。

apt-get source packageName  

将会下载的源代码packageName到当前目录。

答案2

您可以使用,apt-get install --print-uris package因为这也将告诉您如何下载所有依赖项:

apt-get install --print-uris evolution
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  bogofilter bogofilter-bdb bogofilter-common evolution-common
  evolution-plugins libevolution libgsl0ldbl libgtkhtml-4.0-0
  libgtkhtml-4.0-common libgtkhtml-editor-4.0-0 libpst4 libytnef0
Suggested packages:
  db5.1-util doc-base evolution-ews evolution-plugins-experimental
  gsl-ref-psdoc gsl-doc-pdf gsl-doc-info gsl-ref-html
The following NEW packages will be installed:
  bogofilter bogofilter-bdb bogofilter-common evolution evolution-common
  evolution-plugins libevolution libgsl0ldbl libgtkhtml-4.0-0
  libgtkhtml-4.0-common libgtkhtml-editor-4.0-0 libpst4 libytnef0
0 upgraded, 13 newly installed, 0 to remove and 12 not upgraded.
Need to get 12.5 MB of archives.
After this operation, 63.4 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
'http://ftp.us.debian.org/debian/pool/main/g/gtkhtml4.0/libgtkhtml-4.0-common_4.6.6-2_all.deb' libgtkhtml-4.0-common_4.6.6-2_all.deb 378210 MD5Sum:d1653f7bb0dd99a3309f5972a1c663a7
'http://ftp.us.debian.org/debian/pool/main/g/gtkhtml4.0/libgtkhtml-4.0-0_4.6.6-2_i386.deb' libgtkhtml-4.0-0_4.6.6-2_i386.deb 347140 MD5Sum:75b9b5063b2dfac8fb8051e56cf5a912
'http://ftp.us.debian.org/debian/pool/main/g/gtkhtml4.0/libgtkhtml-editor-4.0-0_4.6.6-2_i386.deb' libgtkhtml-editor-4.0-0_4.6.6-2_i386.deb 137156 MD5Sum:e81f57d363b85437a7dee14c9998544f
'http://ftp.us.debian.org/debian/pool/main/liby/libytnef/libytnef0_1.5-6_i386.deb' libytnef0_1.5-6_i386.deb 19306 MD5Sum:0abe272e79e68ef1363709e552800d37
'http://ftp.us.debian.org/debian/pool/main/e/evolution/libevolution_3.8.5-2+b1_i386.deb' libevolution_3.8.5-2+b1_i386.deb 2063408 MD5Sum:bbb131799011ba8e043d670088121293
'http://ftp.us.debian.org/debian/pool/main/e/evolution/evolution-common_3.8.5-2_all.deb' evolution-common_3.8.5-2_all.deb 7621194 MD5Sum:1707c418f80e4e9eb53d16e455a712c9
'http://ftp.us.debian.org/debian/pool/main/e/evolution/evolution_3.8.5-2+b1_i386.deb' evolution_3.8.5-2+b1_i386.deb 238110 MD5Sum:d9aa09c6b460404162e0672ba39093f1
'http://ftp.us.debian.org/debian/pool/main/libp/libpst/libpst4_0.6.59-1_i386.deb' libpst4_0.6.59-1_i386.deb 83814 MD5Sum:5b9749e3e22ab78331b0baf824071e76
'http://ftp.us.debian.org/debian/pool/main/b/bogofilter/bogofilter-common_1.2.4+dfsg1-2_all.deb' bogofilter-common_1.2.4+dfsg1-2_all.deb 184480 MD5Sum:fefc9ea5cf24be409cb318130242f2dc
'http://ftp.us.debian.org/debian/pool/main/g/gsl/libgsl0ldbl_1.16+dfsg-1_i386.deb' libgsl0ldbl_1.16+dfsg-1_i386.deb 986202 MD5Sum:d3bb41a6218035eb062749f7ec905f08
'http://ftp.us.debian.org/debian/pool/main/b/bogofilter/bogofilter-bdb_1.2.4+dfsg1-2_i386.deb' bogofilter-bdb_1.2.4+dfsg1-2_i386.deb 145226 MD5Sum:c063ba8de7ddc4192c324f04c092783a
'http://ftp.us.debian.org/debian/pool/main/b/bogofilter/bogofilter_1.2.4+dfsg1-2_all.deb' bogofilter_1.2.4+dfsg1-2_all.deb 1012 MD5Sum:5f1257670b430f96470a361e053d86fb
'http://ftp.us.debian.org/debian/pool/main/e/evolution/evolution-plugins_3.8.5-2+b1_i386.deb' evolution-plugins_3.8.5-2+b1_i386.deb 260382 MD5Sum:bf4efa25dd9a83d931a078a4c61d1c8e

答案3

仅下载包-d的选项。apt-get

因此你可以打电话apt-get -d install <package>

相关内容