【问题标题】:Emacs haskell-mode: "Searching for program: no such file or directory, ghci"Emacs haskell-mode:“正在搜索程序:没有这样的文件或目录,ghci”
【发布时间】:2016-06-15 08:47:01
【问题描述】:

由于某种原因,emacs 无法找到我的 ghci。我正在运行 Ubuntu 16.04,并按照 this tutorial 中的说明阅读本书。

使用which ghci 我得到路径/opt/ghc/7.10.3/bin/ghci。并执行M-: exec-pathM-: (getenv "PATH") 我可以看到正确打印的路径。

我曾尝试像这样在 emacs 中显式设置 PATH 变量,但据我所知它已经存在,这并没有改变任何东西。 From this answer.

(setenv "PATH" "/usr/local/bin:/usr/bin:/bin:/opt/cabal/1.22/bin/cabal:/opt/ghc/7.10.3/bin/ghci")
(setq exec-path (split-string (getenv "PATH") path-separator)

当我使用时也会发生同样的事情 (custom-set-variables '(haskell-process-type 'cabal-repl)) 即报错:“正在搜索程序:没有这样的文件或目录,阴谋集团”

非常感谢您的帮助。 :) 我不知道该怎么做,也没有在互联网上找到任何答案。

【问题讨论】:

    标签: emacs24 haskell-mode


    【解决方案1】:

    问题是我添加了实际可执行文件的路径,而不是可执行文件所在的文件夹。

    所以: /opt/cabal/1.22/bin/cabal 应该 /opt/cabal/1.22/bin/

    和: /opt/ghc/7.10.3/bin/ghci 应该 /opt/ghc/7.10.3/bin/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-09-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-06-24
      • 1970-01-01
      • 2015-02-20
      相关资源
      最近更新 更多