【问题标题】:Package was not found in the pkg-config search path在 pkg-config 搜索路径中找不到包
【发布时间】:2021-07-10 06:43:21
【问题描述】:

我正在尝试在 ubuntu 18.04 上安装 this 软件包。安装说明说安装命令应如下所示:

- autoreconf -i -f
- ./configure --with-libmaus2=${LIBMAUSPREFIX} \
    --prefix=${HOME}/biobambam2
- make install

第一行似乎没有任何错误。当我尝试像这样运行第二行时:

./configure --with-libmaus2=/SOFT/libmaus2-2.0.794-release-20210706224245/ --prefix=/SOFT/biobambam2-2.0.182-release-20210412001032/

我收到以下错误:

configure: error: Package requirements (libmaus2 >= 2.0.774) were not met:

Package libmaus2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libmaus2.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libmaus2', required by 'world', not 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 libmaus2_CFLAGS
and libmaus2_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

我知道./configure 看不到我提供的库目录,但我不知道如何修复它。

【问题讨论】:

    标签: c++ makefile configure


    【解决方案1】:

    您需要正确安装libmaus2并正确设置PKG_CONFIG_PATH:

    1. 以这种方式配置和编译 libmaus2:./configure --prefix=/SOFT/libmaus2 && make -j8 install
    2. export PKG_CONFIG_PATH=/SOFT/libmaus2/lib/pkgconfig
    3. ./configure --prefix=/SOFT/biobambam2 && make -j8 install

    【讨论】:

    • 谢谢,它成功了。除了目录应该只是/SOFT/libmaus2-2.0.794-release-20210706224245。那里没有 lib 文件夹,但 libmaus2.pc 文件是。
    • 第二次认为它不起作用。它似乎正在编译,但由于某种原因,我无法重现它。现在我收到此错误:checking for libmaus2... yes checking whether we can compile a program using libmaus2... no configure: error: Required libmaus2 is not available.
    • 尝试在gitlab.com/german.tischler/biobambam2/-/blob/master/… 中将 LIBS 替换为 LDFAGS。在启动 configure 之前重新启动 autoconf -vif
    • 更准确地说:LDFLAGS="${LDFLAGS} ${libmaus2_LIBS}"
    • 同样的错误。我正在使用 autoreconf,因为 autoconf -vif 退出时出现无效选项消息。
    猜你喜欢
    • 2016-11-07
    • 2013-02-25
    • 1970-01-01
    • 1970-01-01
    • 2014-10-27
    • 2022-01-25
    • 1970-01-01
    • 1970-01-01
    • 2016-08-03
    相关资源
    最近更新 更多