Jim Morrison
Jim Morrison

Reputation: 469

pkgconf can't find a pc file even though it exists in the search path

I have this my.pc file in /usr/lib/pkgconfig:

prefix=/usr
exec_prefix=/usr
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: my
Desctiption: My awesome library
Version: 0.0.1

Libs: -L${libdir} -lmy
Cflags: -I${includedir}

pkgconf reports that it looks in /usr/lib/pkgconfig: (result of pkg-config --variable pc_path pkg-config)

/usr/lib/pkgconfig:/usr/share/pkgconfig

but I still get this error when I run pkgconf --libs my:

Package my was not found in the pkg-config search path.
Perhaps you should add the directory containing `my.pc'
to the PKG_CONFIG_PATH environment variable
Package 'my', required by 'virtual:world', not found

Upvotes: 0

Views: 156

Answers (1)

Jim Morrison
Jim Morrison

Reputation: 469

pkg-config confusingly reports a missing .pc file for malformed .pc files.

In my case, I mistyped Desctiption instead of Description (replace t with r).

Upvotes: 0

Related Questions