0, update the software source

sudo apt-get update

1. Install Fcitx framework and Googlepinyin input method

sudo apt-get install -y fcitx fcitx-googlepinyin

2. Restart

sudo reboot

3. Enable Googlepinyin input method

1) Input method setting: Preferences–>Fcitx Configuration
Insert picture description here

2) Add Google Pinyin: You need to remove the “Only Show Current Language” tick, because the system defaults to English, so the Chinese input method will be blocked by the system and will not be displayed.

Insert picture description here
3) After selecting it, click “OK”, and the Chinese input method can be used.

Insert picture description here

https://www.codetd.com/en/article/12791717