emacshaskell-modeghc-mod

Installing ghc-mod from melpa: Error during download request


I am following the instructions here to install ghc-mod in Emacs. I can add the melpa repos and list packages with M-x package-list-packages, then when I go to install the ghc package, this happens:

Debugger entered--Lisp error: (error "Error during download request: Not Found")
  signal(error ("Error during download request: Not Found"))
  error("Error during download request:%s" " Not Found")
  package-handle-response()
  package-download-tar(ghc "20141130.1848")
  package-download-transaction((ghc))
  package-install(ghc)
  mapc(package-install (ghc))
  package-menu-execute()
  call-interactively(package-menu-execute nil nil)

In .emacs I have

(require 'package)
;; Add the original Emacs Lisp Package Archive
(add-to-list 'package-archives
         '("elpa" . "http://tromey.com/elpa/"))
; old url for melpa
;(add-to-list 'package-archives
;             '("melpa" . "http://melpa.org/packages/") t)
(add-to-list 'package-archives 
     '("melpa-stable" . "http://melpa-stable.milkbox.net/packages/"))
;; Add the user-contributed repository
(add-to-list 'package-archives
         '("marmalade" . "http://marmalade-repo.org/packages/"))
(package-initialize)

I am using emacs 24.3.1 on ubuntu. How to proceed? Thanks.

[EDIT] I installed this package successfully by downloading it myself but I'd still like to know what's wrong here.


Solution

  • It looks like you may have started working with MELPA (not MELPA stable):

    But MELPA is disabled in your init file by the commenting. You also have MELPA stable listed, which uses a different versioning scheme based on Git tags instead of on build timestamps. The latest version of ghc in MELPA Stable is currently 5.2.1.2.

    I think you may have made this change without running package-refresh-contents, which updates your local package list. (Note that this is often done automatically, e.g. by loading the package list with package-list-packages).

    So when you tried to install ghc, based on the stale package list that Emacs had it looked for version 20141130.1848, but could only find version 5.2.1.2. Try again after running M-x package-refresh-contents.

    Note that you also have Marmalade enabled, which also contains ghc (version 1.10.2).

    Since there is some package overlap between MELPA and Marmalade, I don't recommend using both concurrently. You can manually pin packages to one repository, but this gets to be a pain. I switched to MELPA Stable exclusively a few months ago, and I've been very happy with it.