склонный - добираются, установка [пакет] получает ошибку

когда я даю следующую команду:

apt-get install ssh

Я получаю следующие ошибки

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  base-files libedit2 libssl1.0.0 libxmuu1 ncurses-term openssh-client openssh-server openssh-sftp-server python3-certifi python3-chardet
  python3-idna python3-pkg-resources python3-requests python3-six python3-urllib3 ssh-import-id wget xauth
Suggested packages:
  keychain libpam-ssh monkeysphere ssh-askpass molly-guard rssh ufw python3-setuptools python3-cryptography python3-openssl python3-socks
The following NEW packages will be installed:
  libedit2 libssl1.0.0 libxmuu1 ncurses-term openssh-client openssh-server openssh-sftp-server python3-certifi python3-chardet python3-idna
  python3-pkg-resources python3-requests python3-six python3-urllib3 ssh ssh-import-id wget xauth
The following packages will be upgraded:
  base-files
1 upgraded, 18 newly installed, 0 to remove and 12 not upgraded.
5 not fully installed or removed.
Need to get 0 B/3,343 kB of archives.
After this operation, 17.1 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
(Reading database ... 11001 files and directories currently installed.)
Preparing to unpack .../base-files_10.1ubuntu2.7_amd64.deb ...
dpkg-maintscript-helper: error: dpkg: error: unknown option --validate-version

Type dpkg --help for help about installing and deinstalling packages [*];
Use 'apt' or 'aptitude' for user-friendly package management;
Type dpkg -Dhelp for a list of dpkg debug flag values;
Type dpkg --force-help for a list of forcing options;
Type dpkg-deb --help for help about manipulating *.deb files;

Options marked [*] produce a lot of output - pipe it through 'less' or 'more' !
dpkg: error processing archive /var/cache/apt/archives/base-files_10.1ubuntu2.7_amd64.deb (--unpack):
 subprocess new pre-installation script returned error exit status 1
dpkg-maintscript-helper: error: dpkg: error: unknown option --validate-version

Type dpkg --help for help about installing and deinstalling packages [*];
Use 'apt' or 'aptitude' for user-friendly package management;
Type dpkg -Dhelp for a list of dpkg debug flag values;
Type dpkg --force-help for a list of forcing options;
Type dpkg-deb --help for help about manipulating *.deb files;

Options marked [*] produce a lot of output - pipe it through 'less' or 'more' !
dpkg: error while cleaning up:
 subprocess new post-removal script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/base-files_10.1ubuntu2.7_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Я сделал все решения здесь и здесь но ни одна из работ для меня!

затем я попробовал:

dpkg --configure -a 

получите следующий результат:

Setting up python3 (3.6.7-1~18.04) ...
running python rtupdate hooks for python3.6...
dpkg-query: package 'dh-python' 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 
    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 dh-python
error running python rtupdate hook dh-python
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 
    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 
    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 
    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 
    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 'libglib2.0-dev-bin' 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 
    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 libglib2.0-dev-bin
error running python rtupdate hook libglib2.0-dev-bin
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 
    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 
    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 
    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 
    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 
    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 
    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):
 subprocess installed post-installation script returned error exit status 4
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 networkd-dispatcher:
 networkd-dispatcher depends on python3-gi; however:
  Package python3-gi is not configured yet.
 networkd-dispatcher depends on python3:any; however:
  Package python3 is not configured yet.

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

dpkg: error processing package python3-dbus (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python3
 python3-gi
 networkd-dispatcher
 python3-dbus

затем в корневом режиме: Я пробую следующую команду:

python -V

Я получаю это:

Python 3.7.2

Наконец, не может пойти на решение в сети bcaz с вводом никакой команды, запущенной с "dkpg" и "склонной", я получаю первую ошибку.

Я пытаюсь установить dkpg от основы так, загрузить последний verstion отсюда: введите описание ссылки здесь

sudo dpkg -i dpkg_1.18.25_amd64.deb

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

0
задан 18 October 2019 в 11:48

1 ответ

Ключ к пониманию этой стены текста dpkg: error: unknown option --validate-version. Избавьтесь от той дрянной версии 3.7.2 Python и используйте (восстанавливают) версию Python 2 по умолчанию с sudo apt install python-all и эта стена сообщений об ошибках исчезнет. Я могу сказать, что Python 3.7.2 в не версия по умолчанию, потому что это не находится в репозиториях по умолчанию ни для какой в настоящее время поддерживаемой версии Ubuntu, таким образом, Вы, должно быть, установили его или вручную или от PPA. Если Вам нужно больше информации, комментарий для сообщения, из какой версии Ubuntu Вы используете и результаты which python3 и which python3.7.

0
ответ дан 22 December 2019 в 00:18

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

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