CENTOS7安装搜狗输入法记录
重点:不要卸载ibus!卸载ibus时会把gnome的依赖给删了,图形界面直接搞没。
1.下载搜狗的包:
wget cdn2.ime.sogou.com/dl/index/1524572264/sogoupinyin_2.2.0.0108_amd64.deb?st=jpTlz-vO-Of4mW1f10EBCg&e=1570252581&fn=sogoupinyin_2.2.0.0108_amd64.deb
2.因为直接下载出名字有问题,下载好的文件重命名
mv sogoupinyin_2.2.0.0108_amd64.deb?st=jpTlz-vO-Of4mW1f10EBCg sogoupinyin_2.2.0.0108_amd64.deb
3.安装fctix和其他组件,有报错缺少的按照报错安装
yum -y install fcitx-configtool libQtWebKit* fcitx
4.解压下载出来的deb,取出其中的.so文件,放在fcitx的驱动目录
ar -x sogoupinyin_2.2.0.0108_amd64.deb
tar -zxvf data.tar.xz -C
cp /usr/lib/x86_64-linux-gnu/fcitx/fcitx-sogoupinyin.so /usr/lib64/fcitx/ # 这一步是关键
5.配置fcitx环境变量
cat >> /etc/profile << EOF
export XMODIFIERS=@im=fcitx
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XIM=fcitx
EOF
6.切换输入法到fcitx
sudo imsettings-switch fcitx # 这一步需要切换到自己的用户,而且需要系统有im-chooser,若没有,yum安装
7.设置默认输入法fcitx
alternatives --config xinputrc --> 5 # 找到自己机器上对应的那个数(本人是 /etc/X11/xinit/xinput.d/fcitx.conf)
echo '/usr/bin/fcitx &> /dev/null' >> /etc/bashrc
8.注销OR重启
登录后可以在右上角配置输入法的地方选择搜狗输入法。
输入法安装完成之后发现在pycharm上输入框固定在左下角,无法跟随光标移动,作为强迫症,去看了大佬的编译JDK方法,自己照着编译了一下,完美解决,膝盖送上。
https://blog.csdn.net/qq_41859728/article/details/109187748
编译过程中报错有GLIBC_2.27缺失,执行如下命令:
其中configure 这一步会检查所安装的各个组件的版本,如果报错,在build目录下有LOG文件,可以查看其中内容,安装相应的部分。
wget http://ftp.gnu.org/gnu/glibc/glibc-2.27.tar.gz
tar zxvf glibc-2.27.tar.gz
cd glibc-2.27
mkdir build
cd build
../configure --prefix=/opt/glibc-2.27
make -j4
sudo make install
export LD_LIBRARY_PATH="/opt/glibc-2.27/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
个人报错有GCC的版本低,要求4.9以上,本机默认是4.8,GCC 4.9安装流程:
wget http://mirrors-usa.go-parts.com/gcc/releases/gcc-4.9.3/gcc-4.9.3.tar.bz2
tar jxf ~/software/gcc-4.9.3.tar.bz2
cd gcc-4.9.3/
./contrib/download_prerequisites
mkdir ../gcc-build
cd ../gcc-build
../gcc-4.9.3/configure --prefix=/opt/sysoft/gcc-4.9.3 --enable-multilib --with-system-zlib
make -j 4 # 这一步用时较久,可以刷下leetcode放松一下
make install
cd ../ && rm -rf gcc-build/gcc-4.9.3/
# 添加环境变量
echo 'export PKG_CONFIG_PATH=/opt/sysoft/gcc-4.9.3/lib/pkgconfig:$PKG_CONFIG_PATH' >> ~/.bashrc.gcc
echo 'export LD_LIBRARY_PATH=/opt/sysoft/gcc-4.9.3/lib64:/opt/sysoft/gcc-4.9.3/lib:$LD_LIBRARY_PATH' >> ~/.bashrc.gcc
echo 'export C_INCLUDE_PATH=/opt/sysoft/gcc-4.9.3/include:$C_INCLUDE_PATH' >> ~/.bashrc.gcc
echo 'PATH=/opt/sysoft/gcc-4.9.3/bin/:$PATH' >> ~/.bashrc.gcc
source ~/.bashrc.gcc
参考链接:
https://blog.csdn.net/qq_41859728/article/details/109187748