Total Pageviews

Friday, 24 June 2022

在mac/linux上,快速搭建nim环境

在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$

(如果是在linux vps上,把上面的下载地址https://github.com/nim-lang/nightlies/releases/download/latest-version-1-6/macosx_x64.tar.xz 改为

https://github.com/nim-lang/nightlies/releases/download/latest-version-2-0/linux_x64.tar.xz, 其他地方相应的操作即可.)

---------------------------------------------------------------

https://muxueqz.top/a-small-static-site-generator.html

https://hackertalk.net/posts/391246385274728448
https://expector-hutch.github.io/blogs/nim.html
https://nim-lang.org/install.html
https://nim-lang.org/install_windows.html
https://nim-lang.org/install_unix.html
https://nim-lang.org/docs/nimc.html








 

No comments:

Post a Comment