Help us understand the problem. What is going on with this article?

Couldn't find any console keymaps.となったときの対応方法

  • 環境 : Dockerで作ったコンテナのCentOS Linux release 7.8.2003 (Core)

事象 : キーマップを日本語にしたくて探したらなんかいわれた

# キーマップは英語じゃなくて、
$ localectl status
   System Locale: LANG=ja_JP.UTF-8
       VC Keymap: us
      X11 Layout: us

# 日本語にしたいと思って検索したらなんか言われた
$ localectl list-keymaps | grep jp
Couldn't find any console keymaps.

原因 : キーマップがインストールされていないから

メッセージ通り。

対応 : kbdパッケージをインストールする

# 1. yumを更新する
$ sudo yum update
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
...省略...
Complete!

# 2. kbdパッケージをインストールする
$ sudo yum install -y kbd
[sudo] password for ponsuke: 
Sorry, try again.
[sudo] password for ponsuke: 
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
 * base: d36uatko69830t.cloudfront.net
 * epel: iad.mirror.rackspace.com
 * extras: d36uatko69830t.cloudfront.net
 * updates: d36uatko69830t.cloudfront.net
Resolving Dependencies
--> Running transaction check
---> Package kbd.x86_64 0:1.15.5-15.el7 will be installed
--> Processing Dependency: kbd-misc = 1.15.5-15.el7 for package: kbd-1.15.5-15.el7.x86_64
--> Processing Dependency: kbd-legacy = 1.15.5-15.el7 for package: kbd-1.15.5-15.el7.x86_64
--> Running transaction check
---> Package kbd-legacy.noarch 0:1.15.5-15.el7 will be installed
---> Package kbd-misc.noarch 0:1.15.5-15.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=====================================================================================================================================
 Package                          Arch                         Version                              Repository                  Size
=====================================================================================================================================
Installing:
 kbd                              x86_64                       1.15.5-15.el7                        base                       348 k
Installing for dependencies:
 kbd-legacy                       noarch                       1.15.5-15.el7                        base                       466 k
 kbd-misc                         noarch                       1.15.5-15.el7                        base                       1.4 M

Transaction Summary
=====================================================================================================================================
Install  1 Package (+2 Dependent packages)

Total download size: 2.2 M
Installed size: 4.1 M
Downloading packages:
(1/3): kbd-1.15.5-15.el7.x86_64.rpm                                                                           | 348 kB  00:00:00     
(2/3): kbd-misc-1.15.5-15.el7.noarch.rpm                                                                      | 1.4 MB  00:00:00     
(3/3): kbd-legacy-1.15.5-15.el7.noarch.rpm                                                                    | 466 kB  00:00:00     
-------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                2.8 MB/s | 2.2 MB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : kbd-misc-1.15.5-15.el7.noarch                                                                                     1/3 
  Installing : kbd-legacy-1.15.5-15.el7.noarch                                                                                   2/3 
  Installing : kbd-1.15.5-15.el7.x86_64                                                                                          3/3 
  Verifying  : kbd-legacy-1.15.5-15.el7.noarch                                                                                   1/3 
  Verifying  : kbd-1.15.5-15.el7.x86_64                                                                                          2/3 
  Verifying  : kbd-misc-1.15.5-15.el7.noarch                                                                                     3/3 

Installed:
  kbd.x86_64 0:1.15.5-15.el7                                                                                                         

Dependency Installed:
  kbd-legacy.noarch 0:1.15.5-15.el7                                  kbd-misc.noarch 0:1.15.5-15.el7                                 

Complete!

# キーマップがはいった!
$ localectl list-keymaps | grep jp
jp
jp-OADG109A
jp-dvorak
jp-kana86
jp106

他の原因

今回は違うけどいつかのために・・・

ponsuke0531
びっくりするほど物覚えが悪いが、エンジニアを目指しています。
http://ponsuke-tarou.hatenablog.com/
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away