Locales not set up correctly

DoneSubmitted by Matthew Kraai.
Details
2 participants
  • Matthew Kraai
  • zimoun
Owner
unassigned
Severity
normal
M
M
Matthew Kraai wrote on 27 Apr 2020 14:29
(address . bug-guix@gnu.org)
20200427122943.GA25049@inspiron-3147
Hi,
After I launch an EC2 instance using the official Debian 10 Buster AMIand run the attached script, which should match the installationinstructions in the manual, the locales don't seem to be set upproperly. For example,
```$ guix package -i nss-certsguile: warning: failed to install localehint: Consider installing the `glibc-utf8-locales' or `glibc-locales' package anddefining `GUIX_LOCPATH', along these lines:
guix package -i glibc-utf8-locales export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale"
See the "Application Setup" section in the manual, for more info.
guix package: warning: Consider running 'guix pull' followed by'guix package -u' to get up-to-date packages and security updates.
The following package will be installed: nss-certs 3.50
substitute: /gnu/store/29jhbbg1hf557x8j53f9sxd9imlmf02a-bash-minimal-5.0.7/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.utf8)0.1 MB will be downloaded: /gnu/store/0y63pfqi2626nwsjbksrci1jyd62cxx8-nss-certs-3.50/gnu/store/29jhbbg1hf557x8j53f9sxd9imlmf02a-bash-minimal-5.0.7/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.utf8)downloading from https://ci.guix.gnu.org/nar/lzip/0y63pfqi2626nwsjbksrci1jyd62cxx8-nss-certs-3.50... nss-certs-3.50 133KiB 189KiB/s 00:00 [######## ] 48.3%Backtrace:In ice-9/boot-9.scm: 1736:10 4 (with-exception-handler _ _ #:unwind? _ # _)In unknown file: 3 (apply-smob/0 #<thunk 7f6763f15400>)In ice-9/boot-9.scm: 718:2 2 (call-with-prompt _ _ #<procedure default-prompt-handle?>)In ice-9/eval.scm: 619:8 1 (_ #(#(#<directory (guile-user) 7f6763b17f00>)))In guix/ui.scm: 1936:12 0 (run-guix-command _ . _)
guix/ui.scm:1936:12: In procedure run-guix-command:Throw to key `encoding-error' with args `("scm_to_stringn" "cannot convert wide string to output locale" 84 #f #f)'.substitution of /gnu/store/0y63pfqi2626nwsjbksrci1jyd62cxx8-nss-certs-3.50 failedguix package: error: some substitutes for the outputs of derivation `/gnu/store/mxp55201zl6wm2d82xdjnc8qa7qwgr85-nss-certs-3.50.drv' failed (usually happens due to networking issues); try `--fallback' to build derivation from source ```
-- Matthew Kraai
Attachment: install_guix.sh
Z
Z
zimoun wrote on 27 Apr 2020 14:53
(name . Matthew Kraai)(address . kraai@ftbfs.org)(address . 40899@debbugs.gnu.org)
CAJ3okZ0vAzM2zwZqyN7PhvFZMxCay62yeU+Bz0ig5tL62hg=Tg@mail.gmail.com
Dear,
On Mon, 27 Apr 2020 at 14:30, Matthew Kraai <kraai@ftbfs.org> wrote:
Toggle quote (3 lines)> $ guix package -i nss-certs> guile: warning: failed to install locale
There 3 points:
a) "guix install glibc-utf8-locales" as root because of the daemonand restart it. (depending on your system init, an extra config shouldbe required) b) "guix install glibc-utf8-locales" as regular user
This should fix the locales issues.
Note that depending on your locale, glibc-utf8-locles should notprovide it. (The term utf8 could be misleading). But en_US is providedby it.


Toggle quote (2 lines)> guix package: error: some substitutes for the outputs of derivation `/gnu/store/mxp55201zl6wm2d82xdjnc8qa7qwgr85-nss-certs-3.50.drv' failed (usually happens due to networking issues); try `--fallback' to build derivation from source
c) Try: guix install nss-certs --fallback

Hope that helps,simon
M
M
Matthew Kraai wrote on 28 Apr 2020 09:56
(name . zimoun)(address . zimon.toutoune@gmail.com)(address . 40899@debbugs.gnu.org)
20200428075632.GA4166@inspiron-3147
Hi simon,
On Mon, Apr 27, 2020 at 02:53:17PM +0200, zimoun wrote:
Toggle quote (11 lines)> On Mon, 27 Apr 2020 at 14:30, Matthew Kraai <kraai@ftbfs.org> wrote:> > > $ guix package -i nss-certs> > guile: warning: failed to install locale> > There 3 points:> > a) "guix install glibc-utf8-locales" as root because of the daemon> and restart it. (depending on your system init, an extra config should> be required)
I modified the script to run the following commands as root:
```guix package -i glibc-utf8-localessystemctl restart guix-daemon```
Toggle quote (2 lines)> b) "guix install glibc-utf8-locales" as regular user
The script was already doing this.
Toggle quote (6 lines)> This should fix the locales issues.> > Note that depending on your locale, glibc-utf8-locles should not> provide it. (The term utf8 could be misleading). But en_US is provided> by it.
When I run guix, it still produces the same locale messages:
```$ guix package -Iguile: warning: failed to install localehint: Consider installing the `glibc-utf8-locales' or `glibc-locales' packageand defining `GUIX_LOCPATH', along these lines:
guix package -i glibc-utf8-locales export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale"
See the "Application Setup" section in the manual, for more info.
glibc-utf8-locales 2.29 out /gnu/store/n79cf8bvy3k96gjk1rf18d36w40lkwlr-glibc-utf8-locales-2.29```
Toggle quote (5 lines)> > guix package: error: some substitutes for the outputs of derivation `/gnu/store/mxp55201zl6wm2d82xdjnc8qa7qwgr85-nss-certs-3.50.drv' failed (usually happens due to networking issues); try `--fallback' to build derivation from source> > c) Try:> guix install nss-certs --fallback
The --fallback option works. Thank you for the suggestion.
-- Matthew Kraai
Z
Z
zimoun wrote on 28 Apr 2020 10:14
(name . Matthew Kraai)(address . kraai@ftbfs.org)(address . 40899@debbugs.gnu.org)
CAJ3okZ2mOg06Pcsrarwg8w_ijWNd3sFXr=-8dGV9yFPy=EYopA@mail.gmail.com
On Tue, 28 Apr 2020 at 09:56, Matthew Kraai <kraai@ftbfs.org> wrote:
Toggle quote (16 lines)> When I run guix, it still produces the same locale messages:>> ```> $ guix package -I> guile: warning: failed to install locale> hint: Consider installing the `glibc-utf8-locales' or `glibc-locales' package> and defining `GUIX_LOCPATH', along these lines:>> guix package -i glibc-utf8-locales> export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale">> See the "Application Setup" section in the manual, for more info.>> glibc-utf8-locales 2.29 out /gnu/store/n79cf8bvy3k96gjk1rf18d36w40lkwlr-glibc-utf8-locales-2.29> ```
Hum? Did you set GUIX_LOCPATH?
M
M
Matthew Kraai wrote on 28 Apr 2020 10:34
(name . zimoun)(address . zimon.toutoune@gmail.com)(address . 40899@debbugs.gnu.org)
20200428083420.GB4166@inspiron-3147
On Tue, Apr 28, 2020 at 10:14:13AM +0200, zimoun wrote:
Toggle quote (20 lines)> On Tue, 28 Apr 2020 at 09:56, Matthew Kraai <kraai@ftbfs.org> wrote:> > > When I run guix, it still produces the same locale messages:> >> > ```> > $ guix package -I> > guile: warning: failed to install locale> > hint: Consider installing the `glibc-utf8-locales' or `glibc-locales' package> > and defining `GUIX_LOCPATH', along these lines:> >> > guix package -i glibc-utf8-locales> > export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale"> >> > See the "Application Setup" section in the manual, for more info.> >> > glibc-utf8-locales 2.29 out /gnu/store/n79cf8bvy3k96gjk1rf18d36w40lkwlr-glibc-utf8-locales-2.29> > ```> > Hum? Did you set GUIX_LOCPATH?
Yes,
```admin@ip-172-31-11-27:~$ echo $GUIX_LOCPATH/home/admin/.guix-profile/lib/localeadmin@ip-172-31-11-27:~$ guix package -Iguile: warning: failed to install localehint: Consider installing the `glibc-utf8-locales' or `glibc-locales' packageand defining `GUIX_LOCPATH', along these lines:
guix package -i glibc-utf8-locales export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale"
See the "Application Setup" section in the manual, for more info.
glibc-utf8-locales 2.29 out /gnu/store/n79cf8bvy3k96gjk1rf18d36w40lkwlr-glibc-utf8-locales-2.29```
-- Matthew Kraai
Z
Z
zimoun wrote on 28 Apr 2020 11:15
(name . Matthew Kraai)(address . kraai@ftbfs.org)(address . 40899@debbugs.gnu.org)
CAJ3okZ06dRzLOfXT1yz==uyAcNOLXjOYGitktFZOYsNt-+B+zA@mail.gmail.com
Is 'admin' the regular user or another name for the 'root' account?
On the Debian foreign distro, for GUIX_LOCPATH, I have:
- root account: /root/.guix-profile/lib/local - regular user: /home/kikoo/.guix-profile/lib/locale
Hope that helps,simon
M
M
Matthew Kraai wrote on 28 Apr 2020 12:59
(name . zimoun)(address . zimon.toutoune@gmail.com)(address . 40899@debbugs.gnu.org)
20200428105951.GA21407@inspiron-3147
On Tue, Apr 28, 2020 at 11:15:58AM +0200, zimoun wrote:
Toggle quote (7 lines)> Is 'admin' the regular user or another name for the 'root' account?> > On the Debian foreign distro, for GUIX_LOCPATH, I have:> > - root account: /root/.guix-profile/lib/local> - regular user: /home/kikoo/.guix-profile/lib/locale
'admin' is the regular user.
I think the problem is that LANG is set to 'C.UTF-8' by default. If Ichange the contents of /etc/default/locale from
LANG=C.UTF-8
to
LANG=en_US.UTF-8
I no longer see the error installing nss-certs.
-- Matthew Kraai
Z
Z
zimoun wrote on 28 Apr 2020 13:04
(name . Matthew Kraai)(address . kraai@ftbfs.org)(address . 40899-done@debbugs.gnu.org)
CAJ3okZ2UmEjY5GobW=Q-f5quWsMc2Hu3kmmOsRoBrJ+O5e-4kg@mail.gmail.com
On Tue, 28 Apr 2020 at 12:59, Matthew Kraai <kraai@ftbfs.org> wrote:

Toggle quote (9 lines)> I think the problem is that LANG is set to 'C.UTF-8' by default. If I> change the contents of /etc/default/locale from>> LANG=C.UTF-8>> to>> LANG=en_US.UTF-8
Ah yes. :-)

So closing.
Closed
?