FedoraForum.org - Fedora Support Forums and Community
Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2017
    Location
    St. Louis, MO
    Posts
    3

    DNF Python failure after upgrade to F26

    After a seemingly successful upgrade of F25 to F26, I get the following error trying to run dnf:

    [root@osnode1 bin]# dnf
    Traceback (most recent call last):
    File "/usr/lib64/python3.6/site-packages/gpg/gpgme.py", line 14, in swig_import_helper
    return importlib.import_module(mname)
    File "/usr/lib64/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
    File "<frozen importlib._bootstrap>", line 978, in _gcd_import
    File "<frozen importlib._bootstrap>", line 961, in _find_and_load
    File "<frozen importlib._bootstrap>", line 950, in _find_and_load_unlocked
    File "<frozen importlib._bootstrap>", line 648, in _load_unlocked
    File "<frozen importlib._bootstrap>", line 560, in module_from_spec
    File "<frozen importlib._bootstrap_external>", line 922, in create_module
    File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed
    ImportError: /usr/lib64/python3.6/site-packages/gpg/_gpgme.cpython-36m-x86_64-linux-gnu.so: symbol gpgme_pubkey_algo_string, version GPGME_1.1 not defined in file libgpgme.so.11 with link time reference

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "/usr/bin/dnf", line 57, in <module>
    from dnf.cli import main
    File "/usr/lib/python3.6/site-packages/dnf/__init__.py", line 31, in <module>
    import dnf.base
    File "/usr/lib/python3.6/site-packages/dnf/base.py", line 29, in <module>
    from dnf.yum import history
    File "/usr/lib/python3.6/site-packages/dnf/yum/history.py", line 28, in <module>
    from . import misc as misc
    File "/usr/lib/python3.6/site-packages/dnf/yum/misc.py", line 30, in <module>
    import dnf.crypto
    File "/usr/lib/python3.6/site-packages/dnf/crypto.py", line 29, in <module>
    import gpg
    File "/usr/lib64/python3.6/site-packages/gpg/__init__.py", line 101, in <module>
    from . import core
    File "/usr/lib64/python3.6/site-packages/gpg/core.py", line 34, in <module>
    from . import gpgme
    File "/usr/lib64/python3.6/site-packages/gpg/gpgme.py", line 17, in <module>
    _gpgme = swig_import_helper()
    File "/usr/lib64/python3.6/site-packages/gpg/gpgme.py", line 16, in swig_import_helper
    return importlib.import_module('_gpgme')
    File "/usr/lib64/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
    ModuleNotFoundError: No module named '_gpgme'

    Any ideas? I did some google searching and forum searching, and I didn't find anything relevant. Thanks.

  2. #2
    Join Date
    Jul 2017
    Location
    St. Louis, MO
    Posts
    3

    Re: DNF Python failure after upgrade to F26

    Any ideas anyone? Or suggestions for a different venue to get help with this in? Thanks.

    Quote Originally Posted by naclosagc
    After a seemingly successful upgrade of F25 to F26, I get the following error trying to run dnf:

    [root@osnode1 bin]# dnf
    Traceback (most recent call last):
    File "/usr/lib64/python3.6/site-packages/gpg/gpgme.py", line 14, in swig_import_helper
    return importlib.import_module(mname)
    File "/usr/lib64/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
    File "<frozen importlib._bootstrap>", line 978, in _gcd_import
    File "<frozen importlib._bootstrap>", line 961, in _find_and_load
    File "<frozen importlib._bootstrap>", line 950, in _find_and_load_unlocked
    File "<frozen importlib._bootstrap>", line 648, in _load_unlocked
    File "<frozen importlib._bootstrap>", line 560, in module_from_spec
    File "<frozen importlib._bootstrap_external>", line 922, in create_module
    File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed
    ImportError: /usr/lib64/python3.6/site-packages/gpg/_gpgme.cpython-36m-x86_64-linux-gnu.so: symbol gpgme_pubkey_algo_string, version GPGME_1.1 not defined in file libgpgme.so.11 with link time reference

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "/usr/bin/dnf", line 57, in <module>
    from dnf.cli import main
    File "/usr/lib/python3.6/site-packages/dnf/__init__.py", line 31, in <module>
    import dnf.base
    File "/usr/lib/python3.6/site-packages/dnf/base.py", line 29, in <module>
    from dnf.yum import history
    File "/usr/lib/python3.6/site-packages/dnf/yum/history.py", line 28, in <module>
    from . import misc as misc
    File "/usr/lib/python3.6/site-packages/dnf/yum/misc.py", line 30, in <module>
    import dnf.crypto
    File "/usr/lib/python3.6/site-packages/dnf/crypto.py", line 29, in <module>
    import gpg
    File "/usr/lib64/python3.6/site-packages/gpg/__init__.py", line 101, in <module>
    from . import core
    File "/usr/lib64/python3.6/site-packages/gpg/core.py", line 34, in <module>
    from . import gpgme
    File "/usr/lib64/python3.6/site-packages/gpg/gpgme.py", line 17, in <module>
    _gpgme = swig_import_helper()
    File "/usr/lib64/python3.6/site-packages/gpg/gpgme.py", line 16, in swig_import_helper
    return importlib.import_module('_gpgme')
    File "/usr/lib64/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
    ModuleNotFoundError: No module named '_gpgme'

    Any ideas? I did some google searching and forum searching, and I didn't find anything relevant. Thanks.

  3. #3
    Join Date
    Jul 2017
    Location
    Brazil
    Posts
    2

    Re: DNF Python failure after upgrade to F26

    @naclosagc You solved this issue? I have a similar problem.

    I can use the yumex but not the DNF.

  4. #4
    Join Date
    Jul 2017
    Location
    St. Louis, MO
    Posts
    3

    Re: DNF Python failure after upgrade to F26

    I did figure it out. The error was about Python. I traced it back to a python library. The problem was, I had installed a version of the library in /usr/local, so DNF was not picking up the updated version.

  5. #5
    Join Date
    Jul 2017
    Location
    Brazil
    Posts
    2

    Re: DNF Python failure after upgrade to F26

    I dont get it.
    I dont have anything in /usr/local/lib or /usr/local/lib64

    In my case the problem return by DNF is:
    D0578:~ # dnf
    Traceback (most recent call last):
    File "/usr/bin/dnf", line 57, in <module>
    from dnf.cli import main
    File "/usr/lib/python3.6/site-packages/dnf/__init__.py", line 31, in <module>
    import dnf.base
    File "/usr/lib/python3.6/site-packages/dnf/base.py", line 37, in <module>
    import dnf.conf
    File "/usr/lib/python3.6/site-packages/dnf/conf/__init__.py", line 40, in <module>
    from dnf.conf.config import PRIO_DEFAULT, PRIO_MAINCONFIG, PRIO_AUTOMATICCONFIG
    File "/usr/lib/python3.6/site-packages/dnf/conf/config.py", line 26, in <module>
    from iniparse.compat import ParsingError, RawConfigParser as ConfigParser
    File "/usr/lib/python3.6/site-packages/iniparse/__init__.py", line 6, in <module>
    from .ini import INIConfig, change_comment_syntax
    File "/usr/lib/python3.6/site-packages/iniparse/ini.py", line 47, in <module>
    import six
    ImportError: bad magic number in 'six': b'\x03\xf3\r\n'
    D0578:~ #

  6. #6
    Join Date
    Aug 2017
    Location
    Texas
    Posts
    1

    Re: DNF Python failure after upgrade to F26

    20 days late, but I just had the same problem. I realized that the upgrade had gotten stopped midway through because I stupidly hit ctrl-alt-del while the system was updating. (Apparently the Nvidia video card drivers don't get loaded while the system performs the upgrade task and I have a completely blank screen. This led me to believe something was wrong so I hit rebooted to see if I hop into single user mode.)

    After rebooting my kernel version didn't change at all, and I noticed that a lot of fedora 25 rpms were still installed AND a bunch of fedora 26 rpms as well. Obviously I clobbered it somehow.

    After looking around at all the python versions installed and their respective modules I noticed that the system default python, 2.7.x, didn't have the dnf module installed. I also noticed that python 3.5 did have it installed.

    I solved the problem by pointing the dnf script to python3.5 (which did have the dnf module installed).

    First edit /usr/bin/dnf.

    I changed the shebang statement to:

    Code:
    #! /usr/bin/python3.5
    then, I re-ran:

    Code:
    sudo dnf system-upgrade reboot
    After the reboot I got a completely black screen again. This time I just walked away and prayed it would reboot and come back up after it finished doing what it was doing.

    After the reboot.. SUCCESS! Fedora 25 was fully upgraded to Fedora 26 and everything works.

Similar Threads

  1. Printer setup failure with python error
    By petrus1928 in forum Hardware & Laptops
    Replies: 8
    Last Post: 16th January 2015, 12:48 PM
  2. [SOLVED] Cannot yum upgrade due to a python module
    By UK2 in forum Installation, Upgrades and Live Media
    Replies: 13
    Last Post: 24th March 2012, 06:24 PM
  3. Python error when trying to upgrade F13 to 14
    By hvniekerk in forum Installation, Upgrades and Live Media
    Replies: 3
    Last Post: 28th November 2010, 02:24 PM
  4. Python on Fedora 10 - OK to upgrade?
    By KirkD in forum Using Fedora
    Replies: 4
    Last Post: 31st December 2009, 08:43 PM
  5. upgrade to python 2.5
    By JN4OldSchool in forum Using Fedora
    Replies: 6
    Last Post: 31st January 2007, 01:57 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •