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.
It looks like you may have started working with MELPA (not MELPA stable):
.emacs
(though commented out), and20141130.1848
, which is a MELPA-style timestamp.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 currently5.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 withpackage-list-packages
).So when you tried to install
ghc
, based on the stale package list that Emacs had it looked for version20141130.1848
, but could only find version5.2.1.2
. Try again after runningM-x package-refresh-contents
.Note that you also have Marmalade enabled, which also contains
ghc
(version1.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.