Thursday, 25 May 2023

apptainer と locale

localectl list-locales 使ってたんですが、これって systemd 依存らしく
apptainer base だと

  System has not been booted with systemd as init system (PID 1). Can't operate.
  Failed to connect to bus: Host is down

とかおっしゃる。これが、

  (load-file (let ((coding-system-for-read 'utf-8))
            (shell-command-to-string "agda-mode locate")))

と混じってしまう。どうも、

  locale -a

を使うのが良いらしい。zsh だとこうなのか。

  export LC_CTYPE=C.UTF-8
  if [[ -f /usr/bin/locale ]] then
   export LC_CTYPE=`locale -a | grep -i JP | grep -i UTF`
   if [[ $LC_CTYPE = "" ]] then
     export LC_CTYPE=C.UTF-8
   fi
  fi

apptainer の fakeroot も動いたので、これで一通りの物は動くかな。

No comments: