以上办法一般可以解决RStudio在ubuntu中的中文输入问题。若存在依赖,如出现:
The following packages have unmet dependencies:
fcitx-frontend-qt5-rstudio : Depends: qtbase-abi-5-5-1 but it is not installable
E: Unable to correct problems, you have held broken packages.
等提示,无法apt安装时,可采用以下方法解决:
解压deb包:
把解压出来的文件fcitx-frontend-qt5-rstudio/usr/lib/rstudio/bin/plugins/platforminputcontexts/下的对应文件拷贝到系统/usr/lib/rstudio/目录下面对应的位置,然后再解压第二个deb包:
把解压目录对应的libfcitx-qt5-rstudio/usr/lib/rstudio/bin里面的四个文件拷贝到/usr/lib/rstudio/bin目录下(新版本的Rstudio可能已经有这四个文件了),重新启动rstudio即可。