在Ubuntu 18.04上以非连贯状态打包'python3-apt' [英] package 'python3-apt' in incoherent state on Ubuntu 18.04

查看:380
本文介绍了在Ubuntu 18.04上以非连贯状态打包'python3-apt'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

几天前,我在Ubuntu桌面上没有与更新相关的登录标志.

Few days ago, I got a no-entry sign on my Ubuntu desktop related to updates.

我检查了关于Java8 ppa的可能要做的事情,但这并不是阻止gnome-console启动的原因.另外,我最近还安装了一些似乎与该问题无关的软件包.

I checked there is probably something to be done about my Java8 ppa though that is not what is preventing gnome-console to start. Also I recently installed some packages that seemed unrelated to the issue.

所以我开始了 Ubuntu论坛线程

显然,python3-apt是问题所在,但我没有管理重新安装.我正在考虑使用wget进行安装,并在允许的情况下进行手动安装(在我的最新解答中已提及).

Apparently python3-apt is at the art of the problem but I didn't manage a reinstall. I'm considering getting it using wget and do a manual install if allowed (mentionned in my latest answers).

在sérieux上的sapants sant dans unétatincohérent problèmessurvenus lors de l'装置.重新安装 (ainsi que tous les paquets qui endépendent)倒pouvoir fonctionner 校正: python3-apt与libapt-pkg的Python 3接口

Les paquets suivants sont dans un état incohérent à cause de sérieux problèmes survenus lors de l'installation. Ils doivent être réinstallés (ainsi que tous les paquets qui en dépendent) pour pouvoir fonctionner correctement : python3-apt Python 3 interface to libapt-pkg

上述错误要求我重新安装以下内容(以及所有依赖的软件包):

The above error asked me to reinstall the following (as well as all depending packages) :

python3-apt与libapt-pkg的Python 3接口

python3-apt Python 3 interface to libapt-pkg

问题在于更新cmd:

sudo apt更新

sudo apt update

输出:

E:执行脚本APT :: Update :: Post-Invoke-Success'if/usr/bin/test -w/var/lib/command-not-found/-a -e/usr/lib/cnf -update-db;然后/usr/lib/cnf-update-db>/dev/null; fi' E:子流程返回了错误代码

E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/lib/command-not-found/ -a -e /usr/lib/cnf-update-db; then /usr/lib/cnf-update-db > /dev/null; fi' E: Sub-process returned an error code

现在,尝试通过sudo apt install --reinstall -y python3-apt重新安装python3-apt 返回:

And now, trying reinstalling python3-apt via sudo apt install --reinstall -y python3-apt returns :

dpkg:清理时出错: 已安装python3-apt软件包安装后脚本子进程返回错误退出状态127 Des erreurs ontétérencontrées坠饰: /var/cache/apt/archives/python3-apt_1.6.5ubuntu0.2_amd64.deb E:子进程/usr/bin/dpkg返回错误代码(1)

dpkg : error while cleaning up: installed python3-apt package post-installation script subprocess returned error exit status 127 Des erreurs ont été rencontrées pendant l'exécution : /var/cache/apt/archives/python3-apt_1.6.5ubuntu0.2_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)

请问一下法语的解释,但是结尾是用英语写的.

Excuse me for the French explanations but the end is written in English.

我正在寻找如何正确重新安装的方法,也许我指出了解决方案,但还没有找出正确的命令,也可能也正在研究libapt-pkg的状态.同样如上所述,在终端崩溃而不再重新启动之前,这是更新时出现的问题.

I'm looking for how to reinstall properly, maybe I pointed the solution but have yet to figure out proper commands and maybe exploring libapt-pkg state as well. Also as above mentionned, it was a problem at update time before terminal crashed not to restart anymore.

感谢您的贡献.

推荐答案

我正在发布通用解决方案,该解决方案在上述ubuntu-forum帖子中提供了详细信息.

I'm posting general solution as available in details within the ubuntu-forum post mentioned.

一旦我在临时文件夹中重新安装了python3-minimum download,就可以修复到python3-apt了,所以我从ubuntu存储库中进行了全新安装:

Fix to python3-apt was possible once I reinstalled python3-minimal downloading in a temp folder so I got a fresh install from ubuntu repositories:

请确保您已根据系统要求获得所需的软件包,并使用YOUR_ACTUAL_PACKAGE_VERSION寻找自己所需的deb:

Make sure you get the desired package according to your system requirements with YOUR_ACTUAL_PACKAGE_VERSION looking for your own necessary deb:

sudo apt clean && wget -c http://security.ubuntu.com/ubuntu/pool/main/p/python-apt/python3-apt_YOUR_ACTUAL_PACKAGE_VERSION.deb

sudo dpkg -i --force-all python3-apt_apt_YOUR_ACTUAL_PACKAGE_VERSION.deb

sudo apt install -fy
sudo apt update && sudo apt full-upgrade

(这些步骤可以从第3页找到) sudo apt install -fy

(these steps can be found from page 3) sudo apt install -fy

sudo apt更新&& sudo apt全面升级

sudo apt update && sudo apt full-upgrade

这篇关于在Ubuntu 18.04上以非连贯状态打包'python3-apt'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆