2017-12-27 466 views
1

我是OCaml的新手,我試圖安裝cohttp。因爲我沒有接受Xcode許可協議(OS X Sierra 10.12 0.6)我得到一個錯誤,而包管理器(OPAM)正試圖安裝一個子依賴性,ocamlfindocamlfind的編譯失敗「install -m 0755 ocaml-stub

=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 
[ERROR] The compilation of ocamlfind failed at "install -m 0755 ocaml-stub /Users/greg/.opam/system/bin/ocaml". 
Processing 1/27: [ocamlfind: rm] 
#=== ERROR while installing ocamlfind.1.7.3-1 =================================# 
# opam-version 1.2.2 
# os   darwin 
# command  install -m 0755 ocaml-stub /Users/greg/.opam/system/bin/ocaml 
# path   /Users/greg/.opam/system/build/ocamlfind.1.7.3-1 
# compiler  system (4.05.0) 
# exit-code 127 
# env-file  /Users/greg/.opam/system/build/ocamlfind.1.7.3-1/ocamlfind-93888-487c34.env 
# stdout-file /Users/greg/.opam/system/build/ocamlfind.1.7.3-1/ocamlfind-93888-487c34.out 
# stderr-file /Users/greg/.opam/system/build/ocamlfind.1.7.3-1/ocamlfind-93888-487c34.err 

日誌文件是空的ENV文件有這個(編輯淡然)。

PATH=/Users/greg/.opam/system/bin:/usr/local/google-cloud-sdk/bin:/Users/greg/.nvm/versions/node/v6.5.0/bin::/opt/chefdk/bin:/usr/local/mysql/bin:/usr/local/share/npm/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/greg/.chefdk/gem/ruby/2.1.0/bin 
OCAML_TOPLEVEL_PATH=/Users/greg/.opam/system/lib/toplevel 
PERL5LIB=/Users/greg/.opam/system/lib/perl5: 
MANPATH=/Users/greg/.opam/system/man:/Users/greg/.nvm/versions/node/v6.5.0/share/man:/usr/local/mysql/man:/usr/local/share/man:/usr/share/man:/Applications/Xcode.app/Contents/Developer/usr/share/man:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man 
OPAMSWITCH=system 
OPAMUTF8MSGS=1 
CAML_LD_LIBRARY_PATH=/Users/greg/.opam/system/lib/stublibs:/usr/local/lib/ocaml/stublibs 
TERM_PROGRAM=Apple_Terminal 
TERM=xterm-256color 
SHELL=/bin/bash 
TMPDIR=/var/folders/fq/9ggcftcj1lsb150mldyjn5sh0000gn/T/ 
NVM_PATH=/Users/greg/.nvm/versions/node/v6.5.0/lib/node 
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.jNLKBcDJTX/Render 
TERM_PROGRAM_VERSION=388.1.1 
TERM_SESSION_ID=E845D49D-9C60-4CEA-8777-19F521ED83A1 
NVM_DIR=/Users/greg/.nvm 
USER=greg 
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.0CA6ZcRBJQ/Listeners 
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x52 
NVM_NODEJS_ORG_MIRROR=https://nodejs.org/dist 
PWD=/Users/greg/dev/ocaml 
EDITOR=emacs 
LANG=en_CA.UTF-8 
NODE_PATH=./src 
XPC_FLAGS=0x0 
NODE_ENV=development 
XPC_SERVICE_NAME=0 
HOME=/Users/greg 
SHLVL=1 
LOGNAME=greg 
NVM_BIN=/Users/greg/.nvm/versions/node/v6.5.0/bin 
NVM_IOJS_ORG_MIRROR=https://iojs.org/dist 
PROMPT_COMMAND=set_tab_title 
_=/usr/local/bin/opam 
OPAM_PACKAGE_VERSION=1.7.3-1 
OPAM_PACKAGE_NAME=ocamlfind 
MAKELEVEL= 
MAKEFLAGS= 

我沒有太多要去調試此任何建議從哪裏去 這裏?

回答

2

opam這GitHub的問題使我爲我工作的解決方案:https://github.com/ocaml/opam-repository/issues/10064

到GitHub的問題的解決方案是,用戶必須在本地目錄,.,在他們$PATH而導致錯誤的install命令正在運行。這不是我的問題,但我的路上有一個額外的:

/Users/greg/.nvm/versions/node/v6.5.0/bin::/opt/chefdk/bin:/usr/local/mysql/bin:/usr/local/share/npm/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin 

根據下面有兩個冒號的行中的路徑字符串將添加空字符串作爲被解釋爲當前目錄路徑的一部分的註釋。

刪除多餘的冒號允許安裝ocamlfind成功。

+0

是的,兩個冒號爲路徑添加了一個空名稱(「」)的目錄,這是(空白的)當前目錄的名稱。 –