Ошибки при обработке: python3-apt, usb-creator, apport, python-apt - proUbuntu
1 голос
/

Я не продвинутый пользователь Ubuntu, и у меня действительно бихи.Я не продвинутый пользователь Ubuntu, и у меня действительно большая проблема.Когда я набираю: sudo apt-get update && sudo apt-get upgrade

, я получаю следующий вывод:

Hit:1 http://pl.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://pl.archive.ubuntu.com/ubuntu bionic-updates InRelease                  
Hit:3 http://pl.archive.ubuntu.com/ubuntu bionic-backports InRelease                
Hit:4 http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu bionic InRelease         
Ign:5 http://download.opensuse.org/repositories/home:/manuelschneid3r/xUbuntu_18.04  InRelease
Hit:6 http://download.opensuse.org/repositories/home:/manuelschneid3r/xUbuntu_18.04  Release
Hit:7 http://ppa.launchpad.net/team-xbmc/ppa/ubuntu bionic InRelease                
Hit:8 https://dl.winehq.org/wine-builds/ubuntu bionic InRelease                     
Hit:9 http://security.ubuntu.com/ubuntu bionic-security InRelease                   
Hit:11 https://packagecloud.io/slacktechnologies/slack/debian jessie InRelease      
Reading package lists... Done                                  
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  linux-generic-hwe-18.04 linux-headers-generic-hwe-18.04
  linux-image-generic-hwe-18.04
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
6 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up python3-apt (1.6.4) ...
/bin/sh: 1: /usr/bin/python3.6: Permission denied
Traceback (most recent call last):
  File "/usr/bin/py3compile", line 290, in <module>
    main()
  File "/usr/bin/py3compile", line 270, in main
    options.force, options.optimize, e_patterns)
  File "/usr/bin/py3compile", line 156, in compile
    cfn = interpreter.cache_file(fn, version)
  File "/usr/share/python3/debpython/interpreter.py", line 212, in cache_file
    (fname[:-3], self.magic_tag(version), last_char))
  File "/usr/share/python3/debpython/interpreter.py", line 246, in magic_tag
    return self._execute('import imp; print(imp.get_tag())', version)
  File "/usr/share/python3/debpython/interpreter.py", line 359, in _execute
    raise Exception('{} failed with status code {}'.format(command, output['returncode']))
Exception: python3.6 -c 'import imp; print(imp.get_tag())' failed with status code 126
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
    from apport.report import Report
  File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
    import apport.fileutils
  File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
    from apport.packaging_impl import impl as packaging
  File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in <module>
    import apt
  File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
    import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/py3compile", line 290, in <module>
    main()
  File "/usr/bin/py3compile", line 270, in main
    options.force, options.optimize, e_patterns)
  File "/usr/bin/py3compile", line 156, in compile
    cfn = interpreter.cache_file(fn, version)
  File "/usr/share/python3/debpython/interpreter.py", line 212, in cache_file
    (fname[:-3], self.magic_tag(version), last_char))
  File "/usr/share/python3/debpython/interpreter.py", line 246, in magic_tag
    return self._execute('import imp; print(imp.get_tag())', version)
  File "/usr/share/python3/debpython/interpreter.py", line 359, in _execute
    raise Exception('{} failed with status code {}'.format(command, output['returncode']))
Exception: python3.6 -c 'import imp; print(imp.get_tag())' failed with status code 126
dpkg: error processing package python3-apt (--configure):
 installed python3-apt package post-installation script subprocess returned error exit status 1
Setting up usb-creator-common (0.3.5ubuntu18.04.2) ...
/bin/sh: 1: /usr/bin/python3.6: Permission denied
Traceback (most recent call last):
  File "/usr/bin/py3compile", line 290, in <module>
    main()
  File "/usr/bin/py3compile", line 270, in main
    options.force, options.optimize, e_patterns)
  File "/usr/bin/py3compile", line 156, in compile
    cfn = interpreter.cache_file(fn, version)
  File "/usr/share/python3/debpython/interpreter.py", line 212, in cache_file
    (fname[:-3], self.magic_tag(version), last_char))
  File "/usr/share/python3/debpython/interpreter.py", line 246, in magic_tag
    return self._execute('import imp; print(imp.get_tag())', version)
  File "/usr/share/python3/debpython/interpreter.py", line 359, in _execute
    raise Exception('{} failed with status code {}'.format(command, output['returncode']))
Exception: python3.6 -c 'import imp; print(imp.get_tag())' failed with status code 126
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
    from apport.report import Report
  File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
    import apport.fileutils
  File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
    from apport.packaging_impl import impl as packaging
  File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in <module>
    import apt
  File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
    import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/py3compile", line 290, in <module>
    main()
  File "/usr/bin/py3compile", line 270, in main
    options.force, options.optimize, e_patterns)
  File "/usr/bin/py3compile", line 156, in compile
    cfn = interpreter.cache_file(fn, version)
  File "/usr/share/python3/debpython/interpreter.py", line 212, in cache_file
    (fname[:-3], self.magic_tag(version), last_char))
  File "/usr/share/python3/debpython/interpreter.py", line 246, in magic_tag
    return self._execute('import imp; print(imp.get_tag())', version)
  File "/usr/share/python3/debpython/interpreter.py", line 359, in _execute
    raise Exception('{} failed with status code {}'.format(command, output['returncode']))
Exception: python3.6 -c 'import imp; print(imp.get_tag())' failed with status code 126
dpkg: error processing package usb-creator-common (--configure):
 installed usb-creator-common package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of usb-creator-gtk:
 usb-creator-gtk depends on usb-creator-common (= 0.3.5ubuntu18.04.2); however:
  Package usb-creator-common is not configured yet.

dpkg: error processing package usb-creator-gtk (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                     dpkg: dependency problems prevent configuration of python3-apport:
 python3-apport depends on python3-apt (>= 0.7.9); however:
  Package python3-apt is not configured yet.

dpkg: error processing package python3-apport (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of apport:
 apport depends on python3-apport (>= 2.20.9-0ubuntu7.7); however:
  Package python3-apport is not configured yet.

dpkg: error processing package apport (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              No apport report written because MaxReports is reached already
                                       Setting up python-apt (1.6.4) ...
/var/lib/dpkg/info/python-apt.postinst: 6: /var/lib/dpkg/info/python-apt.postinst: pycompile: Permission denied
dpkg: error processing package python-apt (--configure):
 installed python-apt package post-installation script subprocess returned error exit status 126
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 python3-apt
 usb-creator-common
 usb-creator-gtk
 python3-apport
 apport
 python-apt
E: Sub-process /usr/bin/dpkg returned an error code (1)
g issue.
When I type: `sudo apt-get update && sudo apt-get upgrade`

I get a following output:

Hit:1 http://pl.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://pl.archive.ubuntu.com/ubuntu bionic-updates InRelease                  
Hit:3 http://pl.archive.ubuntu.com/ubuntu bionic-backports InRelease                
Hit:4 http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu bionic InRelease         
Ign:5 http://download.opensuse.org/repositories/home:/manuelschneid3r/xUbuntu_18.04  InRelease
Hit:6 http://download.opensuse.org/repositories/home:/manuelschneid3r/xUbuntu_18.04  Release
Hit:7 http://ppa.launchpad.net/team-xbmc/ppa/ubuntu bionic InRelease                
Hit:8 https://dl.winehq.org/wine-builds/ubuntu bionic InRelease                     
Hit:9 http://security.ubuntu.com/ubuntu bionic-security InRelease                   
Hit:11 https://packagecloud.io/slacktechnologies/slack/debian jessie InRelease      
Reading package lists... Done                                  
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  linux-generic-hwe-18.04 linux-headers-generic-hwe-18.04
  linux-image-generic-hwe-18.04
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
6 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up python3-apt (1.6.4) ...
/bin/sh: 1: /usr/bin/python3.6: Permission denied
Traceback (most recent call last):
  File "/usr/bin/py3compile", line 290, in <module>
    main()
  File "/usr/bin/py3compile", line 270, in main
    options.force, options.optimize, e_patterns)
  File "/usr/bin/py3compile", line 156, in compile
    cfn = interpreter.cache_file(fn, version)
  File "/usr/share/python3/debpython/interpreter.py", line 212, in cache_file
    (fname[:-3], self.magic_tag(version), last_char))
  File "/usr/share/python3/debpython/interpreter.py", line 246, in magic_tag
    return self._execute('import imp; print(imp.get_tag())', version)
  File "/usr/share/python3/debpython/interpreter.py", line 359, in _execute
    raise Exception('{} failed with status code {}'.format(command, output['returncode']))
Exception: python3.6 -c 'import imp; print(imp.get_tag())' failed with status code 126
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
    from apport.report import Report
  File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
    import apport.fileutils
  File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
    from apport.packaging_impl import impl as packaging
  File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in <module>
    import apt
  File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
    import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/py3compile", line 290, in <module>
    main()
  File "/usr/bin/py3compile", line 270, in main
    options.force, options.optimize, e_patterns)
  File "/usr/bin/py3compile", line 156, in compile
    cfn = interpreter.cache_file(fn, version)
  File "/usr/share/python3/debpython/interpreter.py", line 212, in cache_file
    (fname[:-3], self.magic_tag(version), last_char))
  File "/usr/share/python3/debpython/interpreter.py", line 246, in magic_tag
    return self._execute('import imp; print(imp.get_tag())', version)
  File "/usr/share/python3/debpython/interpreter.py", line 359, in _execute
    raise Exception('{} failed with status code {}'.format(command, output['returncode']))
Exception: python3.6 -c 'import imp; print(imp.get_tag())' failed with status code 126
dpkg: error processing package python3-apt (--configure):
 installed python3-apt package post-installation script subprocess returned error exit status 1
Setting up usb-creator-common (0.3.5ubuntu18.04.2) ...
/bin/sh: 1: /usr/bin/python3.6: Permission denied
Traceback (most recent call last):
  File "/usr/bin/py3compile", line 290, in <module>
    main()
  File "/usr/bin/py3compile", line 270, in main
    options.force, options.optimize, e_patterns)
  File "/usr/bin/py3compile", line 156, in compile
    cfn = interpreter.cache_file(fn, version)
  File "/usr/share/python3/debpython/interpreter.py", line 212, in cache_file
    (fname[:-3], self.magic_tag(version), last_char))
  File "/usr/share/python3/debpython/interpreter.py", line 246, in magic_tag
    return self._execute('import imp; print(imp.get_tag())', version)
  File "/usr/share/python3/debpython/interpreter.py", line 359, in _execute
    raise Exception('{} failed with status code {}'.format(command, output['returncode']))
Exception: python3.6 -c 'import imp; print(imp.get_tag())' failed with status code 126
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
    from apport.report import Report
  File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
    import apport.fileutils
  File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
    from apport.packaging_impl import impl as packaging
  File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in <module>
    import apt
  File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
    import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/py3compile", line 290, in <module>
    main()
  File "/usr/bin/py3compile", line 270, in main
    options.force, options.optimize, e_patterns)
  File "/usr/bin/py3compile", line 156, in compile
    cfn = interpreter.cache_file(fn, version)
  File "/usr/share/python3/debpython/interpreter.py", line 212, in cache_file
    (fname[:-3], self.magic_tag(version), last_char))
  File "/usr/share/python3/debpython/interpreter.py", line 246, in magic_tag
    return self._execute('import imp; print(imp.get_tag())', version)
  File "/usr/share/python3/debpython/interpreter.py", line 359, in _execute
    raise Exception('{} failed with status code {}'.format(command, output['returncode']))
Exception: python3.6 -c 'import imp; print(imp.get_tag())' failed with status code 126
dpkg: error processing package usb-creator-common (--configure):
 installed usb-creator-common package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of usb-creator-gtk:
 usb-creator-gtk depends on usb-creator-common (= 0.3.5ubuntu18.04.2); however:
  Package usb-creator-common is not configured yet.

dpkg: error processing package usb-creator-gtk (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                     dpkg: dependency problems prevent configuration of python3-apport:
 python3-apport depends on python3-apt (>= 0.7.9); however:
  Package python3-apt is not configured yet.

dpkg: error processing package python3-apport (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of apport:
 apport depends on python3-apport (>= 2.20.9-0ubuntu7.7); however:
  Package python3-apport is not configured yet.

dpkg: error processing package apport (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              No apport report written because MaxReports is reached already
                                       Setting up python-apt (1.6.4) ...
/var/lib/dpkg/info/python-apt.postinst: 6: /var/lib/dpkg/info/python-apt.postinst: pycompile: Permission denied
dpkg: error processing package python-apt (--configure):
 installed python-apt package post-installation script subprocess returned error exit status 126
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 python3-apt
 usb-creator-common
 usb-creator-gtk
 python3-apport
 apport
 python-apt
E: Sub-process /usr/bin/dpkg returned an error code (1)

Я пробовал много разных решений с этого сайта, но у меня ничего не получалось.Что-то пошло не так, когда я попытался обновить Python с 3,6 до 3,7.Извините, если я говорю о теме, которая уже существовала, но я не могу найти решение, которое бы работало со всеми этими ошибками.Я могу добавить любой фрагмент, который вы хотите, но, как я уже сказал, я не очень продвинутый пользователь.

Ответы [ 2 ]

0 голосов
/

@ nobody

Ввод:

sudo dpkg -i python3-apt_1.6.0_amd64.deb python-apt_1.6.0_amd64.deb

Ввод:

dpkg: warning: downgrading python3-apt from 1.6.4 to 1.6.0
(Reading database ... 182414 files and directories currently installed.)
Preparing to unpack python3-apt_1.6.0_amd64.deb ...
Unpacking python3-apt (1.6.0) over (1.6.4) ...
Preparing to unpack python-apt_1.6.0_amd64.deb ...
/var/lib/dpkg/info/python-apt.prerm: 6: /var/lib/dpkg/info/python-apt.prerm: pyclean: Permission denied
dpkg: error processing archive python-apt_1.6.0_amd64.deb (--install):
 installed python-apt package pre-removal script subprocess returned error exit status 126
/var/lib/dpkg/info/python-apt.postinst: 6: /var/lib/dpkg/info/python-apt.postinst: pycompile: Permission denied
dpkg: error while cleaning up:
 installed python-apt package post-installation script subprocess returned error exit status 126
Setting up python3-apt (1.6.0) ...
/bin/sh: 1: /usr/bin/python3.6: Permission denied
Traceback (most recent call last):
  File "/usr/bin/py3compile", line 290, in <module>
    main()
  File "/usr/bin/py3compile", line 270, in main
    options.force, options.optimize, e_patterns)
  File "/usr/bin/py3compile", line 156, in compile
    cfn = interpreter.cache_file(fn, version)
  File "/usr/share/python3/debpython/interpreter.py", line 212, in cache_file
    (fname[:-3], self.magic_tag(version), last_char))
  File "/usr/share/python3/debpython/interpreter.py", line 246, in magic_tag
    return self._execute('import imp; print(imp.get_tag())', version)
  File "/usr/share/python3/debpython/interpreter.py", line 359, in _execute
    raise Exception('{} failed with status code {}'.format(command, output['returncode']))
Exception: python3.6 -c 'import imp; print(imp.get_tag())' failed with status code 126
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
    from apport.report import Report
  File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
    import apport.fileutils
  File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
    from apport.packaging_impl import impl as packaging
  File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in <module>
    import apt
  File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
    import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/py3compile", line 290, in <module>
    main()
  File "/usr/bin/py3compile", line 270, in main
    options.force, options.optimize, e_patterns)
  File "/usr/bin/py3compile", line 156, in compile
    cfn = interpreter.cache_file(fn, version)
  File "/usr/share/python3/debpython/interpreter.py", line 212, in cache_file
    (fname[:-3], self.magic_tag(version), last_char))
  File "/usr/share/python3/debpython/interpreter.py", line 246, in magic_tag
    return self._execute('import imp; print(imp.get_tag())', version)
  File "/usr/share/python3/debpython/interpreter.py", line 359, in _execute
    raise Exception('{} failed with status code {}'.format(command, output['returncode']))
Exception: python3.6 -c 'import imp; print(imp.get_tag())' failed with status code 126
dpkg: error processing package python3-apt (--install):
 installed python3-apt package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 python-apt_1.6.0_amd64.deb
 python3-apt

Я надеюсь, что переустановка системы не единственный способ исправить это

0 голосов
/

Внутренняя ошибка звучит не очень хорошо.

wget -c http://mirrors.kernel.org/ubuntu/pool/main/p/python-apt/python3-apt_1.6.0_amd64.deb

и

wget -c http://mirrors.kernel.org/ubuntu/pool/main/p/python-apt/python-apt_1.6.0_amd64.deb

Установите 2 пакета с sudo dpkg -i python3-apt_1.6.0_amd64.deb python-apt_1.6.0_amd64.deb

Если эта работа sudo dpkg --configure -a && sudo apt -f install

Затем обновите вашу систему

sudo apt full-upgrade
...