配置环境
- brew install autotools
- brew install python3
- brew install opencc
- brew install automake
下载源码
- https://github.com/man-pages-zh/manpages-zh
- 进入目录
- autoreconf --install --force #构建configure文件
- ./configure
- make
- sudo make install
更改man配置
- sudo vim /etc/man.conf
- 修改配置如下:
- MANPATH /usr/local/share/man #line 44
- MANPATH /usr/local/share/man/zh_CN #添加中文手册路径
解决乱码问题
- brew install groff
- sudo vim /etc/man.conf
- 修改配置如下:
- NROFF preconv -e utf8 | /usr/local/bin/groff -Wall -mtty-char -Tutf8 -mandoc -c
- PAGER /usr/bin/less -isR
完成!!!