File tree Expand file tree Collapse file tree 3 files changed +70
-0
lines changed Expand file tree Collapse file tree 3 files changed +70
-0
lines changed Original file line number Diff line number Diff line change 3333## 其他
3434
3535* [ 有哪些鲜为人知,但是很有意思的网站?] ( Useful-website.md )
36+ * [ Mac 安装中文版 man 帮助命令] ( mac-man-cn.md )
3637* [ PhpStorm] ( PhpStorm.md )
3738* [ Sublime] ( Sublime.md )
3839* [ Chrome] ( Chrome.md )
Original file line number Diff line number Diff line change 1+ # Mac 安装中文版 man 帮助命令
2+
3+ ![ ] ( ./Docs/Images/man-cn.png )
4+
5+ ## [ linux 环境安装] ( https://github.com/man-pages-zh/manpages-zh/blob/master/README.md )
6+
7+ ## macOS 环境安装
8+
9+ ### 编译工具安装
10+
11+ 因为需要编译安装,所以你电脑上需要有编译工具,运行下面两个命令安装
12+
13+ ``` bash
14+ $ brew install automake
15+ $ brew install opencc
16+ ```
17+
18+ ### 安装
19+
20+ ``` bash
21+ # 进入下载目录
22+ $ cd ~ /Downloads/
23+ # 下载最新版本的源码包
24+ $ wget https://github.com/man-pages-zh/manpages-zh/archive/v1.6.3.3.tar.gz
25+ # 解压源码包(atool命令,推荐安装这个工具,统一所有压缩文档的命令)
26+ $ atool -x v1.6.3.3.tar.gz
27+ # 或者使用这个命令解压
28+ $ tar zxvf v1.6.3.3.tar.gz
29+ # 进入源码包文件夹
30+ $ cd manpages-zh-1.6.3.2/
31+ # 编译安装 1
32+ $ autoreconf --install --force
33+ # 编译安装 2
34+ $ ./configure
35+ # 编译安装 3
36+ $ sudo make
37+ # 编译安装 4
38+ $ sudo make install
39+ # 配置别名(如果是 zsh 对应处理即可)
40+ $ echo " alias cman='man -M /usr/local/share/man/zh_CN'" >> ~ /.bash_profile
41+ # 使别名生效
42+ $ source ~ /.bash_profile
43+ # 我们就安装上了中文版本的 man 工具了,但是运行命令会发现乱码。
44+ cman ls
45+ ```
46+
47+ ### 安装 groff 新版本解决中文乱码的问题
48+
49+ ``` bash
50+ # 进入下载目录
51+ $ cd ~ /Downloads/
52+ # 下载1.22版本的源码包
53+ $ wget http://git.savannah.gnu.org/cgit/groff.git/snapshot/groff-1.22.tar.gz
54+ # 解压
55+ $ atool -x groff-1.22.tar.gz
56+ # 进入目录
57+ $ cd groff-1.22
58+ # 编译安装
59+ $ ./configure
60+ $ sudo make
61+ $ sudo make install
62+ # 打开配置文件
63+ $ sudo vim /etc/man.conf
64+ # 进入编辑器之后,在文件末尾添加
65+ ` NROFF preconv -e UTF8 | /usr/local/bin/nroff -Tutf8 -mandoc -c`
66+ # 保存退出
67+ # 运行命令,完美解决乱码问题
68+ cman ls
69+ ```
You can’t perform that action at this time.
0 commit comments