Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
hanu@hanu-HP-Pavilion-Sleekbook-14:~/raijin/build_debug$ sudo apt-get -f install 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
The following packages will be upgraded:
1 upgraded, 0 newly installed, 0 to remove and 1008 not upgraded.
Need to get 0 B/3,801 kB of archives.
After this operation, 6,537 kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
WARNING: The following packages cannot be authenticated!
Install these packages without verification [y/N]? y
Preconfiguring packages ...
(Reading database ... 204496 files and directories currently installed.)
Preparing to replace locales 2.13+git20120306-9 (using .../locales_2.17-92_all.deb) ...
Unpacking replacement locales ...
dpkg: error processing /var/cache/apt/archives/locales_2.17-92_all.deb (--unpack):
 trying to overwrite '/usr/sbin/validlocale', which is also in package libc-bin 2.17-0ubuntu5
configured to not write apport reports
                                      dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

hanu@hanu-HP-Pavilion-Sleekbook-14:~/raijin/build_debug$ valgrind
The program 'valgrind' is currently not installed. You can install it by typing:
sudo apt-get install valgrind
share|improve this question

marked as duplicate by Braiam, Mitch, Kevin Bowen, Alaa Ali, guntbert Sep 17 '13 at 19:52

This question was marked as an exact duplicate of an existing question.

@guntbert his problem is that two packages are trying to provide the same file, he either have to delete libc-bin (which is a very bad idea) or remove locales from the installation, and Jokerdino's answer fit both solutions. Trough, truth be told, I think OP is mixing several repositories. – Braiam Sep 17 '13 at 19:43

When finding errors, it is usually informative to look at the first error, the one that caused the later ones.

dpkg: error processing /var/cache/apt/archives/locales_2.17-92_all.deb (--unpack):
 trying to overwrite '/usr/sbin/validlocale', which is also in package libc-bin 2.17-0ubuntu5

The problem is as dpkg says: the same file validlocale exists in two packages, so they cannot both be installed. What might fix this is to upgrade the other package first.

aptitude install libc-bin

When that is finished, try installing valgrind again.

share|improve this answer

Try to find the libc-bin 2.17 to know how to spell it correctly use:

apt-cache search libc-bin* | more

Then type apt-get remove "the pattern you find out" with apt-cache search for example this could be libc-bin 2.17 or libc-bin-2.17

Do the same with apt-get purge to make sure all data are removed

then try to install valgrind again.

share|improve this answer
This won't work because aptitude why libc-bin and libc6 is a rather critical package. ;) – joeytwiddle Sep 14 '13 at 17:21

It may be better to install it from the Ubuntu Software Center. Search for valgrind

Ubuntu Software Center

This would allow you to install the main programme

enter image description here

and any other additional packages which may be relevant.

enter image description here

share|improve this answer
The problem will persist if the dpkg error isn't fixed. – Braiam Sep 14 '13 at 16:59
@Braiam That sounds like a good place to start an answer :) – SimplySimon Sep 14 '13 at 17:04
Check the duplicated, the answer is there. – Braiam Sep 14 '13 at 17:32

Not the answer you're looking for? Browse other questions tagged or ask your own question.