Exception on `guix install nss-certs`

DoneSubmitted by Raimundo Martins.
Details
3 participants
  • Julien Lepiller
  • Leo Famulari
  • Raimundo Martins
Owner
unassigned
Severity
normal
R
R
Raimundo Martins wrote on 23 Oct 12:57 +0200
(name . bug-guix@gnu.org)(address . bug-guix@gnu.org)
q7aKeY7pvn3Z6oSoEzwQi11R4isz3AkAoanuUbqIOl9byMmlTIj-1RvYxmZwI12Kp2fd3zSvI71RD8yZahzdxpi3Z2lspEHRPL2nppIpqGY=@protonmail.com
Hi! I'm having an exception when trying to install nss-certs. I have glibc-utf8-locales installed, and even tried installing glibc-locales even though my LANG=en_US.UTF-8.I'm running Guix the package manager on top of Void Linux.I want to install nss-certs because curl, youtube-dl, and probably others all complain about failure to verify certificates. I'm mentioning this because it might be another bug altogether.
$ guix install nss-certsThe following package will be installed:nss-certs 3.59
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%0.1 MB will be downloadednss-certs-3.59 130KiB 1.0MiB/s 00:00 [######## ] 49.1%Backtrace:In guix/ui.scm:2185:7 19 (run-guix . _)2148:10 18 (run-guix-command _ . _)In ice-9/boot-9.scm:1752:10 17 (with-exception-handler _ _ #:unwind? _ # _)1752:10 16 (with-exception-handler _ _ #:unwind? _ # _)In guix/scripts/substitute.scm:771:15 15 (_)543:9 14 (process-substitution #<output: file 4> _ "/gnu/store/?" ?)In guix/serialization.scm:424:4 13 (fold-archive _ _ _ _)468:33 12 (read "/gnu/store/2f032p23rgga56kkn91q7hl0vzqyr7k5-nss?" ?)468:33 11 (read "/gnu/store/2f032p23rgga56kkn91q7hl0vzqyr7k5-nss?" ?)468:33 10 (read "/gnu/store/2f032p23rgga56kkn91q7hl0vzqyr7k5-nss?" ?)468:33 9 (read "/gnu/store/2f032p23rgga56kkn91q7hl0vzqyr7k5-nss?" ?)451:26 8 (read "/gnu/store/2f032p23rgga56kkn91q7hl0vzqyr7k5-nss?" ?)520:21 7 (_ "/gnu/store/2f032p23rgga56kkn91q7hl0vzqyr7k5-nss-ce?" ?)In ice-9/boot-9.scm:1747:15 6 (with-exception-handler #<procedure 7fbf3f8550f0 at ic?> ?)In unknown file:5 (symlink "NetLock_Arany_=Class_Gold=_F?tan?s?tv?ny:2.6?" ?)In ice-9/boot-9.scm:1685:16 4 (raise-exception _ #:continuable? _)1685:16 3 (raise-exception _ #:continuable? _)1780:13 2 (_ #<&compound-exception components: (#<&error> #<&orig?>)1685:16 1 (raise-exception _ #:continuable? _)1685:16 0 (raise-exception _ #:continuable? _)
ice-9/boot-9.scm:1685:16: In procedure raise-exception:Throw to key `encoding-error' with args `("scm_to_stringn" "cannot convert wide string to output locale" 84 #f #f)'.substitution of /gnu/store/2f032p23rgga56kkn91q7hl0vzqyr7k5-nss-certs-3.59 failedguix install: error: some substitutes for the outputs of derivation `/gnu/store/srh9xhqjd2r4giaq7x5gwbybqia6kc4r-nss-certs-3.59.drv' failed (usually happens due to networking issues); try `--fallback' to build derivation from source
PS: Great job on Guix!! With so many similar package managers out there, it was about time someone actually invented something new!
Attachment: file
L
L
Leo Famulari wrote on 23 Oct 22:04 +0200
(name . Raimundo Martins via Bug reports for GNU Guix)(address . bug-guix@gnu.org)(address . 51348@debbugs.gnu.org)
YXRqs5Wa4PMRGCaj@jasmine.lan
On Sat, Oct 23, 2021 at 10:57:20AM +0000, Raimundo Martins via Bug reports for GNU Guix wrote:
Toggle quote (3 lines)> Hi! I'm having an exception when trying to install nss-certs. I have glibc-utf8-locales installed, and even tried installing glibc-locales even though my LANG=en_US.UTF-8.> I'm running Guix the package manager on top of Void Linux.
Right, you can use glibc-utf8-locales (a random locale collectionintended for test purposes) to get en_US.UTF-8
Toggle quote (2 lines)> Throw to key `encoding-error' with args `("scm_to_stringn" "cannot convert wide string to output locale" 84 #f #f)'.
Did you set GUIX_LOCPATH, as suggested in the Application Setup sectionof the manual?
https://guix.gnu.org/manual/en/html_node/Application-Setup.html
I'm not sure exactly which context this error occurs in, but I recommendsetting GUIX_LOCPATH in two places:
1) Your user's login environment. That is, ~/.bash_profile or equivalentfor your shell, like this:
export GUIX_LOCPATH=$HOME/.guix-profile/lib/locale
Remember that you'll have to re-login to make it effective. This can bedone with `bash --login`.
2) The guix-daemon's environment. On Debian, that means adding a linelike this to the Service section of guix-daemon.service and reloadingand restarting the service:
Environment=GUIX_LOCPATH=/var/guix/profiles/per-user/root/guix-profile/lib/locale
Does Void Linux use runit instead of systemd? I'm sure there is a way toexport environment variables in service contexts with runit.
R
R
Raimundo Martins wrote on 25 Oct 23:15 +0200
Solved: Exception on `guix install nss-certs`
(name . 51348@debbugs.gnu.org)(address . 51348@debbugs.gnu.org)
ZbOKXUqDOv-sri3lRGcDD3owQBf_8Aebi9XKJTyAnaLg36KaLthb5DihEpMEuWbpG2HaV89z4934YHrHCkY1pIjNoogiZpP18jMeB1Dm1Bg=@protonmail.com
Hey!
Turns out that, since I use the runit init system, GUIX_LOCPATH wasn't being set anytime before guix-daemon started, since /etc/profile.d/guix.sh was not sourced.As a fix I set that variable by hand in my init script.If you want to have runit as a known init system in the installer script, I suggest adding to chk_init_sys()
elif $(runit 2>/dev/null; [ $? = 111 ]); then _msg "${INF}init system is: runit" INIT_SYS="runit" return 0
and to the case in sys_enable_guix_daemon()
runit)mkdir /etc/sv/guix-daemonecho "#!/bin/shGUIX_LOCPATH=/var/guix/profiles/per-user/root/guix-profile/lib/locale exec /var/guix/profiles/per-user/root/current-guix/bin/guix-daemon --build-users-group=guixbuild" >/etc/sv/guix-daemon/runchmod 755 /etc/sv/guix-daemon/runln -sT /etv/sv/guix-daemon /var/service/guix-daemon;;
Or something like that :P Thanks for your support in IRC #guix !!
Regards,Raimundo
Attachment: file
J
J
Julien Lepiller wrote on 28 Oct 00:32 +0200
(address . 51348-done@debbugs.gnu.org)(name . Raimundo Martins)(address . raimundomartins@protonmail.com)
20211028003239.518a5d9c@tachikoma.lepiller.eu
Le Mon, 25 Oct 2021 21:15:23 +0000,Raimundo Martins via Bug reports for GNU Guix <bug-guix@gnu.org> aécrit :
Toggle quote (29 lines)> Hey!> > Turns out that, since I use the runit init system, GUIX_LOCPATH> wasn't being set anytime before guix-daemon started, since> /etc/profile.d/guix.sh was not sourced. As a fix I set that variable> by hand in my init script. If you want to have runit as a known init> system in the installer script, I suggest adding to chk_init_sys()> > elif $(runit 2>/dev/null; [ $? = 111 ]); then> _msg "${INF}init system is: runit"> INIT_SYS="runit"> return 0> > and to the case in sys_enable_guix_daemon()> > runit)> mkdir /etc/sv/guix-daemon> echo "#!/bin/sh> GUIX_LOCPATH=/var/guix/profiles/per-user/root/guix-profile/lib/locale> exec /var/guix/profiles/per-user/root/current-guix/bin/guix-daemon> --build-users-group=guixbuild" >/etc/sv/guix-daemon/run chmod 755> /etc/sv/guix-daemon/run ln -sT /etv/sv/guix-daemon> /var/service/guix-daemon ;;> > Or something like that :P Thanks for your support in IRC #guix !!> > Regards,> Raimundo
Great news!
I'm closing this bug properly for you :) Note that you can close yourreports by sending to nnnnn-done@debbugs.gnu.org, where nnnnn is yourbug number.
I think it would make sense to support runit. I guess I would need a VMof a distro that uses runit, in order to test an updated installationscript. Which one do you use exactly?
Closed
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send email to 51348@debbugs.gnu.org