Обновление apt-get не работает из-за неудовлетворенных зависимостей

Всякий раз, когда я пытаюсь установить, используя команду apt-get install, я получаю ошибки, подобные этим

Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 ubuntu-release-upgrader-core : Depends: python3-distupgrade (= 1:16.04.14) but 1:16.04.12 is to be installed
 ubuntu-release-upgrader-gtk : Depends: python3-distupgrade (= 1:16.04.14) but 1:16.04.12 is to be installed
 wine : Depends: wine1.6 but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

После подачи команд apt-get -f install я получаю это.

Preparing to unpack .../python3-distupgrade_1%3a16.04.14_all.deb ...
/var/lib/dpkg/info/python3-distupgrade.prerm: 6: /var/lib/dpkg/info/python3-distupgrade.prerm: py3clean: not found
dpkg: warning: subprocess old pre-removal script returned error exit status 127
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: py3clean: not found
dpkg: error processing archive /var/cache/apt/archives/python3-distupgrade_1%3a16.04.14_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 127
/var/lib/dpkg/info/python3-distupgrade.postinst: 6: /var/lib/dpkg/info/python3-distupgrade.postinst: py3compile: not found
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
 /var/cache/apt/archives/python3-distupgrade_1%3a16.04.14_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Есть ли способ исправить это?


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

$ sudo dpkg -i --force-overwrite /var/cache/apt/archives/python3-distupgrade_1%3a16.04.14_all.deb

[sudo] password for user: 
(Reading database ... 178880 files and directories currently installed.)
Preparing to unpack .../python3-distupgrade_1%3a16.04.14_all.deb ...
/var/lib/dpkg/info/python3-distupgrade.prerm: 6: /var/lib/dpkg/info/python3-distupgrade.prerm: py3clean: not found
dpkg: warning: subprocess old pre-removal script returned error exit status 127
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: py3clean: not found
dpkg: error processing archive /var/cache/apt/archives/python3-distupgrade_1%3a16.04.14_all.deb (--install):
 subprocess new pre-removal script returned error exit status 127
/var/lib/dpkg/info/python3-distupgrade.postinst: 6: /var/lib/dpkg/info/python3-distupgrade.postinst: py3compile: not found
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
 /var/cache/apt/archives/python3-distupgrade_1%3a16.04.14_all.deb

Я попытался apt-get Команда -f также

user@user-Inspiron-3543:~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  python3-distupgrade
The following packages will be upgraded:
  python3-distupgrade
1 upgraded, 0 newly installed, 0 to remove and 242 not upgraded.
17 not fully installed or removed.
Need to get 0 B/104 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 178880 files and directories currently installed.)
Preparing to unpack .../python3-distupgrade_1%3a16.04.14_all.deb ...
/var/lib/dpkg/info/python3-distupgrade.prerm: 6: /var/lib/dpkg/info/python3-distupgrade.prerm: py3clean: not found
dpkg: warning: subprocess old pre-removal script returned error exit status 127
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: py3clean: not found
dpkg: error processing archive /var/cache/apt/archives/python3-distupgrade_1%3a16.04.14_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 127
/var/lib/dpkg/info/python3-distupgrade.postinst: 6: /var/lib/dpkg/info/python3-distupgrade.postinst: py3compile: not found
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
 /var/cache/apt/archives/python3-distupgrade_1%3a16.04.14_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Все еще находит ту же ошибку.


Ошибка, которую я обнаружил, была

dpkg: error processing package update-notifier-common (--configure):
 subprocess installed post-installation script returned error exit status 127
dpkg: dependency problems prevent configuration of libgnomevfs2-common:
 libgnomevfs2-common depends on gconf2 (>= 2.28.1-2); however:
  Package gconf2 is not configured yet.

dpkg: error processing package libgnomevfs2-common (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of terminator:
 terminator depends on gconf2; however:
  Package gconf2 is not configured yet.

dpkg: error processing package terminator (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ttf-mscorefonts-installer:
 ttf-mscorefonts-installer depends on update-notifier-common (>= 0.119ubuntu2); however:
  Package update-notifier-common is not configured yet.

dpkg: error processing package ttf-mscorefonts-installer (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libgnomevfs2-0:amd64:
 libgnomevfs2-0:amd64 depends on libgnomevfs2-common (= 1:2.24.4-6.1ubuntu1); however:
  Package libgnomevfs2-common is not configured yet.

dpkg: error processing package libgnomevfs2-0:amd64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libgnome2-common:
 libgnome2-common depends on gconf2 (>= 2.28.1-2); however:
  Package gconf2 is not configured yet.

dpkg: error processing package libgnome2-common (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libgnomeui-0:amd64:
 libgnomeui-0:amd64 depends on libgnomevfs2-0 (>= 1:2.17.90); however:
  Package libgnomevfs2-0:amd64 is not configured yet.

dpkg: error processing package libgnomeui-0:amd64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python-gnome2:
 python-gnome2 depends on libgnomeui-0 (>= 2.22.0); however:
  Package libgnomeui-0:amd64 is not configured yet.
 python-gnome2 depends on libgnomevfs2-0 (>= 1:2.17.90); however:
  Package libgnomevfs2-0:amd64 is not configured yet.

dpkg: error processing package python-gnome2 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libgnome-2-0:amd64:
 libgnome-2-0:amd64 depends on libgnomevfs2-0 (>= 1:2.17.90); however:
  Package libgnomevfs2-0:amd64 is not configured yet.
 libgnome-2-0:amd64 depends on libgnome2-common (= 2.32.1-5ubuntu1); however:
  Package libgnome2-common is not configured yet.

dpkg: error processing package libgnome-2-0:amd64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libgnome2-0:amd64:
 libgnome2-0:amd64 depends on libgnome-2-0 (= 2.32.1-5ubuntu1); however:
  Package libgnome-2-0:amd64 is not configured yet.

dpkg: error processing package libgnome2-0:amd64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libgnome2-bin:
 libgnome2-bin depends on libgnome-2-0; however:
  Package libgnome-2-0:amd64 is not configured yet.

dpkg: error processing package libgnome2-bin (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libbonoboui2-0:amd64:
 libbonoboui2-0:amd64 depends on libgnome2-0 (>= 2.17.3); however:
  Package libgnome2-0:amd64 is not configured yet.

dpkg: error processing package libbonoboui2-0:amd64 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 gconf2
 update-notifier-common
 libgnomevfs2-common
 terminator
 ttf-mscorefonts-installer
 libgnomevfs2-0:amd64
 libgnome2-common
 libgnomeui-0:amd64
 python-gnome2
 libgnome-2-0:amd64
 libgnome2-0:amd64
 libgnome2-bin
 libbonoboui2-0:amd64

После очистки и переустановки первых двух упакованных ошибок наступает

2
задан 14 June 2016 в 00:18

4 ответа

Кажется, что установка Python повреждается.. Попытайтесь переустановить python3-minimal

sudo apt-get install --reinstall python3-minimal

Теперь, можно работать sudo apt-get install --fix-broken снова и затем apt-get update.. если это перестало работать, сообщают нам.

6
ответ дан 14 June 2016 в 00:18

У меня есть та же проблема с человечностью 16.04 после того, как я установил интерпретатор Python по умолчанию от python3 до python2 как:

sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1

я задержал его к python2 и работал sudo apt -f install и эта решенная проблема

0
ответ дан 10 November 2019 в 18:11

Я также испытал эту проблему - в моем случае на Raspbian при обновлении от хрипящего до jessie. python3-minimal пакет оставили в плохом состоянии с prerm и сценариями рычага postinst для сбоя debconf при вызове py3clean и py3compile команды.

Действительно py3clean был поврежден, как замечено при выполнении команды непосредственно:

-bash: /usr/bin/py3clean: /usr/bin/python3: bad interpreter: No such file or directory

Попытка переустановить python3-minimal пакет привел к ошибке:

$ sudo apt-get install --reinstall python3-minimal
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 idle3 : Depends: idle-python3.4 but it is not going to be installed
 python3 : Depends: python3.4 (>= 3.4.2-0) but it is not going to be installed
           Depends: libpython3-stdlib (= 3.4.2-2) but it is not going to be installed
           Depends: dh-python but it is not going to be installed
 python3-minimal : Depends: python3.4-minimal (>= 3.4.2-0) but it is not going to be installed
 python3-numpy : Depends: python3.4 but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Предложенный apt-get -f install команда осталась поврежденной.

В конечном счете я работал вокруг проблемы путем комментирования py3clean-связанных строк от /var/lib/dpkg/info/debconf.prerm который смотрел что-то как:

if which py3clean >/dev/null 2>&1; then
       py3clean -p debconf 
fi

Я затем должен был прокомментировать py3compile строки от /var/lib/dpkg/info/debconf.postinst:

if which py3compile >/dev/null 2>&1; then
       py3compile -p debconf 
fi

Это позволило мне успешно работать

sudo apt-get -f install

В этой точке я смог переустановить пакет чисто, который также ловко удалил вышеупомянутое удовлетворение требованиям заказчика сценария, которое больше не было необходимо.

sudo apt-get install --reinstall debconf

0
ответ дан 2 December 2019 в 01:36

все еще::

/var/lib/dpkg/info/debconf.prerm: 24:/var/lib/dpkg/info/debconf.prerm: py3clean: не найденный

макет/usr/local/bin/py3clean содержащий::

#!/bin/sh

повторите "py3clean макет"

затем sudo apt-get -f install работы

0
ответ дан 2 December 2019 в 01:36

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

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