zoukankan      html  css  js  c++  java
  • mac os安装shell man中文帮助工具(manpages-zh),即man命令显示中文帮助文档

    一、从官网http://pkgs.fedoraproject.org/repo/pkgs/man-pages-zh-CN)下载安装包;或者从开源代码(https://github.com/man-pages-zh/manpages-zh)网址下载

    二、解压安装包,发现configure.ac,需要安装autoconf和autoconf;

    三、安装autoconf和automake

      1、安装brew:如果已经安装brew,跳过此步骤。

        从brew官网https://brew.sh)复制安装命令,粘贴在终端中执行:

        /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

      2、安装autoconf、automake、python3、opencc四个依赖
        brew install autoconf

        brew install automake 

        brew install python3

        brew install opencc

    四、(1)生成manpages-zh安装程序,并安装

      autoscan .  //在当前文件夹中搜索  

      vi configure.ac //编辑文件  

    1.     编辑configure.ac,加入下面一行:  
    2.     AM_INIT_AUTOMAKE(hello,1.0)      //automake所必备的宏,必须添加  

      aclocal     //执行aclocal生成aclocal.m4文件  

      autoconf   //执行autoconf生成configure文件  

      autoheader  

      automake --add-missing  

      touch NEWS; touch README; touch AUTHORS; touch ChangeLog    //创建NEWS等文件,如果没有自动生成,手工创建  

      automake --add-missing //再运行一次  

      ./configure    //配置,生成Makefile文件  

      make     //执行make命令  

      sudo make install

      ./configure --prefix=/usr/local/zhman --disable-zhtw   //最后执行./configure加上一些参数,确保设置简体中文成功

    四、(2)

    官网https://github.com/man-pages-zh/manpages-zh)安装方法(我未试过)

      一、构建依赖包括: 

        autotools (autoconf, automake)

        python3

        opencc 1.x

      二、“编译”安装

      autoreconf --install --force
      ./configure
      make
      sudo make install # 需要超级用户权限

     

    五、修改/etc/man.conf,将几处/usr/local/share/man全部改为/usr/local/share/man/zh_CN

     

    六、解决乱码

      brew install groff

      打开/etc/man.conf,在文件最后加上如下代码: 

      NROFF preconv -e UTF8 | /usr/local/bin/nroff -Tutf8 -mandoc -c

     

  • 相关阅读:
    wpf 获取datagrid中模板中控件
    WPF DataGrid DataGridTemplateColumn 控制模板中控件
    ztree实现拖拽移动和复制
    layui的select监听
    layui父页面获取子页面数据
    win10安装网络适配器
    bat启动OpenOffice4
    java注解简单使用
    win7安装IIS
    java的Array和List相互转换
  • 原文地址:https://www.cnblogs.com/wujinhong/p/7251376.html
Copyright © 2011-2022 走看看