当前位置: 首页 > 工具软件 > ocaml-jupyter > 使用案例 >

centos7安装ocaml

白萧迟
2023-12-01

安装ocaml

安装opam
bash -c "sh <(curl -fsSL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)"
安装沙盒
yum install epel-release
yum install bubblewrap
yum install ocaml-camlp4-devel
yum install pcre-devel

安装完成之后初始化
opam init
eval $(opam env)

安装平台环境
bash < <(curl -sL https://ocaml.org/install-platform.sh)
ocaml-platform

opam switch create 4.14.0
eval $(opam env)
ocaml -version

ocaml-lsp-server 需要gcc 9
opam install ocaml-lsp-server ocamlformat

安装vscode

rpm --import https://packages.microsoft.com/keys/microsoft.asc
 
sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo'
 
yum check-update
sudo yum install code

root 用户下打开VSCODE的正确方式:

vim ~/.bashrc
alias code='/usr/share/code/code . --no-sandbox --unity-launch'

其他学习资料,安装教程:
https://www.cnblogs.com/gyhang/p/4767138.html

https://www.wenjiangs.com/doc/jr83nulv

 类似资料: