Red Hat Bugzilla – Bug 866508
Fail to import libvirt python module due to 'undefined symbol: libssh2_agent_free'
Last modified: 2013-02-21 02:10:03 EST
Description of problem:
Fail to import libvirt python module due to 'undefined symbol: libssh2_agent_free'.
Version-Release number of selected component (if applicable):
# rpm -q libvirt-python
Steps to Reproduce:
Python 2.6.6 (r266:84292, May 1 2012, 13:52:17)
[GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import libvirt
>>> import libvirt
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python2.6/site-packages/libvirt.py", line 25, in <module>
ImportError: /usr/lib64/libvirt.so.0: undefined symbol: libssh2_agent_free
Can successfully import libvirt python module.
What version of libssh2 do you have installed?
This issue is reproducible if you upgrade only libvirt and not the whole system. On a up-to-date system libvirt works fine with libssh2. The minimum required version of libssh2 is 1.3.
I will investigate if the spec file is correct or if it requires tweaking.
(In reply to comment #3)
> What version of libssh2 do you have installed?
> This issue is reproducible if you upgrade only libvirt and not the whole
> system. On a up-to-date system libvirt works fine with libssh2. The minimum
> required version of libssh2 is 1.3.
> I will investigate if the spec file is correct or if it requires tweaking.
I think you're right, my libssh2 is 1.2.2-7.el6_1.1, it should be the spec file misses package dependency on libssh2-1.3*.
Maybe, the commit 1e25c54 results in this question.
*** Bug 866741 has been marked as a duplicate of this bug. ***
libssh2 isn't exporting versioning symbols, so RPM isn't able to automatically gather the version of libssh2 that is required when built with libssh2 transport.
I'll post a spec file change to add this requirement manually.
Until then the workaround to make libvirt working is to upgrade libssh2 manually.
Fixed upstream with:
Author: Peter Krempa <firstname.lastname@example.org>
Date: Tue Oct 16 14:34:35 2012 +0200
spec: Add runtime requirement for libssh2
libssh2 unfortunately doesn't support symbol versioning so RPM can't
figure out what version is needed for the currently installed libvirt
package. This patch adds a runtime requirement, so that the correct
version of libssh2 can be installed along with libvirt.
Verify this bug :
check in the spec file
Requires: libssh2 >= 1.3.0
#rpm -q libvirt-client --requires|grep libssh2
libssh2 >= 1.3.0
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.