Installing ghc-mod from melpa: Error during download request - emacs

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):
You have the MELPA package repository in your .emacs (though commented out), and
The traceback shows that you were trying to install version 20141130.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 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.

Related

`M-x list-packages` not showing available packages

M-x list-packages is not showing available packages from Melpa and Marmalade. It is only showing built-in and installed packages.
It was working before. I am running emacs-26.3 on Debian Buster.
You may want to make sure that your lines have t at the end.
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t) <-- notice t.
I see that your melpa does, but marmalade does not.
I was having a similar issue (lsp-mode wasn't showing up) and I noticed I was missing a t at end. Wrote it in then ran M-x package-refresh-contents and it worked.

I can't install org-checklist

I'm trying to install org-checklist for spacemacs but I'm having some difficulties. On the project documentation (https://orgmode.org/worg/org-contrib/org-checklist.html) it says enable the org contrib directory but when I run M-x find-library RET org-contribdir it says the contrib directory is deprecated. When I try installing org-plus-contrib with package-list-packages, nothing happens.
How to untick checkboxes in org-mode for the next cyclic/repetitive task - This stack overflow question says I should download the org-checklist.el file but I can't find it anywhere. If anyone knows how to set up org-checklist or a viable alternative, I'd be really grateful
org-checklist.el is part of org-plus-contrib. You should be able to install it with package-manager: it is available from orgmode.org, so you have to add (add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/") t) to your list of archives.
Starting from emacs -q I was able to install it after evaluating these lines:
(require 'package)
(add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/") t)
in the *scratch* buffer. Invoking package-list-packages showed org-plus-conrib as an available package and ix installed it (after I confirmed that I wanted to install it).
I was then able to load org-checklist with M-x load-library RET org-checklist RET.
Alternatively, you can just download the file from here and save it in some place that is found in your emacs's load-path, then say (require 'org-checklist).
Hope this helps.

AUCTeX package missing in emacs

In my emacs 24.3, I can't find the AUCTeX package.
If I enter PACKAGE-LIST-PACKAGE,
I find various packages for AUCTeX like "auctex-lua" or
"auto-complete for auctex". However, there is no auctex package that I can install. Why is it gone ?
AUCTeX is available via GNU ELPA, not MELPA.
You can configure multiple repositories, e.g. by using add-to-list instead of setting package-archives directly:
(add-to-list 'package-archives
'("melpa" . "http://melpa.org/packages/") t)
This should keep GNU ELPA in your list of archives, but in case it doesn't you can always add it back. It should look something like
("gnu" . "http://elpa.gnu.org/packages/")
Once you've done this you should be able to install AUCTeX via package.el.
Note that this is likely the one repository that most users should have in their package-archives list. It's the official GNU repository, enabled by default. Of course, feel free to add others as you wish!

Missing packages from GNU Emacs

I’m been wanting to install a number of new packages for Emacs. mmm-mode, multi-web-mode, and smart-tab-mode are a few examples. But I don’t seem to be able to find them when I run
M-x package-list-packages
I have this in my .emacs file:
(require 'package)
(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))
(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/"))
(package-initialize)
And when I run package-list-packages I can see that it contacts all those different hosts. I use C-s to search for them, they aren’t there. What am I doing wrong?
My Emacs version is displayed as: Version 24.2 (9.0)
URL for Melpa was too short: it should be http://melpa.milkbox.net/packages/
You've mixed up the order. It goes like this:
(package-initialize)
(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))
(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/"))
The ELPA/package system is a relatively new addition to Emacs. It is far from the case that all libraries are available as packages, but similarly it is not necessary for a library to be packaged in order to use it with Emacs.
If a library you wish to use is unavailable through any of the package repositories, simply follow the installation/usage instructions which (generally) can be found in the accompanying documentation for the library (either in the .el file's commentary, or as a separate file).
(You will at minimum need to ensure that the files are located in a directory which is in Emacs' load-path, but the exact details thereafter will vary depending upon the purpose of the library in question.)

Slime mode error

I was following the guide and information from A gentle tutorial to Emacs/Swank/Paredit for Clojure
However after opening elpa and installing clojure-mode, slime and paredit. I restarted emacs and then attempted to use M-x slime however it continually says no match . What am I doing wrong?
I then tried to install clojure-mode from marmalade http://marmalade-repo.org/packages I byte-compiled package el and then added
(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/")) to my.emacs. However marmalade errors with
Symbol's value as variable is void: package-archives .
Unsure exactly what I am doing wrong I am on windows7 using emacs 23.3. I have clojure installed to c:/clojure.
Any help appreciated.
My init.el has both (require 'package) and (package-initialize). It's not very big, it looks like this:
(require 'package)
;; Add the original Emacs Lisp Package Archive
(add-to-list 'package-archives
'("elpa" . "http://tromey.com/elpa/"))
;; Add the user-contributed repository
(add-to-list 'package-archives
'("marmalade" . "http://marmalade-repo.org/packages/"))
(package-initialize)
I'm on emacs 24 (a development build) on Windows 7. I had trouble getting emacs 23 to work with packages too, it was easier for me to just upgrade.
By the way, I noticed that if I set a HOME environment variable, emacs looks there for the .emacs.d directory (instead of in %USER_PROFILE%\AppData\Roaming).
Download package.el (don't follow the instructions on the ELPA site, just download the package.el provided on marmalade's site).
Put package.el in your .emacs.d directory (~/.emacs.d/).
Add the following to your .emacs file (~/.emacs):
;;Load path to my packages
(add-to-list 'load-path "~/.emacs.d/")
;;Load ELPA (the package.el you downloaded from marmalade)
(require 'package)
;;Load Marmalade (the code found on marmalade's welcome page)
(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))
That's it! I really hope this helps.
EDIT: Sorry, I forgot to mention that you need to add (package-initialize) at the end of the code I provided. If you don't add this line, the packages will install, but won't load.
I think, that you need to put
(require 'package)
before 'add-to-list'
P.S. and add following call after 'add-to-list'
(package-initialize)
this command will load installed packages and activate them
P.P.S. '(require 'package)' maybe not needed, but I'm personally not using 'package.el'
It seems to me you're missing either (require 'package) or (package-initialize). You can check out my setup here - I'm using both marmalade and clojure-mode on Windows 7 and it works like a charm.
Do not know it is same problem, I faced when I were trying to use quicklisp's swank/slime
Finally I found that few /contrib/*.el packages were dependent on each other
if A's dependency package is B, if B is not byte-compiled than A will not compile
when you do
(require 'A)
it will throw
Symbol's variable value is void: A
So ensure you compile each package than try require.