在mac上,
mkdir nim
cd nim
wget https://github.com/nim-lang/nightlies/releases/download/latest-version-1-6/macosx_x64.tar.xz
tar xvf macosx_x64.tar.xz
yudeMacBook-Air:nim ym$ ls
macosx_x64.tar.xz nim-1.6.7
yudeMacBook-Air:nim ym$ cd nim-1.6.7
yudeMacBook-Air:nim-1.6.7 ym$ ls
bin copying.txt icons lib tests
compiler deinstall.sh install.sh nimpretty tools
compiler.nimble dist koch nimsuggest
config doc koch.nim testament
yudeMacBook-Air:nim-1.6.7 ym$ cd bin
yudeMacBook-Air:bin ym$ ls
atlas nim-gdb nimble nimpretty testament
nim nim_dbg nimgrep nimsuggest
yudeMacBook-Air:bin ym$ pwd
/Users/ym/nim/nim-1.6.7/bin
yudeMacBook-Air:bin ym$ sudo nano /etc/profile
在/etc/profile文件的最下一行的下一行添加:
export PATH=$PATH:/Users/ym/nim/nim-1.6.7/bin
保存更改。
yudeMacBook-Air:bin ym$ cd
yudeMacBook-Air:~ ym$ which nim
/Users/ym/nim/nim-1.6.7/bin/nim
yudeMacBook-Air:~ ym$
No comments:
Post a Comment