我试图在我的macOS机器上用鱼壳设置OCaml和OPAM;我首先通过Homebrew安装它们和它们的依赖项。
ocaml
和ocamlc
按预期运行,当我尝试初始化OPAM时出现问题,这是我运行opam init --shell=fish --debug
时得到的结果:
=-=- Fetching repository information =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
00:00.259 REPOSITORY update default(0 http https://opam.ocaml.org)
00:00.260 CURL pull-repo
00:00.260 SYSTEM error: File /Users/al1nk/.opam/repo/default/urls.txt does not exist
00:00.260 CURL Rebuilding urls.txt at /Users/al1nk/.opam/repo/default
00:00.260 FILE(file_attributes) Wrote ~/.opam/repo/default/urls.txt in 0.000s
00:00.283 SYSTEM mkdir /var/folders/5b/7_p_56gn63x1fn7v8v6fzl9c0000gn/T/opam-20566-d2d111
Processing: [default: http]
Processing: [default: http]
00:03.276 SYSTEM rmdir /var/folders/5b/7_p_56gn63x1fn7v8v6fzl9c0000gn/T/opam-20566-d2d111
00:03.298 SYSTEM error: remote_file: '�}�r$����~���;��l����p�8ju�)i�~�3�x�D��䙑D�{�2�@�;���߿�"ƅ�m�FF�#K�>7�u��yk���Ͽ�����]�*_�o��g����y��U���VL J�ac��Q!�!��o���$�^O4-��9 [�xu�)?��a1�eB0Iz�b=x�"�$�5��!VCt�BQ��6,~' is not a valid line.�:朓 �;=�.F����� �Nom��Dr.%* !��L��g�V��~<���g�y}_��
[ERROR]
[ERROR] Initialisation failed
# opam-version 1.2.2
# os darwin
remote_file: '�}�r$����~���;��l����p�8ju�)i�~�3�x�D��䙑D�{�2�@�;���߿�"ƅ�m�FF�#K�>7�u��yk���Ͽ�����]�*_�o��g����y��U���VL J�ac��Q!�!��o���$�cS���Z�9�L2�Ye�v�������-�Ņ ն썍C�b���iW^5M�^O4-��9 [�xu�)?��a1�eB0Iz�b=x�"�$�5��!VCt�BQ��6,~' is not a valid line.���g�y}_��
# opam-version 1.2.2
# os darwin
remote_file: '�}�r$����~���;��l����p�8ju�)i�~�3�x�D��䙑D�{�2�@�;���߿�"ƅ�m�FF�#K�>7�u��yk���Ͽ�����]�*_�o��g����y��U���VL J�ac��Q!�!��o���$�cS���Z�9�L2�Ye�v�������-�Ņ ն썍C�b���iW^5M�^O4-��9 [�xu�)?��a1�eB0Iz�b=x�"�$�5��!VCt�BQ��6,~' is not a valid line.
由于看起来正在读取的文件未被正确解密,我再次尝试使用另一个酿造版本的curl,其中我重新安装curl将其与酿造的OpenSSL链接,还尝试了git而不是https(运行{{1} },它给了我这个输出:
opam init --shell=fish --kind=git --debug https://github.com/ocaml/opam
)
哪来可以来自?
答案 0 :(得分:2)
此类问题通常是由 .config / fish / config.fish 运行的命令引起的,这些命令会写入非交互式会话的stdout。您需要确保所有此类命令都放在此表单的块中:
if status is-interactive
echo Welcome, master
end