{"id":4051,"date":"2024-07-29T07:06:33","date_gmt":"2024-07-28T22:06:33","guid":{"rendered":"https:\/\/matoken.org\/blog\/?p=4051"},"modified":"2024-07-29T08:17:30","modified_gmt":"2024-07-28T23:17:30","slug":"mcomix-did-not-start-because-locale-was-wrong","status":"publish","type":"post","link":"https:\/\/matoken.org\/blog\/2024\/07\/29\/mcomix-did-not-start-because-locale-was-wrong\/","title":{"rendered":"locale \u304c\u9593\u9055\u3063\u3066\u3044\u3066 MComix \u304c\u8d77\u52d5\u3057\u306a\u304b\u3063\u305f"},"content":{"rendered":"<div class=\"paragraph\">\n<p>\u6700\u8fd1\u65b0\u3057\u304f\u7aef\u672b\u3092\u8cfc\u5165\u3057\uff0c\u4f8b\u306b\u3088\u3063\u3066 Debian sid \u3092\u5165\u308c\u3066\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u4e2d\u3067\u3059\uff0e<br \/>\n\u3057\u304b\u3057\uff0c MComix \u304c\u8d77\u52d5\u3057\u307e\u305b\u3093\uff0e<\/p>\n<\/div>\n<p><!--more--><\/p>\n<div class=\"paragraph\">\n<p>\u7aef\u672b\u3067\u8a66\u3059\u3068\u3053\u306e\u3088\u3046\u306a\u30a8\u30e9\u30fc\uff0e<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre>$ mcomix\nTraceback (most recent call last):\n    File \"\/usr\/bin\/mcomix\", line 8, in &lt;module&gt;\n        sys.exit(main())\n                 ^^^^^^\n      File \"\/usr\/lib\/python3\/dist-packages\/mcomix\/__main__.py\", line 26, in main\n        run()\n      File \"\/usr\/lib\/python3\/dist-packages\/mcomix\/run.py\", line 154, in run\n        i18n.install_gettext()\n      File \"\/usr\/lib\/python3\/dist-packages\/mcomix\/i18n.py\", line 82, in install_gettext\n        lang = portability.get_default_locale()\n               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n      File \"\/usr\/lib\/python3\/dist-packages\/mcomix\/portability.py\", line 49, in get_default_locale\n        lang, _ = locale.getdefaultlocale((\"LANGUAGE\", \"LC_ALL\", \"LC_MESSAGES\", \"LANG\"))\n                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n      File \"\/usr\/lib\/python3.12\/locale.py\", line 549, in getdefaultlocale\n        return _getdefaultlocale(envvars)\n               ^^^^^^^^^^^^^^^^^^^^^^^^^^\n      File \"\/usr\/lib\/python3.12\/locale.py\", line 579, in _getdefaultlocale\n        return _parse_localename(localename)\n               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n      File \"\/usr\/lib\/python3.12\/locale.py\", line 496, in _parse_localename\n        raise ValueError('unknown locale: %s' % localename)\n    ValueError: unknown locale: ja_JP-UTF-8\n$ env | grep ja_JP-UTF-8\nLANGUAGE=ja_JP-UTF-8<\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>locale \u304c <code>ja_JP-UTF-8<\/code> \u3068 <code>ja_JP.UTF-8<\/code> \u306e Typo \u3089\u3057\u304d\u3082\u306e\u306b\u306a\u3063\u3066\u304a\u308a\u77e5\u3089\u306a\u3044 locale \u3060\u3068\u3044\u3046\u3053\u3068\u3067\u8d77\u52d5\u306b\u5931\u6557\u3057\u3066\u3044\u308b\u3088\u3046\u3067\u3059\uff0e<br \/>\n<code>$ LANGUAGE=ja_JP.UTF-8 mcomix<\/code> \u3068\u3059\u308b\u3068\u8d77\u52d5\u3057\u307e\u3059\uff0e<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p><code>ja_JP-UTF-8<\/code> \u3092\u3069\u3053\u304b\u3067\u9593\u9055\u3063\u3066\u8a2d\u5b9a\u3057\u3066\u3057\u307e\u3063\u305f\u306e\u3060\u308d\u3046\u3068\u63a2\u3059\u3068 <code>\/etc\/locale.conf<\/code> \u306b\u898b\u3064\u3051\u307e\u3057\u305f\uff0e<br \/>\n\u3053\u308c\u3092 <code>ja_JP.UTF-8<\/code> \u306b\u4fee\u6b63\uff0c\u518d\u8d77\u52d5\u3059\u308b\u3053\u3068\u3067\u4fee\u6b63\u3055\u308c\u307e\u3057\u305f\uff0e<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre>$ sudo localectl set-locale ja_JP.UTF-8\n$ sudo git -C \/etc diff locale.conf\ndiff --git a\/locale.conf b\/locale.conf\nindex ee5c432..6345544 100644\n--- a\/locale.conf\n+++ b\/locale.conf\n@@ -1,2 +1,2 @@\n LANG=ja_JP.UTF-8\n-LANGUAGE=ja_JP-UTF-8\n+LANGUAGE=ja_JP.UTF-8<\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p><code>\/etc\/locale.conf<\/code> \u306f systemd \u306e\u3082\u306e\u306e\u3088\u3046\u3067\u3059\uff0e<br \/>\n<code>\/etc\/locale.conf<\/code> \u304c\u30b7\u30b9\u30c6\u30e0\u30ef\u30a4\u30c9\u306e\u8a2d\u5b9a\uff0c <code>~\/.config\/locale.conf<\/code> \u304c\u30e6\u30fc\u30b6\u30fc\u306e\u8a2d\u5b9a\u306e\u3088\u3046\u3067\u3059\uff0e<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3053\u306e\u3088\u3046\u306b\u5909\u66f4\u3057\u307e\u3057\u305f\uff0e<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre>$ localectl set-locale LANG=C\n$ cat \/etc\/locale.conf\nLANG=C\n$ cat ~\/.config\/locale.conf\nLANG=ja_JP.UTF-8\nLANGUAGE=ja_JP.UTF-8\nLC_NUMERIC=en_US.UTF-8\nLC_TIME=en_US.UTF-8\n\n\n$ systemctl reboot<\/pre>\n<\/div>\n<p>\u3057\u304b\u3057\uff0c ~\/.config\/locale.conf \u306f\u3046\u307e\u304f\u53cd\u6620\u3055\u308c\u306a\u304b\u3063\u305f\u306e\u3067\u7d50\u5c40\u3044\u3064\u3082\u306e ~\/.profile \u3067\u8a2d\u5b9a\u3057\u76f4\u3057\u307e\u3057\u305f\uff0e<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre>$ locale\nLANG=ja_JP.UTF-8\nLANGUAGE=ja_JP.UTF-8\nLC_CTYPE=\"ja_JP.UTF-8\"\nLC_NUMERIC=en_US.UTF-8\nLC_TIME=en_US.UTF-8\nLC_COLLATE=\"ja_JP.UTF-8\"\nLC_MONETARY=\"ja_JP.UTF-8\"\nLC_MESSAGES=\"ja_JP.UTF-8\"\nLC_PAPER=\"ja_JP.UTF-8\"\nLC_NAME=\"ja_JP.UTF-8\"\nLC_ADDRESS=\"ja_JP.UTF-8\"\nLC_TELEPHONE=\"ja_JP.UTF-8\"\nLC_MEASUREMENT=\"ja_JP.UTF-8\"\nLC_IDENTIFICATION=\"ja_JP.UTF-8\"\nLC_ALL=<\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>\u3053\u306e\u74b0\u5883\u306f\uff0cDebian testing \u306e 20240718 \u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u3067\u5c0e\u5165\u3057\u3066\u3059\u3050\u306b sid \u306b\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3057\u305f\u3082\u306e\u3067\u3059\uff0e<br \/>\nloale \u306f <code>ja_JP.UTF-8, en_US.UTF-8, C.UTF-8<\/code> \u3092\u30c6\u30ad\u30b9\u30c8\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u30fc\u304b\u3089\u9078\u629e\uff0c <code>ja_JP.UTF-8<\/code> \u3092\u30c7\u30d5\u30a9\u30eb\u30c8\u30ed\u30b1\u30fc\u30eb\u306b\uff0e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5f8c sid \u306b dist-upgrade \u3057\u3066\u624b\u52d5\u8a2d\u5b9a\u3092\u4e0b\u899a\u3048\u306e\u306a\u3044\u74b0\u5883\u3067\u3059\uff0e<br \/>\n\u6298\u3092\u898b\u3066\u518d\u5ea6\u8a66\u3057\u3066\u307f\u305f\u3044\u3068\u3053\u308d\u3067\u3059\uff0e<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre>$ dpkg-query -W locales systemd\nlocales 2.39-6\nsystemd 256.4-2\n$ lsb_release -dr\nDescription:    Debian GNU\/Linux trixie\/sid\nRelease:        n\/a\n$ arch\nx86_64<\/pre>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u65b0\u3057\u304f\u7aef\u672b\u3092\u8cfc\u5165\u3057\uff0c\u4f8b\u306b\u3088\u3063\u3066 Debian sid \u3092\u5165\u308c\u3066\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u4e2d\u3067\u3059\uff0e \u3057\u304b\u3057\uff0c MComix \u304c\u8d77\u52d5\u3057\u307e\u305b\u3093\uff0e<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"webmentions_disabled_pings":false,"webmentions_disabled":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"federated","footnotes":""},"categories":[7,6,199],"tags":[483,484],"class_list":["post-4051","post","type-post","status-publish","format-standard","hentry","category-debian-linux","category-linux","category-sid","tag-locales","tag-mcomix"],"_links":{"self":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts\/4051","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/comments?post=4051"}],"version-history":[{"count":2,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts\/4051\/revisions"}],"predecessor-version":[{"id":4057,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts\/4051\/revisions\/4057"}],"wp:attachment":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/media?parent=4051"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/categories?post=4051"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/tags?post=4051"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}