How to list/download the recursive dependencies of a debian package?

后端 未结 3 932
梦如初夏
梦如初夏 2021-01-30 04:20

I need to list/download all the recursive dependencies of a debian package.

Suppose i need to install package a.deb and it depends on package b.deb and again package b.d

3条回答
  •  渐次进展
    2021-01-30 04:54

    As midihenry pointed out - install the apt-rdepends package and then run this

    $ apt-rdepends gcc | awk '$1 ~ /^Depends:/{print $2}' | xargs apt-get download
    

    this line will get all dependencies recursively and, looking at the second pipe, will download all the packages by name from the stdio, which is what the line -

    awk $1 ~ /^Depends:/{print $2} does. prints out the names of packages. If you run these commands additively, you'll see what i mean.

提交回复
热议问题