What is the utility of devel packages like "libgtk+-devel" or "python-devel" etc.? Do they contain source of the library? How is it different from non-devel packages like libgtk+?
-
3It's not worth opening another answer, but in addition to existing answers, I should emphasize that packagers try to put in a non-devel package such as `libgtk+` the minimum footprint necessary to run (as opposed to "develop") gtk+ programs. That means only dynamic libraries and configuration files. Everything else goes in the complementary `-devel` package. – Pascal Cuoq Mar 02 '10 at 04:33
2 Answers
The *-devel
packages (usually called *-dev
in Debian-based distributions) are usually all the files necessary to compile code against a given library.
For running an application using the library libfoo
only the actualy shared library file (*.so.*
, for example libfoo.so.1.0
) are needed (plus possibly some data files and some version-specific symlinks).
When you actually want to compile a C application that uses that library you'll need the header files (*.h
, for example foo.h
) that describe the interface of that application as well as a version-less symlink to the shared library (*.so
, for example libfoo.so
-> libfoo.so.1.0
). Those are usually bundled in the *-devel
packages.
Sometimes the *-devel
packages also include statically compiled versions of the libraries (*.a
, for example libfoo.a
) in case you want to build a complete stand-alone application that doesn't depend on dynamic libraries at all.
Other languages (such as Java, Python, ...) use a different way of noting the API of a library (effectively including all the necessary information in the actual library) and thus usually need no separate *-devel
packages (except maybe for documentation and additional tools).

- 302,674
- 57
- 556
- 614
-
4Almost. the `.so` file is in the -devel package; the normal shared library goes by `.so.*`, since it includes a SONAME. The `.so` file is used by the linker, and the `.so.*` library is used at runtime. – Ignacio Vazquez-Abrams Mar 02 '10 at 04:48
-
so basically you need the *devel libs of the application in question if it's a dependency of another application, because you need to expose the interface? – ohhh Jul 31 '18 at 09:54
-
@ohhh: no. You only need those packages if you *compile* something that needs that library. If one package *uses* that library then you don't need the `-devel` package. In other words: most normal users will never need the `-devel` package, but developers might. – Joachim Sauer Jul 26 '21 at 08:53
They usually contain necessary headers and libraries. For example, python-devel will provide the Python headers and libraries that you need if you want to embed the Python interpreter in your own application. Some additional tools and documentation are included, too (e.g. a developer manual or code examples).

- 68,631
- 21
- 159
- 205
-
Are tools such as pyinstaller an example of using this? Because AFAIK freezers embed a Python interpreter in the bundle they create as well which is just what you have said here. – aderchox Aug 07 '20 at 19:32