Я не могу установить или удалить пакеты в 18.04

Когда я пытаюсь установить пакет, я получаю следующую ошибку:

mostafa@Elsystem:~$ sudo apt install dpkg
Reading package lists... Done
Building dependency tree       
Reading state information... Done
dpkg is already the newest version (1.19.0.5ubuntu2.3).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
25 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 (3.6.7-1~18.04) ...
running python rtupdate hooks for python3.6...
dpkg-query: package 'gdebi-core' is not installed
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
Traceback (most recent call last):
  File "/usr/bin/py3clean", line 210, in <module>
    main()
  File "/usr/bin/py3clean", line 196, in main
    pfiles = set(dpf.from_package(options.package))
  File "/usr/share/python3/debpython/files.py", line 53, in from_package
    raise Exception("cannot get content of %s" % package_name)
Exception: cannot get content of gdebi-core
error running python rtupdate hook gdebi-core
dpkg-query: package 'gdebi' is not installed
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
Traceback (most recent call last):
  File "/usr/bin/py3clean", line 210, in <module>
    main()
  File "/usr/bin/py3clean", line 196, in main
    pfiles = set(dpf.from_package(options.package))
  File "/usr/share/python3/debpython/files.py", line 53, in from_package
    raise Exception("cannot get content of %s" % package_name)
Exception: cannot get content of gdebi
error running python rtupdate hook gdebi
dpkg-query: package 'gedit' is not installed
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
Traceback (most recent call last):
  File "/usr/bin/py3clean", line 210, in <module>
    main()
  File "/usr/bin/py3clean", line 196, in main
    pfiles = set(dpf.from_package(options.package))
  File "/usr/share/python3/debpython/files.py", line 53, in from_package
    raise Exception("cannot get content of %s" % package_name)
Exception: cannot get content of gedit
error running python rtupdate hook gedit
dpkg-query: package 'hplip-data' is not installed
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
Traceback (most recent call last):
  File "/usr/bin/py3clean", line 210, in <module>
    main()
  File "/usr/bin/py3clean", line 196, in main
    pfiles = set(dpf.from_package(options.package))
  File "/usr/share/python3/debpython/files.py", line 53, in from_package
    raise Exception("cannot get content of %s" % package_name)
Exception: cannot get content of hplip-data
error running python rtupdate hook hplip-data
dpkg-query: package 'ibus-table' is not installed
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
Traceback (most recent call last):
  File "/usr/bin/py3clean", line 210, in <module>
    main()
  File "/usr/bin/py3clean", line 196, in main
    pfiles = set(dpf.from_package(options.package))
  File "/usr/share/python3/debpython/files.py", line 53, in from_package
    raise Exception("cannot get content of %s" % package_name)
Exception: cannot get content of ibus-table
error running python rtupdate hook ibus-table
dpkg-query: package 'ibus' is not installed
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
Traceback (most recent call last):
  File "/usr/bin/py3clean", line 210, in <module>
    main()
  File "/usr/bin/py3clean", line 196, in main
    pfiles = set(dpf.from_package(options.package))
  File "/usr/share/python3/debpython/files.py", line 53, in from_package
    raise Exception("cannot get content of %s" % package_name)
Exception: cannot get content of ibus
error running python rtupdate hook ibus
dpkg-query: package 'python3-uno' is not installed
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
Traceback (most recent call last):
  File "/usr/bin/py3clean", line 210, in <module>
    main()
  File "/usr/bin/py3clean", line 196, in main
    pfiles = set(dpf.from_package(options.package))
  File "/usr/share/python3/debpython/files.py", line 53, in from_package
    raise Exception("cannot get content of %s" % package_name)
Exception: cannot get content of python3-uno
error running python rtupdate hook python3-uno
dpkg-query: package 'rhythmbox-plugin-alternative-toolbar' is not installed
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
Traceback (most recent call last):
  File "/usr/bin/py3clean", line 210, in <module>
    main()
  File "/usr/bin/py3clean", line 196, in main
    pfiles = set(dpf.from_package(options.package))
  File "/usr/share/python3/debpython/files.py", line 53, in from_package
    raise Exception("cannot get content of %s" % package_name)
Exception: cannot get content of rhythmbox-plugin-alternative-toolbar
error running python rtupdate hook rhythmbox-plugin-alternative-toolbar
dpkg-query: package 'rhythmbox-plugins' is not installed
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
Traceback (most recent call last):
  File "/usr/bin/py3clean", line 210, in <module>
    main()
  File "/usr/bin/py3clean", line 196, in main
    pfiles = set(dpf.from_package(options.package))
  File "/usr/share/python3/debpython/files.py", line 53, in from_package
    raise Exception("cannot get content of %s" % package_name)
Exception: cannot get content of rhythmbox-plugins
error running python rtupdate hook rhythmbox-plugins
dpkg-query: package 'system-config-printer-common' is not installed
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
Traceback (most recent call last):
  File "/usr/bin/py3clean", line 210, in <module>
    main()
  File "/usr/bin/py3clean", line 196, in main
    pfiles = set(dpf.from_package(options.package))
  File "/usr/share/python3/debpython/files.py", line 53, in from_package
    raise Exception("cannot get content of %s" % package_name)
Exception: cannot get content of system-config-printer-common
error running python rtupdate hook system-config-printer-common
dpkg-query: package 'system-config-printer' is not installed
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
Traceback (most recent call last):
  File "/usr/bin/py3clean", line 210, in <module>
    main()
  File "/usr/bin/py3clean", line 196, in main
    pfiles = set(dpf.from_package(options.package))
  File "/usr/share/python3/debpython/files.py", line 53, in from_package
    raise Exception("cannot get content of %s" % package_name)
Exception: cannot get content of system-config-printer
error running python rtupdate hook system-config-printer
dpkg-query: package 'ubuntu-drivers-common' is not installed
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
Traceback (most recent call last):
  File "/usr/bin/py3clean", line 210, in <module>
    main()
  File "/usr/bin/py3clean", line 196, in main
    pfiles = set(dpf.from_package(options.package))
  File "/usr/share/python3/debpython/files.py", line 53, in from_package
    raise Exception("cannot get content of %s" % package_name)
Exception: cannot get content of ubuntu-drivers-common
error running python rtupdate hook ubuntu-drivers-common
dpkg: error processing package python3 (--configure):
 installed python3 package post-installation script subprocess returned error exit status 4
dpkg: dependency problems prevent configuration of tractor:
 tractor depends on python3; however:
  Package python3 is not configured yet.

dpkg: error processing package tractor (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-pyqt5:
 python3-pyqt5 depends on python3 (<< 3.7); however:
  Package python3 is not configured yet.
 python3-pyqt5 depends on python3 (>= 3.6~); however:
  Package python3 is not configured yet.
 python3-pyqt5 depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-pyqt5 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-idna:
 python3-idna depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-idna (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-six:
 python3-six depends on python3:any (>= 3.4~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-six (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-certifi:
 python3-certifi depends on python3:any (>= 3.4~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-certifi (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of persepolis:
 persepolis depends on python3 (>= 3.5); however:
  Package python3 is not configured yet.
 persepolis depends on python3-pyqt5 (>= 5.5); however:
  Package python3-pyqt5 is not configured yet.

dpkg: error processing package persepolis (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of youtube-dl:
 youtube-dl depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package youtube-dl (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-pkg-resources:
 python3-pkg-resources depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-pkg-resources (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-pyqt5.qtsvg:
 python3-pyqt5.qtsvg depends on python3-pyqt5 (= 5.10.1+dfsg-1ubuntu2); however:
  Package python3-pyqt5 is not configured yet.
 python3-pyqt5.qtsvg depends on python3 (<< 3.7); however:
  Package python3 is not configured yet.
 python3-pyqt5.qtsvg depends on python3 (>= 3.6~); however:
  Package python3 is not configured yet.
 python3-pyqt5.qtsvg depends on python3:any (>= 3.3~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-pyqt5.qtsvg (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-gi:
 python3-gi depends on python3 (<< 3.7); however:
  Package python3 is not configured yet.
 python3-gi depends on python3 (>= 3.6~); however:
  Package python3 is not configured yet.
 python3-gi depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-gi (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-psutil:
 python3-psutil depends on python3 (<< 3.7); however:
  Package python3 is not configured yet.
 python3-psutil depends on python3 (>= 3.6~); however:
  Package python3 is not configured yet.
 python3-psutil depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-psutil (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-stem:
 python3-stem depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-stem (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-chardet:
 python3-chardet depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.
 python3-chardet depends on python3-pkg-resources; however:
  Package python3-pkg-resources is not configured yet.

dpkg: error processing package python3-chardet (--configure):
 dependency problems - leaving unconfigured
Setting up systemd (237-3ubuntu10.33) ...
cp: '/etc/resolv.conf' and '/run/systemd/resolve/stub-resolv.conf' are the same file
dpkg: error processing package systemd (--configure):
 installed systemd package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of python3-sip:
 python3-sip depends on python3 (<< 3.7); however:
  Package python3 is not configured yet.
 python3-sip depends on python3 (>= 3.6~); however:
  Package python3 is not configured yet.
 python3-sip depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-sip (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-requests:
 python3-requests depends on python3-certifi; however:
  Package python3-certifi is not configured yet.
 python3-requests depends on python3-chardet (<< 3.1.0); however:
  Package python3-chardet is not configured yet.
 python3-requests depends on python3-idna; however:
  Package python3-idna is not configured yet.
 python3-requests depends on python3:any (>= 3.4~); however:
  Package python3 is not configured yet.
 python3-requests depends on python3-chardet (>= 3.0.2); however:
  Package python3-chardet is not configured yet.

dpkg: error processing package python3-requests (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-urllib3:
 python3-urllib3 depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.
 python3-urllib3 depends on python3-six; however:
  Package python3-six is not configured yet.

dpkg: error processing package python3-urllib3 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-lib2to3:
 python3-lib2to3 depends on python3 (>= 3.6.7-1~); however:
  Package python3 is not configured yet.
 python3-lib2to3 depends on python3 (<< 3.9); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-lib2to3 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-distutils:
 python3-distutils depends on python3 (>= 3.6.7-1~); however:
  Package python3 is not configured yet.
 python3-distutils depends on python3 (<< 3.9); however:
  Package python3 is not configured yet.
 python3-distutils depends on python3-lib2to3 (>= 3.6.4); however:
  Package python3-lib2to3 is not configured yet.

dpkg: error processing package python3-distutils (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-pyxattr:
 python3-pyxattr depends on python3 (<< 3.7); however:
  Package python3 is not configured yet.
 python3-pyxattr depends on python3 (>= 3.6~); however:
  Package python3 is not configured yet.
 python3-pyxattr depends on python3:any (>= 3.0~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-pyxattr (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-setproctitle:amd64:
 python3-setproctitle:amd64 depends on python3 (<< 3.7); however:
  Package python3 is not configured yet.
 python3-setproctitle:amd64 depends on python3 (>= 3.6~); however:
  Package python3 is not configured yet.
 python3-setproctitle:amd64 depends on python3:any (>= 3.2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-setproctitle:amd64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-socks:
 python3-socks depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-socks (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-fire:
 python3-fire depends on python3-six; however:
  Package python3-six is not configured yet.
 python3-fire depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-fire (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of iio-sensor-proxy:
 iio-sensor-proxy depends on systemd; however:
  Package systemd is not configured yet.

dpkg: error processing package iio-sensor-proxy (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python3
 tractor
 python3-pyqt5
 python3-idna
 python3-six
 python3-certifi
 persepolis
 youtube-dl
 python3-pkg-resources
 python3-pyqt5.qtsvg
 python3-gi
 python3-psutil
 python3-stem
 python3-chardet
 systemd
 python3-sip
 python3-requests
 python3-urllib3
 python3-lib2to3
 python3-distutils
 python3-pyxattr
 python3-setproctitle:amd64
 python3-socks
 python3-fire
 iio-sensor-proxy
E: Sub-process /usr/bin/dpkg returned an error code (1)
mostafa@Elsystem:~$
0
задан 16 January 2020 в 18:27

1 ответ

У меня была похожая проблема с Lubuntu 18.04 LTS на моем Raspberry Pi.

Что бы я ни пытался установить, это заканчивалось следующими ошибками:

*Traceback (most recent call last):
  File "/usr/bin/py3clean", line 210, in <module>
    main()
  File "/usr/bin/py3clean", line 196, in main
    pfiles = set(dpf.from_package(options.package))
  File "/usr/share/python3/debpython/files.py", line 53, in from_package
    raise Exception("cannot get content of %s" % package_name)
Exception: cannot get content of ubuntu-drivers-common
error running python rtupdate hook ubuntu-drivers-common
dpkg: error processing package python3 (--configure):
 installed python3 package post-installation script subprocess returned error exit status 4
Errors were encountered while processing:
 python3
E: Sub-process /usr/bin/dpkg returned an error code (1)*

Наконец-то я смог решить проблему, выполнив следующие действия:

rm /usr/share/python3/runtime.d/*
rm /usr/lib/valgrind/*
apt purge  python3
apt-get -f install
apt install python3 --fix-missing
apt-get update && apt-get upgrade && apt-get autoremove
2
ответ дан 24 December 2020 в 16:14

Другие вопросы по тегам:

Похожие вопросы: