当我运行命令时
sudo apt-get upgrade
显示错误:
dpkg: error processing package libexiv2-14:amd64 (--configure):
package is in a very bad inconsistent state; you should
reinstall it before attempting configuration
Errors were encountered while processing:
libexiv2-14:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)
我尝试运行:
sudo dpkg --configure -a
sudo apt-get install -f
我得到了同样的错误。然后我尝试删除包:
sudo apt remove libexiv2-14:amd64
[sudo] password for pas:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libraw15 libset-scalar-perl shotwell-common
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
libexiv2-14 libgexiv2-2 shotwell
0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 9,233 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 250847 files and directories currently installed.)
Removing shotwell (0.22.0+git20160108.r1.f2fb1f7-0ubuntu1) ...
Removing libgexiv2-2:amd64 (0.10.3-2) ...
dpkg: error processing package libexiv2-14:amd64 (--remove):
package is in a very bad inconsistent state; you should
reinstall it before attempting a removal
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for libc-bin (2.23-0ubuntu7) ...
Errors were encountered while processing:
libexiv2-14:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)
我明白了;
答案1
我终于设法解决了这个问题,首先我使用以下命令删除了整个包:
sudo dpkg --remove --force-all libexiv2-14
更新源之后:
sudo apt-get update
我重新安装了上述软件包。
sudo apt-get --reinstall install libexiv2-14