2017-08-16 46 views
0

存在於我的bash環境(在.bashrc中設置)中的一些環境變量沒有被getenv讀取(它表示它們未定義)。它是否正在尋找其他一些環境?要麼....?Omake getenv - 找不到環境變量

[email protected] ~/Casey/piano-core $ omake 
*** omake: reading OMakefiles 
--- Checking for ocamlfind... (found /home/monster/ocamlbrew/ocaml-4.02.3/.opam/4.02.2/bin/ocamlfind) 
--- Checking for ocamlc.opt... (found /home/monster/ocamlbrew/ocaml-4.02.3/.opam/4.02.2/bin/ocamlc.opt) 
--- Checking for ocamlopt.opt... (found /home/monster/ocamlbrew/ocaml-4.02.3/.opam/4.02.2/bin/ocamlopt.opt) 
--- Checking whether ocamlc understands the "z" warnings... (yes) 
*** omake error: 
    File _build/score-player/stubs/OMakefile: line 14, characters 8-30 
    undefined environment variable: SCORE_PLAYER 
[email protected] ~/Casey/piano-core $ $SCORE_PLAYER 
bash: /home/monster/Casey/score-player: Is a directory 
[email protected] ~/Casey/piano-core $ rlwrap osh 
% getenv(SCORE_PLAYER) 
*** omake error: 
    File -: line 1, characters 0-20 
    undefined environment variable: SCORE_PLAYER 
% 

回答

0

好的,所以我通過將變量放在/ etc/environment而不是〜/ .bashrc中解決了這個問題。我想我沒有很好的理解哪個環境是哪個....