Fedora Linux Support Community & Resources Center
  #1  
Old 12th July 2017, 10:26 PM
naclosagc Offline
Registered User
 
Join Date: Jul 2017
Location: St. Louis, MO
Posts: 3
windows_7firefox
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.
Reply With Quote
  #2  
Old 17th July 2017, 04:13 PM
naclosagc Offline
Registered User
 
Join Date: Jul 2017
Location: St. Louis, MO
Posts: 3
windows_7firefox
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 View Post
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.
Reply With Quote
  #3  
Old 7th August 2017, 01:04 PM
Chulungs Offline
Registered User
 
Join Date: Jul 2017
Location: Brazil
Posts: 2
linuxfedorafirefox
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.
Reply With Quote
  #4  
Old 8th August 2017, 10:20 PM
naclosagc Offline
Registered User
 
Join Date: Jul 2017
Location: St. Louis, MO
Posts: 3
windows_7firefox
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.
Reply With Quote
  #5  
Old 9th August 2017, 02:48 PM
Chulungs Offline
Registered User
 
Join Date: Jul 2017
Location: Brazil
Posts: 2
linuxfedorafirefox
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:~ #
Reply With Quote
  #6  
Old 31st August 2017, 01:02 AM
seanzieapples Offline
Registered User
 
Join Date: Aug 2017
Location: Texas
Posts: 1
linuxfedorachrome
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.
Reply With Quote
Reply

Tags
dnf , f26 , failure , python , upgrade

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


Current GMT-time: 10:54 (Thursday, 19-10-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat