LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 03-30-2020, 01:26 PM   #1
sssser
LQ Newbie
 
Registered: Aug 2019
Posts: 1

Rep: Reputation: Disabled
Exclamation Commands 'update-manager' 'gdb' invoke python backend for some reason


This is a fresh linux machine, and I have set minimal setup configuration.. python environment for my use. Given the following error when I run

>>sudo apt-get update

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Fetched 14.3 MB in 22s (626 kB/s)

(appstreamcli:25806): GLib-CRITICAL **: g_strchug: assertion 'string != NULL' failed

(appstreamcli:25806): GLib-CRITICAL **: g_strchomp: assertion 'string != NULL' failed

(appstreamcli:25806): GLib-CRITICAL **: g_strchug: assertion 'string != NULL' failed

(appstreamcli:25806): GLib-CRITICAL **: g_strchomp: assertion 'string != NULL' failed
AppStream cache update completed, but some metadata was ignored due to errors.
(appstreamcli:25806): GLib-CRITICAL **: g_strchug: assertion 'string != NULL' failed
Reading package lists... Done

>>sudo apt-get install gdb

Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3.6-minimal amd64 3.6.9-1~18.04 [533 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic/main amd64 libreadline7 amd64 7.0-3 [124 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3.6-stdlib amd64 3.6.9-1~18.04 [1,709 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3.6 amd64 3.6.9-1~18.04 [1,414 kB]
Get:5 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gdb amd64 8.1-0ubuntu3.2 [2,938 kB]
Fetched 6,718 kB in 1s (5,683 kB/s)
Selecting previously unselected package libpython3.6-minimal:amd64.
(Reading database ... 230074 files and directories currently installed.)
Preparing to unpack .../libpython3.6-minimal_3.6.9-1~18.04_amd64.deb ...
Unpacking libpython3.6-minimal:amd64 (3.6.9-1~18.04) ...
Selecting previously unselected package libreadline7:amd64.
Preparing to unpack .../libreadline7_7.0-3_amd64.deb ...
Unpacking libreadline7:amd64 (7.0-3) ...
Selecting previously unselected package libpython3.6-stdlib:amd64.
Preparing to unpack .../libpython3.6-stdlib_3.6.9-1~18.04_amd64.deb ...
Unpacking libpython3.6-stdlib:amd64 (3.6.9-1~18.04) ...
Selecting previously unselected package libpython3.6:amd64.
Preparing to unpack .../libpython3.6_3.6.9-1~18.04_amd64.deb ...
Unpacking libpython3.6:amd64 (3.6.9-1~18.04) ...
Preparing to unpack .../gdb_8.1-0ubuntu3.2_amd64.deb ...
Unpacking gdb (8.1-0ubuntu3.2) over (7.11.1-0ubuntu1~16.5) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for menu (2.1.47ubuntu1.16.04.1) ...
Setting up libpython3.6-minimal:amd64 (3.6.9-1~18.04) ...
Setting up libreadline7:amd64 (7.0-3) ...
Setting up libpython3.6-stdlib:amd64 (3.6.9-1~18.04) ...
Setting up libpython3.6:amd64 (3.6.9-1~18.04) ...
Setting up gdb (8.1-0ubuntu3.2) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for menu (2.1.47ubuntu1.16.04.1) ...

But when I type
gbd -v

It goes to
Error processing line 1 of zzzz/.local/lib/python2.7/site-packages/google_auth-1.12.0-py3.8-nspkg.pth:

Failed to import the site module
Traceback (most recent call last):
File "/usr/lib/python3.6/site.py", line 174, in addpackage
exec(line)
File "<string>", line 1, in <module>
File "/usr/lib/python3.6/types.py", line 171, in <module>
import functools as _functools
File "/usr/lib/python3.6/functools.py", line 21, in <module>
from collections import namedtuple
File "/usr/lib/python3.6/collections/__init__.py", line 32, in <module>
from reprlib import recursive_repr as _recursive_repr
File "zzzz/.local/lib/python2.7/site-packages/reprlib/__init__.py", line 7, in <module>
raise ImportError('This package should not be accessible on Python 3. '
ImportError: This package should not be accessible on Python 3. Either you are trying to run from the python-future src folder or your installation of python-future is corrupted.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "zzzz/.local/lib/python2.7/site-packages/site.py", line 73, in <module>
__boot()
File "zzzz/.local/lib/python2.7/site-packages/site.py", line 47, in __boot
addsitedir(item)
File "/usr/lib/python3.6/site.py", line 213, in addsitedir
addpackage(sitedir, name, known_paths)
File "/usr/lib/python3.6/site.py", line 184, in addpackage
import traceback
File "/usr/lib/python3.6/traceback.py", line 3, in <module>
import collections
File "/usr/lib/python3.6/collections/__init__.py", line 32, in <module>
from reprlib import recursive_repr as _recursive_repr
File "zzzz/.local/lib/python2.7/site-packages/reprlib/__init__.py", line 7, in <module>
raise ImportError('This package should not be accessible on Python 3. '
ImportError: This package should not be accessible on Python 3. Either you are trying to run from the python-future src folder or your installation of python-future is corrupted.
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 53, in apport_excepthook
if not enabled():
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 24, in enabled
import re
File "/usr/lib/python3.6/re.py", line 125, in <module>
import functools
File "/usr/lib/python3.6/functools.py", line 21, in <module>
from collections import namedtuple
File "/usr/lib/python3.6/collections/__init__.py", line 32, in <module>
from reprlib import recursive_repr as _recursive_repr
File "zzzz/.local/lib/python2.7/site-packages/reprlib/__init__.py", line 7, in <module>
raise ImportError('This package should not be accessible on Python 3. '
ImportError: This package should not be accessible on Python 3. Either you are trying to run from the python-future src folder or your installation of python-future is corrupted.

Original exception was:
Traceback (most recent call last):
File "/usr/lib/python3.6/site.py", line 174, in addpackage
exec(line)
File "<string>", line 1, in <module>
File "/usr/lib/python3.6/types.py", line 171, in <module>
import functools as _functools
File "/usr/lib/python3.6/functools.py", line 21, in <module>
from collections import namedtuple
File "/usr/lib/python3.6/collections/__init__.py", line 32, in <module>
from reprlib import recursive_repr as _recursive_repr
File "zzzz/.local/lib/python2.7/site-packages/reprlib/__init__.py", line 7, in <module>
raise ImportError('This package should not be accessible on Python 3. '
ImportError: This package should not be accessible on Python 3. Either you are trying to run from the python-future src folder or your installation of python-future is corrupted.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "zzzz/.local/lib/python2.7/site-packages/site.py", line 73, in <module>
__boot()
File "zzzz/.local/lib/python2.7/site-packages/site.py", line 47, in __boot
addsitedir(item)
File "/usr/lib/python3.6/site.py", line 213, in addsitedir
addpackage(sitedir, name, known_paths)
File "/usr/lib/python3.6/site.py", line 184, in addpackage
import traceback
File "/usr/lib/python3.6/traceback.py", line 3, in <module>
import collections
File "/usr/lib/python3.6/collections/__init__.py", line 32, in <module>
from reprlib import recursive_repr as _recursive_repr
File "zzzz/.local/lib/python2.7/site-packages/reprlib/__init__.py", line 7, in <module>
raise ImportError('This package should not be accessible on Python 3. '
ImportError: This package should not be accessible on Python 3. Either you are trying to run from the python-future src folder or your installation of python-future is corrupted.


Not exactly the same, but similar error with this command..
>>update-manager

Error processing line 1 of zzzz/.local/lib/python3.5/site-packages/google_auth-1.11.2-py3.8-nspkg.pth:

Failed to import the site module
Traceback (most recent call last):
File "/usr/lib/python3.5/site.py", line 173, in addpackage
exec(line)
File "<string>", line 1, in <module>
File "/usr/lib/python3.5/types.py", line 166, in <module>
import functools as _functools
File "/usr/lib/python3.5/functools.py", line 21, in <module>
from collections import namedtuple
File "/usr/lib/python3.5/collections/__init__.py", line 32, in <module>
from reprlib import recursive_repr as _recursive_repr
File "zzzz/.local/lib/python2.7/site-packages/reprlib/__init__.py", line 7, in <module>
raise ImportError('This package should not be accessible on Python 3. '
ImportError: This package should not be accessible on Python 3. Either you are trying to run from the python-future src folder or your installation of python-future is corrupted.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "zzzz/.local/lib/python2.7/site-packages/site.py", line 73, in <module>
__boot()
File "zzzz/.local/lib/python2.7/site-packages/site.py", line 22, in __boot
loader.load_module('site')
File "/usr/lib/python3.5/site.py", line 580, in <module>
main()
File "/usr/lib/python3.5/site.py", line 566, in main
known_paths = addusersitepackages(known_paths)
File "/usr/lib/python3.5/site.py", line 290, in addusersitepackages
addsitedir(user_site, known_paths)
File "/usr/lib/python3.5/site.py", line 212, in addsitedir
addpackage(sitedir, name, known_paths)
File "/usr/lib/python3.5/site.py", line 183, in addpackage
import traceback
File "/usr/lib/python3.5/traceback.py", line 3, in <module>
import collections
File "/usr/lib/python3.5/collections/__init__.py", line 32, in <module>
from reprlib import recursive_repr as _recursive_repr
File "zzzz/.local/lib/python2.7/site-packages/reprlib/__init__.py", line 7, in <module>
raise ImportError('This package should not be accessible on Python 3. '
ImportError: This package should not be accessible on Python 3. Either you are trying to run from the python-future src folder or your installation of python-future is corrupted.

What's happening?? How do I fix this? Experts' help appreciated in advance
 
Old 04-01-2020, 01:35 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,630

Rep: Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265Reputation: 7265
it looks like gdb uses python backend and as far as I know the package management system partly written in python too.
So it is not really an error (but surprising).

From the other hand it looks like reprlib is a python2 package and somehow a python3 script tried to import it.
You need to follow the advice: Either you are trying to run from the python-future src folder or your installation of python-future is corrupted.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Brother HL-2240-R Stopped - Backend /usr/lib/cups/backend/usb does not exist! jet222jet Linux - Hardware 2 12-28-2020 06:32 PM
[SOLVED] BASH - Invoke commands when trap is activated worm5252 Programming 1 10-04-2011 04:54 PM
LXer: Python Python Python (aka Python 3) LXer Syndicated Linux News 0 08-05-2009 08:30 PM
Turn KnoppMyth backend/frontend into backend only nebbus Linux - General 0 09-09-2007 01:57 AM
Perl question: Anyway to invoke Linux commands... STAGED Programming 8 02-03-2006 12:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 02:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration