Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am trying to install Postfix on Ubuntu 10.04 using command sudo apt-get install postfix but there comes error as shown below:

Preconfiguring packages ...
(Reading database ... 164023 files and directories currently installed.)
Preparing to replace locales 2.9+git20090617-3 (using .../locales_2.11.2-7_all.deb) ...
Unpacking replacement locales ...
dpkg: error processing /var/cache/apt/archives/locales_2.11.2-7_all.deb (--unpack):
 trying to overwrite '/usr/sbin/validlocale', which is also in package libc-bin 0:2.10.1-0ubuntu18
Processing triggers for man-db ...
Errors were encountered while processing:
 /var/cache/apt/archives/locales_2.11.2-7_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Please help me what to do

share|improve this question
    
Have you tried this: sudo apt-get update ? –  iamsid Nov 23 '10 at 9:50
    
yes, i tried that, still the error comes –  dsharma Nov 23 '10 at 9:52
add comment

1 Answer

Your system is not up-to-date with 10.04, which was released with version 2.11.1-0ubuntu7 of the libc-bin package (now superseded by 2.11.1-0ubuntu7.5 due to a security upgrade) and and version 2.11+git20100304-3 of the locales package. Installing the Postfix package required an upgrade of locales, but the new version of locales is incompatible with the version of libc-bin you now have. It's a bug that the locales package doesn't declare a dependency that would have caused libc-bin to be upgraded as well.

Nonetheless, you are doing two things wrong. First, you shouldn't try to run a mixed karmic/lucid system. It's technically possible, but inadvisable and will lead to all kinds of problems such as the one you're experiencing. Second, you should enable security upgrades.

If you're using the GUI, bring up “Software sources” and make sure “Important security updates” and “Recommended updates” are checked in the “Updates” tab. Then bring up the “Update manager” and perform an upgrade to 10.04.

If you're using the command line, make sure /etc/apt/sources.list contains at least the following lines:

deb http://fr.archive.ubuntu.com/ubuntu/ lucid main restricted universe multiverse
deb http://fr.archive.ubuntu.com/ubuntu/ lucid-updates main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu lucid-security main restricted universe multiverse

(It's ok if restricted, universe and multiverse are on separate lines with the same prefix deb ... lucid-... prefix as main.) Then either install the update-manager-core Install update-manager-core package and run sudo do-release-upgrade, or run sudo apt-get update; sudo apt-get dist-upgrade.

See also Lucid Upgrades; in addition to the information on this page, note that you don't seem to have security updates enabled, and the automated procedure might not take care of that.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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