有时,apt-cache 会提供“-dev”包,例如:
libdianewcanvas2 - a gtk+2 vectorial canvas with extra features
libdianewcanvas2-dev - a gtk+2 vectorial canvas with extra features
我想知道什么时候应该安装“*-dev”包?libdianewcanvas2 和 libdianewcanvas2-dev 有什么区别?
答案1
让我们比较一下这两个包的输出apt show PACKAGENAME
。这里我没有展示完整的输出,只展示一些相关部分:
$ apt show libdianewcanvas2 libdianewcanvas2-dev
Package: libdianewcanvas2
Version: 0.6.10-5.4
[...]
Description: a gtk+2 vectorial canvas with extra features
Dia-newcanvas is a gtk+2 vectorial widget that has got extra features as
compared to GNOME canvas:
.
[...]
Package: libdianewcanvas2-dev
Version: 0.6.10-5.4
[...]
Description: a gtk+2 vectorial canvas with extra features
Dia-newcanvas is a gtk+2 vectorial widget that has got extra features as
compared to GNOME canvas:
.
[...]
.
This package contains the header files and static library needed for
development of programs using dia-newcanvas.
这里的区别**This package contains the header files and static library needed for development of programs using dia-newcanvas.**
实际上正是对大多数*-dev
包装的描述。
总而言之,您通常只需要*-dev
根据软件包提供的库来开发自己的应用程序。除此之外,我看不出有什么用例需要您手动安装。当然,您安装的其他一些软件包也有可能具有*-dev
依赖关系,因此会自动安装。