本文介绍了eval`opam config env`有什么用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在安装opam之后,它要求执行 eval`opam config env` .

After the installation of opam, it asks to do eval `opam config env`.

它的确切用法是什么?

推荐答案

它将设置环境变量,这对于工具链正常工作是必需的,例如CAML_LD_LIBRARY_PATH.

It will setup environment variables, that are necessary for the toolchain to work properly, e.g., CAML_LD_LIBRARY_PATH.

就像在Python的virtualenv中激活虚拟环境一样.

It is like activating virtual environment in Python's virtualenv.

如果要查看准确设置了哪些变量,则可以在不使用eval部分的情况下运行它:

If you want to see what variables are set exactly, the you can run it without the eval part:

$ opam config env
CAML_LD_LIBRARY_PATH="/home/ivg/.opam/4.02.1/lib/stublibs"; export CAML_LD_LIBRARY_PATH;
MANPATH=":/home/ivg/.opam/4.02.1/man"; export MANPATH;
PERL5LIB="/home/ivg/.opam/4.02.1/lib/perl5:"; export PERL5LIB;
OCAML_TOPLEVEL_PATH="/home/ivg/.opam/4.02.1/lib/toplevel"; export OCAML_TOPLEVEL_PATH;
PATH="/home/ivg/.opam/4.02.1/bin:/home/ivg/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"; export PATH;

这篇关于eval`opam config env`有什么用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-17 20:56