pkgconf 无法找到 pc 文件,即使它存在于搜索路径中

问题描述 投票:0回答:1

我在

my.pc
中有这个
/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 报告它在

/usr/lib/pkgconfig
中查找:(
pkg-config --variable pc_path pkg-config
的结果)

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

但是当我运行时仍然出现此错误

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
include shared-libraries pkg-config compiler-options
1个回答
0
投票

pkg-config 会混淆地报告格式错误的 .pc 文件丢失的 .pc 文件。

就我而言,我输错了

Desctiption
而不是
Description
(将 t 替换为 r)。

© www.soinside.com 2019 - 2024. All rights reserved.