我正在尝试修复我的 ubuntu 电脑中的软件包损坏问题。
当我尝试在终端(sudo dpkg --audit )中审核我的 dpkg 时,我得到了......
The following packages are in a mess due to serious problems during
installation. They must be reinstalled for them (and any packages
that depend on them) to function properly:
apport automatically generate crash reports for debugging
libglib2.0-dev Development files for the GLib library
The following packages have been unpacked but not yet configured.
They must be configured using dpkg --configure or the configure
menu option in dselect for them to work:
appgrid Discover and install apps for Ubuntu
mysql-server MySQL database server (metapackage depending on the lates
mysql-workbench-community MySQL Workbench
python-ecdsa ECDSA cryptographic signature library (Python 2)
python-paramiko Make ssh v2 connections with Python (Python 2)
The following packages are only half configured, probably due to problems
configuring them the first time. The configuration should be retried using
dpkg --configure <package> or the configure menu option in dselect:
mysql-server-5.7 MySQL database server binaries and system database setup
python-mysql.connector pure Python implementation of MySQL Client/Server proto
python-mysqldb Python interface to MySQL
python-ptyprocess Run a subprocess in a pseudo terminal from Python 2
python-pysqlite2 Python interface to SQLite 3
python-six Python 2 and 3 compatibility library (Python 2 interface)
答案1
正如消息中所说,尝试重新安装它们。只需运行
sudo apt install --reinstall [软件包名称]
apt 将重新安装这些软件包,这将导致 dpkg 不会在审核中显示这些软件包。
答案2
最后我的问题解决了
问题原因(我的 phython 配置为 3.5,而不是默认的 2.7)。因此,它会影响 libglib2.0
您可以尝试通过以下方法修复此问题:
Executing the command ls -l /usr/bin/python and see it's output, if the file /usr/bin/python point to python3.x , then remove the link with the command sudo rm /usr/bin/python and use this one to create a link to python2 sudo ln -s /usr/bin/python2.7 /usr/bin/python. With this, python2.7 will be back as the default python version in your system.
并使用 synaptic 包管理器重新安装损坏的包。现在一切正常。