Solution 1:

Since Ubuntu 9.10, you just have to follow those few steps :

  • Install ibus-anthy
  • Go to System -> Preferences -> Keyboard input methods
  • Accept to activate iBus (pop-up window)
  • Add Japanese-Anthy in the Method tab
  • Disconnect and reconnect
  • Open an input field (like Gedit for instance), hit Control + Space ; you should be able to type Japanese characters

In order to have iBus launched automatically on boot, go to System -> Administration -> Languages and select iBus as the input method.

Solution 2:

To install Japanese input methods (Hiragana, Katagana, etc.) you need Mozc:

# apt install fcitx-mozc ibus-mozc mozc-data mozc-server mozc-utils-gui

In case you can select Japanese input methods but you are missing Japanese characters - i.e. you see empty squares or other incorrect characters instead expected Hiragana, Katagana signs etc. - follow: https://en.wikipedia.org/wiki/Help:Installing_Japanese_character_sets

In my case installing Takao fonts solved the issue:

# apt-get install fonts-takao