invalid date error on apt-get install libc6

Problem : Libc6 sarge 2.3.2.ds1-22sarge4 upgrade fail on
following commannd apt-get install libc6.

Error Message:
Setting up libc6 (2.3.2.ds1-22sarge4) ...
date: invalid date `Sun Oct 8 16:43:04 UTC 2006'
dpkg: error processing libc6 (--configure):
subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
libc6
E: Sub-process /usr/bin/dpkg returned an error code (1)

Fix Solution: Go to following file

/var/lib/dpkg/info/libc6.postinst

Original on code as follow on line 10.
zone_banner() {
TZBase=$(LC_ALL=C TZ=UTC0 date)
UTdate=$(TZ=UTC0 date -d "$TZBase")
TZdate=$(TZ="$timezone" date -d "$TZBase")

change to following

zone_banner() {
TZBase=$(LC_ALL=C TZ=UTC0 date)
UTdate=$(LANG=C TZ=UTC0 date)
TZdate=$(LANG=C TZ="$timezone" date)

It work fine after this fix.

Praful Shah

0
Syndicate content