zoukankan      html  css  js  c++  java
  • emacs手动安装、解决不能使用中文输入法

    emacs的安装

    emacs的下载,解压

    wget http://mirrors.ustc.edu.cn/gnu/emacs/emacs-25.3.tar.gz
    tar -zxf emacs-25.3.tar.gz -C /opt/modules
    cd /opt/modules/emacs-25.3/
    

    编译安装

    ./configure --prefix=/usr/local --with-x-toolkit=gtk
    这里会报错。

    You seem to be running X, but no X development libraries
    were found.  You should install the relevant development files for X
    and for the toolkit you want, such as Gtk+, Lesstif or Motif.  Also make
    sure you have development files for image handling, i.e.
    tiff, gif, jpeg, png and xpm.
    If you are sure you want Emacs compiled without X window support, pass
      --without-x
    to configure.
    

    需要下载相关依赖
    sudo apt-get install libxpm-dev
    sudo apt-get install libjpeg62-dev
    sudo apt-get install libgif-dev
    sudo apt-get install libtiff5-dev
    sudo apt-get install libncurses5-dev
    sudo apt-get install libgtk2.0-dev

    重新编译后正常
    make
    sudo make install
    到此,emac的安装已经结束

    安装spacemacs

    spacemacs可以在emacs里使用vim的命令,让emacs更人性化一点。

    安装很简单,就是clone项目到~/.emacs.d目录去
    git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d

    安装完spacemacs,第一次启动emacs会加载很多包,没关系,等一会就好了

    解决emacs不能使用中文输入法

    我的环境是ubuntu16.04,系统语言是English,但是在vim里,gedit都可以输入中文。只有emacs不行,在网上查了原因,是emacs自带的一个bug,因为比较久远,不会再修复了
    这里在修复之前,已经安装了搜狗输入法

    这里的处理办法是:
    在 .bashrc文件下添加:
    export LC_CTYPE=zh_CN.UTF-8
    这样不会修改整个系统的环境,但是只针对自己这个用户来书,够用了。但是报了没有zh_CN.UTF-8这个文件

    原因是系统中还没有中文语言包
    这里安装一下:
    sudo apt-get install -y language-pack-zh-hans
    sudo apt-get install -y language-pack-zh-hant
    cd /usr/share/locales
    sudo ./install-language-pack zh_CN //开始安装zh_CN中文字符集

    这里的报错不用管
    然后重启电脑就好了。

  • 相关阅读:
    python3文件操作
    python3复习
    python3集合
    python购物车
    python小知识点总结
    python-review01
    python字典
    04day->python列表和元祖
    python字符串操作
    《令人拍案称奇的Mask RCNN》
  • 原文地址:https://www.cnblogs.com/goldenSky/p/11056431.html
Copyright © 2011-2022 走看看