Debian 11にV言語をインストールする方法

環境
# cat /etc/debian_version
11.2

インストール方法
1.パッケージbuild-essentialをインストールします

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# sudo apt install build-essential
# sudo apt install build-essential
# sudo apt install build-essential

2.gitからインストールします
# sudo apt install git

3.gitからダウンロードします

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# git clone https://github.com/vlang/v
Cloning into 'v'...
remote: Enumerating objects: 112886, done.
remote: Counting objects: 100% (14/14), done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 112886 (delta 4), reused 14 (delta 4), pack-reused 112872
Receiving objects: 100% (112886/112886), 48.98 MiB | 5.51 MiB/s, done.
Resolving deltas: 100% (80493/80493), done.
# git clone https://github.com/vlang/v Cloning into 'v'... remote: Enumerating objects: 112886, done. remote: Counting objects: 100% (14/14), done. remote: Compressing objects: 100% (10/10), done. remote: Total 112886 (delta 4), reused 14 (delta 4), pack-reused 112872 Receiving objects: 100% (112886/112886), 48.98 MiB | 5.51 MiB/s, done. Resolving deltas: 100% (80493/80493), done.
# git clone https://github.com/vlang/v
Cloning into 'v'...
remote: Enumerating objects: 112886, done.
remote: Counting objects: 100% (14/14), done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 112886 (delta 4), reused 14 (delta 4), pack-reused 112872
Receiving objects: 100% (112886/112886), 48.98 MiB | 5.51 MiB/s, done.
Resolving deltas: 100% (80493/80493), done.

4.vディレクトリに移動してビルドします
# cd v/
# make

5.シンボリックリンクを作成します
# sudo ./v symlink

6.実行確認

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
Welcome to the V REPL (for help with V itself, type exit , then run v help ).
NB: the REPL is highly experimental. For best V experience, use a text editor,
save your code in a main.v file and execute: v run main.v
V 0.2.4 996bd41
Use Ctrl-C or exit to exit, or help to see other available commands
>>> fn main() {println('hello world')}
hello world
Welcome to the V REPL (for help with V itself, type exit , then run v help ). NB: the REPL is highly experimental. For best V experience, use a text editor, save your code in a main.v file and execute: v run main.v V 0.2.4 996bd41 Use Ctrl-C or exit to exit, or help to see other available commands >>> fn main() {println('hello world')} hello world
Welcome to the V REPL (for help with V itself, type  exit , then run  v help ).
NB: the REPL is highly experimental. For best V experience, use a text editor,
save your code in a  main.v  file and execute:  v run main.v
V 0.2.4 996bd41
Use Ctrl-C or  exit  to exit, or  help  to see other available commands
>>> fn main() {println('hello world')}
hello world

 

Debian 11

Posted by arkgame