atom-haskell-archive / haskell-ghc-mod

haskell-ghc-mod atom package
https://atom.io/packages/haskell-ghc-mod
MIT License
69 stars 20 forks source link

Haskell-ghc-mod: ghc-mod failed to launch. It is probably missing or misconfigured. ENOENT #223

Closed alkispower closed 6 years ago

alkispower commented 6 years ago

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.21.0 x64 Electron: 1.6.9 OS: Kali GNU/Linux Thrown From: haskell-ghc-mod package 2.1.1 User: root

Stack Trace

Haskell-ghc-mod: ghc-mod failed to launch. It is probably missing or misconfigured. ENOENT

At Error was: Error
spawn ghc-mod ENOENT
Debug information:
{
  "dir": "/root/Desktop/Haskell",
  "err": {
    "code": "ENOENT",
    "errno": "ENOENT",
    "syscall": "spawn ghc-mod",
    "path": "ghc-mod",
    "spawnargs": [
      "version"
    ],
    "cmd": "ghc-mod version"
  },
  "opts": {
    "cwd": "/root/Desktop/Haskell",
    "env": {
      "PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
    },
    "encoding": "utf8",
    "maxBuffer": null
  }
}
Config:
{
  "ghcModPath": "ghc-mod",
  "enableGhcModi": true,
  "lowMemorySystem": false,
  "debug": false,
  "additionalPathDirectories": [],
  "cabalSandbox": true,
  "stackSandbox": true,
  "initTimeout": 60,
  "interactiveInactivityTimeout": 60,
  "interactiveActionTimeout": 300,
  "onSaveCheck": true,
  "onSaveLint": true,
  "onChangeCheck": false,
  "onChangeLint": false,
  "alwaysInteractiveCheck": true,
  "onMouseHoverShow": "typeAndInfo",
  "onSelectionShow": "",
  "maxBrowseProcesses": 2,
  "highlightTooltips": true,
  "highlightMessages": true,
  "hlintOptions": [],
  "experimental": false,
  "suppressGhcPackagePathWarning": false,
  "ghcModMessages": "console"
}
Environment (filtered):
{
  "PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
}

Error
    at CP.execFile (/packages/haskell-ghc-mod/lib/util.js:79:36)
    at exithandler (child_process.js:230:5)
    at ChildProcess.errorhandler (child_process.js:242:5)
    at emitOne (events.js:96:13)
    at ChildProcess.emit (events.js:188:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:213:12)
    at onErrorNT (internal/child_process.js:359:16)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)

Commands

     -0:07.4.0 core:delete (input.hidden-input)
     -0:06.5.0 core:save (input.hidden-input)

Non-Core Packages

atom-jade 0.3.0 
emmet 2.4.3 
haskell-ghc-mod 2.1.1 
ide-haskell 2.2.0 
language-haskell 1.14.3 
pigments 0.40.2 
spacegray-atom-dark-syntax 1.3.2 
lierdakil commented 6 years ago

It would appear you're missing binary dependencies. Please refer to https://atom-haskell.github.io/installation/installing-binary-dependencies/

In particular, you need to build ghc-mod.

TL;DR: if using Stack, run stack build ghc-mod in your project root. If using Cabal, create sandbox, install ghc-mod there and add sandbox's bin directory to 'Additional Path Directories'.

alkispower commented 6 years ago

i dont know what stack is or cabal , i dont know what sandbox is can you explain in more detail please? i put on terminal the following command: apm install language-haskell ide-haskell ide-haskell-cabal haskell-ghc-mod autocomplete-haskell then i got these: Installing language-haskell to /root/.atom/packages ✓ Installing ide-haskell to /root/.atom/packages ✓ Installing ide-haskell-cabal to /root/.atom/packages ✓ Installing haskell-ghc-mod to /root/.atom/packages ✓ Installing autocomplete-haskell to /root/.atom/packages ✓

lierdakil commented 6 years ago

Atom-Haskell packages have binary dependencies that can not be installed with apm. Follow the link provided in my previous comment, then read carefully. Especially warnings. The guide assumes you have at least a basic idea of what you're doing, hence minimal knowledge on the Haskell ecosystem is required. You can start off with https://www.haskell.org/downloads (which you need to get compiler and toolchain anyway)

lierdakil commented 6 years ago

Closing due to inactivity.