Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/c/71.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C Pkg配置文件位于Pkg配置路径上,但无法通过配置脚本找到_C_Dynamic Linking_Pkg Config_Libssh2_Libvirt - Fatal编程技术网

C Pkg配置文件位于Pkg配置路径上,但无法通过配置脚本找到

C Pkg配置文件位于Pkg配置路径上,但无法通过配置脚本找到,c,dynamic-linking,pkg-config,libssh2,libvirt,C,Dynamic Linking,Pkg Config,Libssh2,Libvirt,我正在尝试从源代码安装libvirt。我尝试安装的版本是1.2.7。我希望启用libssh2。以下是我如何调用配置脚本: ./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 我得到了以下错误: 配置:

我正在尝试从源代码安装libvirt。我尝试安装的版本是1.2.7。我希望启用libssh2。以下是我如何调用配置脚本:

./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
我得到了以下错误:

配置:错误:必须安装libssh2>=1.3 pkg配置模块才能编译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配置路径上。但是,当我尝试执行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=''

尝试找出它在config.log文件中的作用刚刚从日志文件中添加了与问题相关的片段是的,它抱怨依赖libssh2,它找不到libssl