您可能知道,我们可以使用apt-get install --print-uris -y package-name,它向我们展示了URL、hashsum等的列表。
但是,如果我们将它用于已经安装在系统上的包,则它无法工作:
Reading package lists... Done
Building dependency tree
Reading state information... Done
package is already the newest version (x.x-x).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.那么,如何使用apt或其他CLI工具(如aptitude )获得必要的URL列表呢?
PS:我不想使用packages.ubuntu.com。
发布于 2017-06-29 22:22:52
当然,并不是所有已安装的包都有一个与它们相关联的URL。但是,您可以使用apt-get dowload:
$ apt-get download --print-uris wget
'http://archive.ubuntu.com/ubuntu/pool/main/w/wget/wget_1.15-1ubuntu1.14.04.2_amd64.deb' wget_1.15-1ubuntu1.14.04.2_amd64.deb 270522 SHA256:a3f3b049ea373402236a804a5a0952c6ef9b356ba8cc19fbc1f257db6e8f3052这是候选版本,如apt-cache policy所示,可能不一定是已安装的版本。
https://askubuntu.com/questions/930429
复制相似问题