---
name: "deb-shlibs"
section: "5"
platform: "linux"
package: "dpkg"
version: "1.23.11-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/deb-shlibs"
---

# deb-shlibs(5)

Debian shared library information file

## NAME

deb-shlibs - Debian shared library information file

## SYNOPSIS

**debian/shlibs**, **debian/***binary-name***.shlibs**, **DEBIAN/shlibs**

## DESCRIPTION

**shlibs** files map shared library names and versions (*SONAMEs*) to dependencies suitable for a package control file.

A **shlibs** file must be shipped in the same binary package as the shared libraries described within. This is to guarantee that the mappings match the shared library being described, and so that the **shlibs** file can be found from the package owning the shared library.

There is one entry per line. Blank lines are **not** allowed. Lines beginning with a **#** character are considered commentary, and are ignored. All other lines must have the format:

\[*type***:**\] *library* *version* *dependencies*

The *library* and *version* fields are whitespace-delimited, but the *dependencies* field extends to the end of the line. The *type* field is optional and normally not needed.

The *dependencies* field has the same syntax as the **Depends** field in a binary control file, see [**deb-control**(5)](/deb-control/5.md).

## SONAME FORMATS

The SONAME formats supported are:

*name*.so.*version*

and

*name*-*version*.so

where *name* is usually prefixed by **lib**.

The former tends to be used by shared libraries with stable interfaces. The latter by shared libraries with unstable interfaces, where the whole version becomes part of the SONAME and needs to be specified in full when linking against those libraries.

## EXAMPLES

The **shlibs** file for a typical library package, named *libcrunch1*, that provides one library whose SONAME is *libcrunch.so.1*, might read

```
 libcrunch 1 libcrunch1 (>= 1.2-1)
```

The *dependencies* must mention the most recent version of the package that added new symbols to the library: in the above example, new symbols were added to version 1.2 of *libcrunch*. This is not the only reason the dependencies might need to be tightened.

## SEE ALSO

[**deb-control**(5)](/deb-control/5.md), [**deb-symbols**(5)](/deb-symbols/5.md), [**dpkg-shlibdeps**(1)](/dpkg-shlibdeps/1.md).
