“configure: error: Package requirements (blkid) were not met”

compilinglibrariespkg-config

I'm trying to build btrfs-progs from sources, but when I run ./configure I get the error:

checking for BLKID... no
configure: error: Package requirements (blkid) were not met:

No package 'blkid' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables BLKID_CFLAGS
and BLKID_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

blkid is installed in /sbin so, presumably, all its libraries are in the default locations.

What do I need to do tell pkg-config where blkid is or am I actually missing a package?

FYI: I'm running Debian 8 (sid/unstable) with a 4.1.0 kernel built from github.com/torvalds/linux.git sources about a week ago (commit:g6aaf0da).

Best Answer

If there are missing packages, you can use apt-cache:

% apt-cache search blkid
libblkid-dev - block device id library - headers and static libraries
libblkid1 - block device id library

or even:

% apt-cache search blkid | grep '\-dev'
libblkid-dev - block device id library - headers and static libraries

We know that we need the development libraries to compile something, therefore do a...

apt-get install libblkid-dev

...as root user.

Related Question