RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 866508 - Fail to import libvirt python module due to 'undefined symbol: libssh2_agent_free'
Summary: Fail to import libvirt python module due to 'undefined symbol: libssh2_agent_...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.5
Hardware: x86_64
OS: Linux
urgent
high
Target Milestone: rc
: ---
Assignee: Peter Krempa
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 866741 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-15 14:19 UTC by Alex Jia
Modified: 2013-02-21 07:10 UTC (History)
6 users (show)

Fixed In Version: libvirt-0.10.2-4.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-21 07:10:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0276 0 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2013-02-20 21:18:26 UTC

Description Alex Jia 2012-10-15 14:19:52 UTC
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
libvirt-python-0.10.2-3.el6.x86_64

How reproducible:
always

Steps to Reproduce:
# python
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
  
Actual results:

>>> 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>
    raise lib_e
ImportError: /usr/lib64/libvirt.so.0: undefined symbol: libssh2_agent_free


Expected results:
Can successfully import libvirt python module.

Additional info:

Comment 3 Peter Krempa 2012-10-16 00:03:23 UTC
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.

Comment 4 Alex Jia 2012-10-16 01:23:04 UTC
(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.

Hi Peter,
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*.

Regards,
Alex

Comment 5 Alex Jia 2012-10-16 02:12:09 UTC
Maybe, the commit 1e25c54 results in this question.

Comment 6 Huang Wenlong 2012-10-16 04:19:45 UTC
*** Bug 866741 has been marked as a duplicate of this bug. ***

Comment 7 Peter Krempa 2012-10-16 07:17:30 UTC
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.

Comment 8 Peter Krempa 2012-10-16 21:02:57 UTC
Fixed upstream with:

commit cb4f41b8d0a2dc4258f1b097dff2ca2b34fbd086
Author: Peter Krempa <pkrempa>
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.

Comment 10 Huang Wenlong 2012-10-17 03:58:09 UTC
Verify this bug : 
libvirt-0.10.2-4.el6.x86_64

check in the spec file 
...
%if %{with_libssh2_transport}
Requires: libssh2 >= 1.3.0
%endif
...

#rpm -q libvirt-client --requires|grep libssh2
libssh2 >= 1.3.0
libssh2.so.1()(64bit)

Comment 11 errata-xmlrpc 2013-02-21 07:10:03 UTC
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.

http://rhn.redhat.com/errata/RHSA-2013-0276.html


Note You need to log in before you can comment on or make changes to this bug.