What do the *-dev packages in the Linux package repositories actually contain?

故事扮演 提交于 2019-11-28 03:39:01

The *-dev packages most often contain the headers related to a library's interface. Next most common are package-config files (*.pc) describing build options and staticly linked libraries.

In general, if you want to know the contents of a package you have installed, dpkg -L pkgname will get you that. The apt-file program can tell you the same for any package in the repositories.

Note, also, that the answers by William Pursell and caf contain useful additional details. If you find their input helpful, do upvote it.

(disclaimer: I'm familiar with Debian but not Ubuntu, so although it is almost certain that everything I write below applies, there's is a chance it's not.)

One more item in the *-dev package is the /usr/lib/lib*.so link. The libfoo0 package will install the file /usr/lib/libfoo.so.0.0, while libfoo-dev installs the links /usr/lib/libfoo.so.0 and /usr/lib/libfoo.so. This is the mechanism that allows you to have libfoo0 and libfoo1 installed simultaneously, so that software requiring the old library can co-exist on the box with software using the new library. When you install libfoo-dev, any software that is compiled will follow the *.so link and link against the version of the library referenced by that link.

The -dev packages usually contain C header files and statically compiled versions of library files (.a extension). Sometimes they contain additional documentation and examples, or even helper applications.

This package contains the headers and other development files not included in the main pidgin package. Install -dev if you wish to compile your own plugins.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!