我正在尝试将 python3-samba 从 2:4.13.13+dfsg-1~deb11u5 armhf 升级到 2:4.13.13+dfsg-1~deb11u6 armhf,但是,当尝试这样做时,我收到以下错误:
The following packages have unmet dependencies:
python3-samba : Depends: samba-libs (= 2:4.13.13+dfsg-1~deb11u5) but 2:4.13.13+dfsg-1~deb11u6 is installed
Depends: libwbclient0 (= 2:4.13.13+dfsg-1~deb11u5) but 2:4.13.13+dfsg-1~deb11u6 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
现在,当我执行 apt --fix-broken install 时,出现以下错误:
:/home/osmc# apt --fix-broken install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
python3-samba
Recommended packages:
python3-gpg
The following packages will be upgraded:
python3-samba
1 upgraded, 0 newly installed, 0 to remove and 14 not upgraded.
4 not fully installed or removed.
Need to get 0 B/2348 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 ... 55436 files and directories currently installed.)
Preparing to unpack .../python3-samba_2%3a4.13.13+dfsg-1~deb11u6_armhf.deb ...
/var/lib/dpkg/info/python3-samba.prerm: 6: py3clean: Permission denied
dpkg: warning: old python3-samba package pre-removal script subprocess returned error exit status 126
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 6: py3clean: Permission denied
dpkg: error processing archive /var/cache/apt/archives/python3-samba_2%3a4.13.13+dfsg-1~deb11u6_armhf.deb (--unpack):
new python3-samba package pre-removal script subprocess returned error exit status 126
/var/lib/dpkg/info/python3-samba.postinst: 6: py3compile: Permission denied
dpkg: error while cleaning up:
installed python3-samba package post-installation script subprocess returned error exit status 126
Errors were encountered while processing:
/var/cache/apt/archives/python3-samba_2%3a4.13.13+dfsg-1~deb11u6_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
我的 Debian 版本是:
/home/osmc# uname -a
Linux osmc 5.15.92-1-osmc #1 SMP PREEMPT Tue Jul 25 00:03:42 UTC 2023 aarch64 GNU/Linux
我可以做些什么来解决这个问题吗?
你的Python解释器坏了,需要重新安装;既然
python3-samba
也坏了,你需要同时安装它:由于您的设置似乎太糟糕,无法正常工作,因此您可以尝试手动恢复所需的包:
完成后,您应该能够
python3-samba
根据需要升级或删除它。由于我安装的系统的 python 版本错误,安装似乎无法正常工作。
我使用了 sudo update-alternatives --config python3 并将 python3.9 作为主要版本。之后安装工作完美。