尝试覆盖 '/usr/sbin/validlocale',它也位于软件包 libc-bin 2.19-0ubuntu6.3 中

尝试覆盖 '/usr/sbin/validlocale',它也位于软件包 libc-bin 2.19-0ubuntu6.3 中

我无法升级 Ubuntu,因为没有安装区域设置:

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

答案1

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

最新版本locales可在Ubuntu 14.04 存储库已安装在您的系统上。此外,此包没有文件这将取代/usr/sbin/validlocale

因此删除这个 Debian 存储库/etc/apt/sources.list应该可以解决您的问题。

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

sudo apt-get clean
sudo apt-get update


或者

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

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

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

这里旧/usr/sbin/validlocalelibc-bin将会被新的覆盖locales

相关内容