build-locale-archive: cannot read archive header

If you are getting following error when trying to build locale archive in CentOS or RedHat 6 machines,

Then check if proper locale-archive.tmpl file present in /usr/lib/locale/

If you can’t find proper files under /usr/lib/locale/ , then download and extract it from glibc-common

Copy the file to actual location.

Make sure that it copied properly.

Run build-locale-archive again.

It should work this time :).