From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: locale warning and postgresql Date: Mon, 28 Nov 2016 21:48:32 +0100 Message-ID: <877f7nmiu7.fsf@gnu.org> References: <87eg1vitxf.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50500) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cBSqt-0002sH-Pj for help-guix@gnu.org; Mon, 28 Nov 2016 15:48:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cBSqp-0006P7-TG for help-guix@gnu.org; Mon, 28 Nov 2016 15:48:39 -0500 In-Reply-To: <87eg1vitxf.fsf@gmail.com> (Myles English's message of "Mon, 28 Nov 2016 14:02:36 +0000") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Myles English Cc: help-guix Hi Myles, Myles English skribis: > I have always had trouble with my locale after installing guix on Arch > Linux (with zsh and a basic window manager, bspwm). I have set > GUIX_LOCPATH in ~/.zshenv and it appears correct in my shell. The > system-wide locale looks right. When I install postgresql it gives the > usual "warning: failed to install locale: Invalid argument". When I try > to initialise a database cluster, passing the locale doesn't work. > > Does anyone using Arch Linux and a basic WM know which file to put > GUIX_LOCPATH in so that the warning goes away? > > How can I find out what guix thinks its locale is or what are available? > > Is there a way to use initdb even though there is a locale warning? > > Shell experiments: > > $ locale > LANG=3Den_GB.UTF-8 > LC_CTYPE=3D"en_GB.UTF-8" > LC_NUMERIC=3D"en_GB.UTF-8" > LC_TIME=3D"en_GB.UTF-8" > LC_COLLATE=3D"en_GB.UTF-8" > LC_MONETARY=3D"en_GB.UTF-8" > LC_MESSAGES=3D"en_GB.UTF-8" > LC_PAPER=3D"en_GB.UTF-8" > LC_NAME=3D"en_GB.UTF-8" > LC_ADDRESS=3D"en_GB.UTF-8" > LC_TELEPHONE=3D"en_GB.UTF-8" > LC_MEASUREMENT=3D"en_GB.UTF-8" > LC_IDENTIFICATION=3D"en_GB.UTF-8" > LC_ALL=3D > > $ echo $GUIX_LOCPATH > /home/myles/.guix-profile/lib/locale What does =E2=80=9Cls $GUIX_LOCPATH/2.24=E2=80=9D show? You must make sure you have the =E2=80=98glibc-locales=E2=80=99 or =E2=80= =98glibc-utf8-locales=E2=80=99 that correspond to the glibc version of the program you are using (if you just installed postgresql, it=E2=80=99s using glibc 2.24.) Then you need to make sure GUIX_LOCPATH is set both in the environment of the postgresql daemon, and in the environment of the commands you invoke (initdb, etc.). HTH! Ludo=E2=80=99.