Iam尝试安装vim,我收到以下错误
$ sudo apt-get install vim
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
libpng12-0 : Breaks: libpng12-0:i386 (!= 1.2.50-2+deb8u3) but 1.2.54-1ubuntu1 is to be installed
libpng12-0:i386 : Breaks: libpng12-0 (!= 1.2.54-1ubuntu1) but 1.2.50-2+deb8u3 is to be installed
vim : Depends: vim-common (= 2:7.4.1689-3ubuntu1.2) but 2:7.4.1689-3ubuntu1 is to be installed
Depends: vim-runtime (= 2:7.4.1689-3ubuntu1.2) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
然后我试着在没有包的情况下运行apt-get -f install。然后我收到了这个错误
The following additional packages will be installed:
libpng12-0
The following packages will be upgraded:
libpng12-0
1 upgraded, 0 newly installed, 0 to remove and 594 not upgraded.
3 not fully installed or removed.
Need to get 116 kB of archives.
After this operation, 11.3 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu xenial/main amd64 libpng12-0 amd64 1.2.54-1ubuntu1 [116 kB]
Fetched 116 kB in 1s (69.8 kB/s)
(Reading database ... 240235 files and directories currently installed.)
Preparing to unpack .../libpng12-0_1.2.54-1ubuntu1_amd64.deb ...
Unpacking libpng12-0:amd64 (1.2.54-1ubuntu1) over (1.2.50-2+deb8u3) ...
dpkg: error processing archive /var/cache/apt/archives/libpng12-0_1.2.54-1ubuntu1_amd64.deb (--unpack):
trying to overwrite shared '/usr/share/doc/libpng12-0/ANNOUNCE', which is different from other instances of package libpng12-0:amd64
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Errors were encountered while processing:
/var/cache/apt/archives/libpng12-0_1.2.54-1ubuntu1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
如果有人能够提出这个错误的原因会非常有帮助