How to install runtime package corresponding to a development package

Using for build an application libjpeg-dev package that is installed using

apt install libjpeg-dev

This command depending on ubuntu release install libjpeg8, or libjpeg62, or another one.

I was looking for a way to install the corresponding runtime package. I made some tries with apt rdepends but it does not seems to give a solution.
Is there a way to query recursively dependencies of libjpeg-dev filtering with regexp like ^libjpeg[0-9]+$ ?


You have to ask APT to help you. Use special apt-cache showsrc command.

Below is the output from Ubuntu 18.04 LTS:

$ apt-cache showsrc libjpeg-dev
Package: libjpeg8-empty
Format: 1.0
Binary: libjpeg8, libjpeg8-dev, libjpeg8-dbg, libjpeg-progs, libjpeg-dev
Architecture: any
Version: 8c-2ubuntu8
Priority: optional
Section: graphics
Maintainer: Ubuntu Developers 
Standards-Version: 3.9.2
Build-Depends: debhelper
Directory: pool/main/libj/libjpeg8-empty
Package-List:
 libjpeg-dev deb libdevel optional
 libjpeg-progs deb graphics optional
 libjpeg8 deb libs optional
 libjpeg8-dbg deb debug extra
 libjpeg8-dev deb libdevel optional
Files:
 31a463aaa1f1eebbc86513bc40961297 1637 libjpeg8-empty_8c-2ubuntu8.dsc
 49661f8f11881b68f968014fa4646c37 1770 libjpeg8-empty_8c-2ubuntu8.tar.gz
Checksums-Sha1:
 90149344926868c76eec41f433399072985f77af 1637 libjpeg8-empty_8c-2ubuntu8.dsc
 d243fbec03a1249aeebc6f7de58a522591e6013c 1770 libjpeg8-empty_8c-2ubuntu8.tar.gz
Checksums-Sha256:
 e7f575dcb3e0d462513b6f928179baa0ff1d145273934b1041b714515096b407 1637 libjpeg8-empty_8c-2ubuntu8.dsc
 48a4227e9fc70851a4f304b10624e02875bf6f4e2debfcbe4ba0dd85a3ec05c6 1770 libjpeg8-empty_8c-2ubuntu8.tar.gz

Details in man apt-cache locally or online.