2017-12-27 814 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

是的,两个冒号为路径添加了一个空名称(“”)的目录,这是(空白的)当前目录的名称。 –