2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

AlmaLinux 上のgitlab runnerがsetlocale: LC_CTYPE: cannot change locale (en_US.UTF-8) のエラーを吐く

Posted at

AlmaLinux9.1にGitLabをインストールする - Qiita の環境。

c# でmvc6 coreプロジェクトに外部のAPIとswaggerを使って連携したコードをPushしたところgitlab-runnerが

setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8)

のエラーを吐いてFailするようになった。

原因は多分これ。 NuGet Gallery | NSwag.ApiDescription.Client 13.18.2

原因調査

setlocaleで失敗するって権限かlankpackか

[root@localhost ~]# locale -a
C
C.utf8
POSIX
ja_JP.eucjp
ja_JP.utf8

あ、en_us入ってない。

言語パックインストール

[root@localhost ~]# dnf install langpacks-en glibc-langpack-en
Dependencies resolved.
======================================================================================
 Package                   Architecture   Version              Repository    Size
======================================================================================
Installing:
 glibc-langpack-en         x86_64         2.34-40.el9_1.1      baseos        558 k
 langpacks-en              noarch         3.0-16.el9           appstream     9.4 k
Installing dependencies:
 langpacks-core-en         noarch         3.0-16.el9           appstream     9.4 k

Transaction Summary
======================================================================================
Install  3 Packages

Total download size: 577 k
Installed size: 5.7 M
Is this ok [y/N]: y

で、OK。

[root@localhost ~]# locale -a
C
C.utf8
POSIX
en_AG
en_AU
en_AU.utf8
en_BW
en_BW.utf8
en_CA
en_CA.utf8
en_DK
en_DK.utf8
en_GB
en_GB.iso885915
en_GB.utf8
en_HK
en_HK.utf8
en_IE
en_IE.utf8
en_IE@euro
en_IL
en_IN
en_NG
en_NZ
en_NZ.utf8
en_PH
en_PH.utf8
en_SC.utf8
en_SG
en_SG.utf8
en_US
en_US.iso885915
en_US.utf8
en_ZA
en_ZA.utf8
en_ZM
en_ZW
en_ZW.utf8
ja_JP.eucjp
ja_JP.utf8

参考

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?