试图覆盖’/ usr / sbin / validlocale’,这也是包libc-bin 2.19-0ubuntu6.3

我无法升级Ubuntu,因为没有安装locales:

root@ubuntuserver14:/home/administrator# aptitude install locales The following packages will be upgraded: locales 1 packages upgraded, 0 newly installed, 0 to remove and 1338 not upgraded. Need to get 0 B/3,942 kB of archives. After unpacking 6,903 kB will be used. Do you want to continue? [Y/n/?] y Preconfiguring packages ... (Reading database ... 201978 files and directories currently installed.) Preparing to unpack .../locales_2.19-13_all.deb ... Unpacking locales (2.19-13) over (2.13+git20120306-12.1) ... dpkg: error processing archive /var/cache/apt/archives/locales_2.19-13_all.deb (--unpack): trying to overwrite '/usr/sbin/validlocale', which is also in package libc-bin 2.19-0ubuntu6.3 dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Errors were encountered while processing: /var/cache/apt/archives/locales_2.19-13_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1) A package failed to install. Trying to recover: 

编辑

 administrator@ubuntuserver14:~$ apt-cache policy locales locales: Installed: 2.13+git20120306-12.1 Candidate: 2.19-13 Version table: 2.19-13 0 500 http://ftp.us.debian.org/debian/ jessie/main amd64 Packages *** 2.13+git20120306-12.1 0 500 http://pt.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages 100 /var/lib/dpkg/status 2.13+git20120306-12 0 500 http://pt.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages 

您的源列表( ftp.us.debian.org... )中有Debian存储库导致此问题。

Ubuntu 14.04存储库中提供的最新版本的locales已安装在您的系统上。 此包也没有将替换/usr/sbin/validlocale

因此,从/etc/apt/sources.list删除此Debian存储库可以解决您的问题。

编辑sources.list ,不要忘记执行以下命令。

 sudo apt-get clean sudo apt-get update 

要么

(不推荐,因为它可能会破坏您的系统)

您可以使用以下命令覆盖此文件

  sudo apt-get -o Dpkg::Options::="--force-overwrite" install locales 

这里来自libc-bin/usr/sbin/validlocale将被来自locales的新的/usr/sbin/validlocale覆盖。