【发布时间】:2021-09-20 10:51:21
【问题描述】:
我想编译依赖于libmaus2 库的biobambam2 包。两者都是一个目录中的单独文件夹。我编译了 libmaus2 并且 libmaus2.pc 文件在它的基本目录中。现在,如果我尝试使用此命令编译 biobambam2:
- autoreconf -i -f
- ./configure --with-libmaus2=/SOFT/libmaus2-2.0.794-release-20210706224245 \
--prefix=/SOFT/biobambam2-2.0.182-release-20210412001032
- make install
我收到以下错误:
...
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.
如果我尝试像这样手动设置 PKG_CONFIG_PATH 变量:
autoreconf -i -f && \
export PKG_CONFIG_PATH="/SOFT/libmaus2-2.0.794-release-20210706224245/:$PKG_CONFIG_PATH" && \
./configure --prefix=/SOFT/biobambam2-2.0.182-release-20210412001032/ && \
make install
错误如下所示:
...
checking for libmaus2... yes
checking whether we can compile a program using libmaus2... no
configure: error: Required libmaus2 is not available.
谁能告诉我如何解决这个问题?我已经坚持了好几个小时了。
【问题讨论】:
-
示例:1。
./configure PKG_CONFIG_PATH=.....--prefix 和其他选项。 ......... ...... 2。export PKG_CONFIG_LIBDIR=[path-to-directory-with-libmaus2.pc] -
这不起作用
-
我正在尝试以 Ubuntu 18.04 映像为基础配置 Docker。
-
我手动编辑了 libmaus2.pc 文件,它似乎工作正常。非常感谢。我现在正在重新编译,如果您想发布问题的解决方案,我会尽快回复您。
-
您的设置异常。默认构建目录是
/home/name/tmp/,如果将 libmaus2 配置为--prefix=/usr/ --libdir=/usr/lib/x86_64-linux-gnu,则构建 biobambam2 完全没有问题。
标签: c++ linux makefile configure