If you are getting following error when trying to build locale archive in CentOS or RedHat 6 machines,
1 |
build-locale-archive: cannot read archive header |
Then check if proper locale-archive.tmpl file present in /usr/lib/locale/
1 2 3 4 |
# ls -l /usr/lib/locale/ total 0 -rw-r--r-- 1 root root 0 Jan 1 05:49 locale-archive lrwxrwxrwx 1 root root 30 Jan 1 05:48 locale-archive.tmpl -> /usr/lib/locale/locale-archive |
If you can't find proper files under /usr/lib/locale/ , then download and extract it from glibc-common
1 2 3 4 5 |
# yum install yum-utils # mkdir tmp # cd tmp #yumdownloader glibc-common # rpm2cpio glibc-common*.rpm | cpio -idmv |
Copy the file to actual location.
1 2 |
# rm -vf /usr/lib/locale/locale-archive.tmpl # cp -vf ./usr/lib/locale/locale-archive.tmpl /usr/lib/locale/ |
Make sure that it copied… Continue reading build-locale-archive: cannot read archive header