1

I can´t upgrade Ubuntu because locales do not get installed:

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:

Edit

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
Braiam
  • 67,791
  • 32
  • 179
  • 269

1 Answers1

1

You have Debian repository in your source list (ftp.us.debian.org...) which is causing this problem.

The latest version of locales available in Ubuntu 14.04 Repository is already installed on your system. Also this package has no file which will replace /usr/sbin/validlocale

So removing this Debian repository from /etc/apt/sources.list should solve your problem.

After editing the sources.list don't forget to execute the following command.

sudo apt-get clean
sudo apt-get update


Or

(Not recommended as it can destroy your system)

You can overwrite this file using following command

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

Here old /usr/sbin/validlocale from libc-bin will be overwritten by new one from locales.

g_p
  • 18,504