Pkg-config文件位于pkg-config路径上,但configure脚本无法找到

时间:2014-09-18 08:15:15

标签: c dynamic-linking pkg-config libssh2 libvirt

我正在尝试从源代码安装libvirt。我尝试安装的版本是1.2.7。我想启用libssh2。以下是我调用configure脚本的方法:

./configure --prefix=/home/administrator/dev/workspaces/libvirt/built/libvirt-1.2.7/  --with-sasl --with-qemu --with-lxc --with-gnutls --with-remote --with-ssh2 --with-polkit

我收到以下错误:

  

configure:错误:您必须安装libssh2> = 1.3 pkg-config模块才能编译libvirt

我下载了libssh2 lib 1.4.3版并使用默认选项安装它:

$ ./configure
$ make
$ sudo make install

以下是一些有用的信息:

$ sudo ldconfig
$ sudo updatedb
$ locate libssh2.so
/usr/local/lib/libssh2.so
/usr/local/lib/libssh2.so.1
/usr/local/lib/libssh2.so.1.0.1
$ locate libssh2.pc
/usr/local/lib/pkgconfig/libssh2.pc
$ pkg-config --variable pc_path pkg-config
/usr/local/lib/x86_64-linux-gnu/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig

显然libssh2.pc文件位于pkg-config路径上。但是,当我尝试执行libvirt的配置脚本时,发生了同样的错误。我有什么想法我做错了吗?谢谢。

编辑:config.log文件的片段:

 34475 configure:59141: checking for SSH2
 34476 configure:59148: $PKG_CONFIG --exists --print-errors "libssh2 >= 1.3"
 34477 configure:59151: $? = 0
 34478 configure:59165: $PKG_CONFIG --exists --print-errors "libssh2 >= 1.3"
 34479 configure:59168: $? = 0
 34480 configure:59182: result: no
 34481 Package libssl was not found in the pkg-config search path.
 34482 Perhaps you should add the directory containing `libssl.pc'
 34483 to the PKG_CONFIG_PATH environment variable
 34484 Package 'libssl', required by 'libssh2', not found
 34485 configure:59225: error: You must install the libssh2 >= 1.3 pkg-config module to compile libvirt
...
34576 ac_cv_env_PKG_CONFIG_LIBDIR_set=
34577 ac_cv_env_PKG_CONFIG_LIBDIR_value=
34578 ac_cv_env_PKG_CONFIG_PATH_set=
34579 ac_cv_env_PKG_CONFIG_PATH_value=
34580 ac_cv_env_PKG_CONFIG_set=
34581 ac_cv_env_PKG_CONFIG_value=
...
34874 ac_cv_path_ac_pt_PKG_CONFIG=/usr/bin/pkg-config
36432 PKG_CONFIG='/usr/bin/pkg-config'
36433 PKG_CONFIG_LIBDIR=''
36434 PKG_CONFIG_PATH=''

0 个答案:

没有答案