LINUX.ORG.RU

The following packages have unmet dependencies

 , ,


0

1

Перешёл с jammy на noble (Ubuntu 24.04).

при попытке sudo apt-get upgrade получаю проблему с python3(ldb, samba, apport). Подскажите куда копать.

The following packages have unmet dependencies:
 apport : Depends: python3-apport (>= 2.28.1-0ubuntu3.8) but 2.28.1-0ubuntu3.3 is installed
 python3-ldb : Depends: libldb2 (= 2:2.8.0+samba4.19.5+dfsg-4ubuntu9) but 2:2.8.0+samba4.19.5+dfsg-4ubuntu9.4 is installed
 python3-samba : Depends: samba-libs (= 2:4.19.5+dfsg-4ubuntu9) but 2:4.19.5+dfsg-4ubuntu9.4 is installed
                 Recommends: python3-gpg but it is not installed

не понимаю как привести все пакеты к версии ubuntu9.4 вместо ubuntu9

$ apt list -a libldb2
Listing... Done
libldb2/noble-updates,noble-security,now 2:2.8.0+samba4.19.5+dfsg-4ubuntu9.4 amd64 [installed,automatic]
libldb2/noble 2:2.8.0+samba4.19.5+dfsg-4ubuntu9 amd64

libldb2/noble-updates,noble-security 2:2.8.0+samba4.19.5+dfsg-4ubuntu9.4 i386
libldb2/noble 2:2.8.0+samba4.19.5+dfsg-4ubuntu9 i386

$ apt list -a python3-samba
Listing... Done
python3-samba/noble-updates,noble-security 2:4.19.5+dfsg-4ubuntu9.4 amd64 [upgradable from: 2:4.19.5+dfsg-4ubuntu9]
python3-samba/noble,now 2:4.19.5+dfsg-4ubuntu9 amd64 [installed,upgradable to: 2:4.19.5+dfsg-4ubuntu9.4]

python3-samba/noble-updates,noble-security 2:4.19.5+dfsg-4ubuntu9.4 i386
python3-samba/noble 2:4.19.5+dfsg-4ubuntu9 i386

В ubuntu.sources ничего не трогал:

/etc/apt/sources.list.d$ cat ubuntu.sources 
Types: deb
URIs: http://za.archive.ubuntu.com/ubuntu/
Suites: noble noble-updates noble-backports
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

Types: deb
URIs: http://security.ubuntu.com/ubuntu/
Suites: noble-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
$ sudo aptitude install libldb2

E: Can't find a source to download version '2.7.7ubuntu4' of 'python3-apt:amd64'
E: Can't find a source to download version '2.28.1-0ubuntu3.3' of 'python3-problem-report:amd64'
E: Can't find a source to download version '2.0.7-1ubuntu0.1' of 'python3-urllib3:amd64'
E: Internal error: couldn't generate list of packages to download



Последнее исправление: mironsv (всего исправлений: 3)
Ответ на: комментарий от masa

не могу удалить

$ sudo apt-get autoremove python3-apport --purge
The following packages have unmet dependencies:
 apport : Depends: python3-apport (>= 2.28.1-0ubuntu3.8) but it is not going to be installed
 apport-gtk : Depends: python3-apport (>= 2.28.1-0ubuntu3.3) but it is not going to be installed
 python3-ldb : Depends: libldb2 (= 2:2.8.0+samba4.19.5+dfsg-4ubuntu9) but 2:2.8.0+samba4.19.5+dfsg-4ubuntu9.4 is to be installed
 python3-samba : Depends: samba-libs (= 2:4.19.5+dfsg-4ubuntu9) but 2:4.19.5+dfsg-4ubuntu9.4 is to be installed
                 Recommends: python3-gpg but it is not going to be installed
 xserver-xorg : Depends: python3-apport but it is not going to be installed
anonymous
()
Ответ на: комментарий от Ololo_Trololo
$ sudo apt-get autoremove apport --purge
The following packages have unmet dependencies:
 apport-core-dump-handler : Depends: apport (>= 2.27.0-0ubuntu7~) but it is not going to be installed
 apport-gtk : Depends: apport (>= 0.41) but it is not going to be installed
 python3-ldb : Depends: libldb2 (= 2:2.8.0+samba4.19.5+dfsg-4ubuntu9) but 2:2.8.0+samba4.19.5+dfsg-4ubuntu9.4 is to be installed
 python3-samba : Depends: samba-libs (= 2:4.19.5+dfsg-4ubuntu9) but 2:4.19.5+dfsg-4ubuntu9.4 is to be installed
                 Recommends: python3-gpg but it is not going to be installed
mironsv
() автор топика

apt-get dist-upgrade попробуй

Если не поможет то придётся ручную выискивать старые пакеты.

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

firkax ★★★★★
()
Последнее исправление: firkax (всего исправлений: 1)

запустить aptitude, там поскакать по брокенам (b), позаходить в них, понажимать на красные линии и посотреть чотам (хотя там ничо), послушать варианты авторезолвера. на худой конец переключить версию зависимостей на то, что не вызывает паник. у меня в альте вообще реп сломаный, так я аптитудом вручную версии сломанных пакетов выставлял, чтобы он их не обновлял.

alt-tab-let ★★
()
Ответ на: комментарий от masa

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

Альтернативно можно попробовать заинсталлить пакеты нужных ему версий

Проверь, что у тебя сделан apt update и потом выполни что-то вроде apt install apparmor apport-core-dump-handler apport-gtk python3-ldb ... и прочеее что он там у тебя просит. Можно явно кузать версии

masa ★★★
()
Ответ на: комментарий от firkax

$ sudo apt-get dist-upgrade

The following packages have unmet dependencies:
 apport : Depends: python3-apport (>= 2.28.1-0ubuntu3.8) but 2.28.1-0ubuntu3.3 is installed
 python3-ldb : Depends: libldb2 (= 2:2.8.0+samba4.19.5+dfsg-4ubuntu9) but 2:2.8.0+samba4.19.5+dfsg-4ubuntu9.4 is installed
 python3-samba : Depends: samba-libs (= 2:4.19.5+dfsg-4ubuntu9) but 2:4.19.5+dfsg-4ubuntu9.4 is installed
                 Recommends: python3-gpg but it is not installed

$ dpkg -l | grep -F apport

iU  apport                                        2.28.1-0ubuntu3.8                        all          automatically generate crash reports for debugging
iU  apport-core-dump-handler                      2.28.1-0ubuntu3.8                        all          Kernel core dump handler for Apport
ii  apport-gtk                                    2.28.1-0ubuntu3.3                        all          GTK+ frontend for the apport crash report system
ii  apport-symptoms                               0.25                                     all          symptom scripts for apport
iFR python3-apport                                2.28.1-0ubuntu3.3                        all          Python 3 library for Apport crash report handling

$ sudo apt-get install python3-apport

The following packages have unmet dependencies:
 python3-ldb : Depends: libldb2 (= 2:2.8.0+samba4.19.5+dfsg-4ubuntu9) but 2:2.8.0+samba4.19.5+dfsg-4ubuntu9.4 is to be installed
 python3-samba : Depends: samba-libs (= 2:4.19.5+dfsg-4ubuntu9) but 2:4.19.5+dfsg-4ubuntu9.4 is to be installed
                 Recommends: python3-gpg but it is not going to be installed
mironsv
() автор топика
Ответ на: комментарий от mironsv

(>= 2.28.1-0ubuntu3.8) but 2.28.1-0ubuntu3.3 is installed

А с какого зеркала обновляешься? Может сменить ремозитории? Когда-то тоже ловил всякие несоответствия, а оказалось просто, мои ближайшие зеркала были как-то рассинхронмзированы.

PcheloBiaka
()
Ответ на: комментарий от masa

не пойму почему пишет «samba-libs уже 2:4.19.5+dfsg-4ubuntu9.4», а потом Depends: samba-libs (= 2:4.19.5+dfsg-4ubuntu9) но 2:4.19.5+dfsg-4ubuntu9.4 должна быть установлена

$ sudo apt install apparmor apport-core-dump-handler apport-gtk python3-ldb samba-libs
apport-core-dump-handler is already the newest version (2.28.1-0ubuntu3.8).
apport-core-dump-handler set to manually installed.
samba-libs is already the newest version (2:4.19.5+dfsg-4ubuntu9.4).
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 python3-samba : Depends: samba-libs (= 2:4.19.5+dfsg-4ubuntu9) but 2:4.19.5+dfsg-4ubuntu9.4 is to be installed
                 Recommends: python3-gpg but it is not going to be installed
mironsv
() автор топика
Ответ на: комментарий от masa
py3clean: not found
py3compile: not found

/usr/bin$ ls | grep py3
py3clean
py3compile

/usr/bin$ py3clean 
bash: /usr/bin/py3clean: cannot execute: required file not found

видимо, надо скачивать python3-minimal из зеркала https://mirrors.edge.kernel.org/ubuntu/pool/main/p/python3-defaults/ и переустанавливать dpkg -i python3-minimal_*.deb

Get:1 http://za.archive.ubuntu.com/ubuntu noble-updates/main amd64 apparmor amd64 4.0.1really4.0.1-0ubuntu0.24.04.5 [638 kB]
Get:2 http://za.archive.ubuntu.com/ubuntu noble-updates/main amd64 apport-gtk all 2.28.1-0ubuntu3.8 [9 758 B]
Fetched 648 kB in 2s (262 kB/s)           
Preconfiguring packages ...
(Reading database ... 258649 files and directories currently installed.)
Preparing to unpack .../0-python3-apt_2.7.7ubuntu5.1_amd64.deb ...
/var/lib/dpkg/info/python3-apt.prerm: 6: py3clean: not found
dpkg: warning: old python3-apt package pre-removal script subprocess returned error exit status 127
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 6: py3clean: not found
dpkg: error processing archive /tmp/apt-dpkg-install-S9rDvP/0-python3-apt_2.7.7ubuntu5.1_amd64.deb (--unpack):
 new python3-apt package pre-removal script subprocess returned error exit status 127
/var/lib/dpkg/info/python3-apt.postinst: 6: py3compile: not found
dpkg: error while cleaning up:
 installed python3-apt package post-installation script subprocess returned error exit status 127
Preparing to unpack .../1-python3-problem-report_2.28.1-0ubuntu3.8_all.deb ...
/var/lib/dpkg/info/python3-problem-report.prerm: 6: py3clean: not found
dpkg: warning: old python3-problem-report package pre-removal script subprocess returned error exit status 127
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 6: py3clean: not found
dpkg: error processing archive /tmp/apt-dpkg-install-S9rDvP/1-python3-problem-report_2.28.1-0ubuntu3.8_all.deb (--unpack):
 new python3-problem-report package pre-removal script subprocess returned error exit status 127
/var/lib/dpkg/info/python3-problem-report.postinst: 6: py3compile: not found
dpkg: error while cleaning up:
 installed python3-problem-report package post-installation script subprocess returned error exit status 127
Preparing to unpack .../2-python3-urllib3_2.0.7-1ubuntu0.2_all.deb ...
/var/lib/dpkg/info/python3-urllib3.prerm: 6: py3clean: not found
dpkg: warning: old python3-urllib3 package pre-removal script subprocess returned error exit status 127
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 6: py3clean: not found
dpkg: error processing archive /tmp/apt-dpkg-install-S9rDvP/2-python3-urllib3_2.0.7-1ubuntu0.2_all.deb (--unpack):
 new python3-urllib3 package pre-removal script subprocess returned error exit status 127
/var/lib/dpkg/info/python3-urllib3.postinst: 6: py3compile: not found
dpkg: error while cleaning up:
 installed python3-urllib3 package post-installation script subprocess returned error exit status 127
Preparing to unpack .../3-python3-apport_2.28.1-0ubuntu3.8_all.deb ...
/var/lib/dpkg/info/python3-apport.prerm: 6: py3clean: not found
dpkg: warning: old python3-apport package pre-removal script subprocess returned error exit status 127
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 6: py3clean: not found
dpkg: error processing archive /tmp/apt-dpkg-install-S9rDvP/3-python3-apport_2.28.1-0ubuntu3.8_all.deb (--unpack):
 new python3-apport package pre-removal script subprocess returned error exit status 127
No apport report written because MaxReports is reached already
                                                              /var/lib/dpkg/info/python3-apport.postinst: 6: py3compile: not found
dpkg: error while cleaning up:
 installed python3-apport package post-installation script subprocess returned error exit status 127
Preparing to unpack .../4-python3-ldb_2%3a2.8.0+samba4.19.5+dfsg-4ubuntu9.4_amd64.deb ...
/var/lib/dpkg/info/python3-ldb.prerm: 6: py3clean: not found
dpkg: warning: old python3-ldb package pre-removal script subprocess returned error exit status 127
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 6: py3clean: not found
dpkg: error processing archive /tmp/apt-dpkg-install-S9rDvP/4-python3-ldb_2%3a2.8.0+samba4.19.5+dfsg-4ubuntu9.4_amd64.deb (--unpack):
 new python3-ldb package pre-removal script subprocess returned error exit status 127
No apport report written because MaxReports is reached already
                                                              /var/lib/dpkg/info/python3-ldb.postinst: 6: py3compile: not found
dpkg: error while cleaning up:
 installed python3-ldb package post-installation script subprocess returned error exit status 127
Preparing to unpack .../5-python3-samba_2%3a4.19.5+dfsg-4ubuntu9.4_amd64.deb ...
/var/lib/dpkg/info/python3-samba.prerm: 6: py3clean: not found
dpkg: warning: old python3-samba package pre-removal script subprocess returned error exit status 127
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 6: py3clean: not found
dpkg: error processing archive /tmp/apt-dpkg-install-S9rDvP/5-python3-samba_2%3a4.19.5+dfsg-4ubuntu9.4_amd64.deb (--unpack):
 new python3-samba package pre-removal script subprocess returned error exit status 127
No apport report written because MaxReports is reached already
                                                              /var/lib/dpkg/info/python3-samba.postinst: 6: py3compile: not found
dpkg: error while cleaning up:
 installed python3-samba package post-installation script subprocess returned error exit status 127
Preparing to unpack .../6-apparmor_4.0.1really4.0.1-0ubuntu0.24.04.5_amd64.deb ...
Unpacking apparmor (4.0.1really4.0.1-0ubuntu0.24.04.5) over (4.0.1really4.0.1-0ubuntu0.24.04.3) ...
Preparing to unpack .../7-apport-gtk_2.28.1-0ubuntu3.8_all.deb ...
Unpacking apport-gtk (2.28.1-0ubuntu3.8) over (2.28.1-0ubuntu3.3) ...
Errors were encountered while processing:
 /tmp/apt-dpkg-install-S9rDvP/0-python3-apt_2.7.7ubuntu5.1_amd64.deb
 /tmp/apt-dpkg-install-S9rDvP/1-python3-problem-report_2.28.1-0ubuntu3.8_all.deb
 /tmp/apt-dpkg-install-S9rDvP/2-python3-urllib3_2.0.7-1ubuntu0.2_all.deb
 /tmp/apt-dpkg-install-S9rDvP/3-python3-apport_2.28.1-0ubuntu3.8_all.deb
 /tmp/apt-dpkg-install-S9rDvP/4-python3-ldb_2%3a2.8.0+samba4.19.5+dfsg-4ubuntu9.4_amd64.deb
 /tmp/apt-dpkg-install-S9rDvP/5-python3-samba_2%3a4.19.5+dfsg-4ubuntu9.4_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
mironsv
() автор топика
Ответ на: комментарий от masa

на любую попытку apt install PACKAGE были ошибки unmet dependecies

всем огромная благодарность! Вы спасли мой день! @firkax, @masa

  1. удалять ничего не понадобилось.
  2. попытка «sudo apt install apparmor apport-core-dump-handler apport-gtk python3-ldb samba-libs python3-samba» выявила проблему с py3clean: not found и py3compile: not found, которые входят в python3-minimal
  3. в итоге скачал python3-minimal_3.12.3-0ubuntu2.1_amd64.deb с https://mirrors.edge.kernel.org/ubuntu/pool/main/p/python3-defaults/ и переустановил с dpkg -i python3-minimal_*.deb
  4. дальше sudo apt install … и sudo apt dist-upgrade
mironsv
() автор топика