简体   繁体   English

ocamlfind的编译在“安装-m 0755 ocaml-stub”中失败

[英]The compilation of ocamlfind failed at "install -m 0755 ocaml-stub

I'm new to OCaml and I'm trying to install cohttp . 我是OCaml的新手,正在尝试安装cohttp After a failure because I hadn't accepted the Xcode license agreement (OS X Sierra 10.12.6) I get an error while the package manager (opam) is trying to install a sub-dependency, ocamlfind . 由于未接受Xcode许可协议(OS X Sierra 10.12.6)而失败后,程序包管理器(opam)尝试安装子依赖项ocamlfind

=-=- 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

The log files are empty. 日志文件为空。 The env file has this (lightly edited): 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=

I don't have a lot to go on to debug this. 我没有太多要调试的东西。 Any suggestions on where to go from here? 关于从这里去哪里有什么建议吗?

This github issue for opam led me to a solution that worked for me: https://github.com/ocaml/opam-repository/issues/10064 这个针对opam github问题使我找到了一个对我opam的解决方案: https : //github.com/ocaml/opam-repository/issues/10064

The solution to the github issue was that the user had the local directory, . github问题的解决方案是用户拥有本地目录. , in their $PATH which led to the wrong install command being run. ,在其$PATH中导致运行了错误的install命令。 This wasn't my problem, but I had an extra : in my path. 这不是我的问题,但是我有一个额外的选择:在我的道路上。

/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

According to the comment below having two colons in a row in the path string will add the empty string as part of the path which is interpreted as the current directory. 根据下面的注释,在路径字符串中连续有两个冒号的情况下,会将空字符串添加为路径的一部分,该路径被解释为当前目录。

Removing the extra colon allows the install of ocamlfind to succeed. 删除多余的冒号将使ocamlfind的安装成功。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM