I'm using emacs 25.2.1 (built from source). A strange problem happened after I tried to configure it for editing tex files.

The suspicious config file content is listed below.

(require 'package)

(add-to-list 'package-archives
         '("melpa" . "https://melpa.org/packages/") t)


(provide 'init-melpa)

Then I load it in init.el with (require 'init-melpa)

I'm using that since emacs 24.5 and it was working before I installed auctex, company-auctex... Now I've uninstalled those new packages but I am still having the following error (error dumped using --debug-init).

Debugger entered--Lisp error: (wrong-type-argument listp [(20111019 1600) nil "implementation of a hash table whose key-value pairs expire" single ((:commit . "7499586b6c8224df9f5c5bc4dec96b008258d580"))])

  package--add-to-archive-contents([(20111019 1600) nil "implementation of a hash table whose key-value pairs expire" single ((:commit . "7499586b6c8224df9f5c5bc4dec96b008258d580"))] "melpa")




  eval-buffer(#<buffer  *load*-196816> nil "/home/max/.emacs.d/init/init-melpa.el" nil t)  ; Reading at buffer position 297
  load-with-code-conversion("/home/max/.emacs.d/init/init-melpa.el" "/home/max/.emacs.d/init/init-melpa.el" nil t)

  #<subr require>(init-melpa nil nil)

  ad-Advice-require(#<subr require> init-melpa)

  apply(ad-Advice-require #<subr require> init-melpa)


  eval-buffer(#<buffer  *load*> nil "/home/max/.emacs.d/init.el" nil t)  ; Reading at buffer position 2536
  load-with-code-conversion("/home/max/.emacs.d/init.el" "/home/max/.emacs.d/init.el" t t)

  load("/home/max/.emacs.d/init" t t)

  #[0 "\205\266

It looks like the package-archives is damaged as I tried to add melpa though:

    (("gnu" . "http://elpa.gnu.org/packages/")
     ("melpa" . "https://melpa.org/packages/")))))

However I still have same errors.

Please help! Any advice is appreciated!



up vote 0 down vote accepted

MELPA sometimes delivers junk when asked for an archives file. If you run into this, just delete the MELPA-specific archives file (located at ~/.emacs.d/elpa/archives/melpa/archive-contents) and recreate it on the next Emacs launch with M-x package-refresh-contents.

  • Thx. According to your post I delete melpa folder and the new melpas added by myself. After editing my configuration and rolling back the init-melpa.el, my emacs is back to normal. – Quin Aug 2 '17 at 7:48

Alright, Finally found the solution.

Changing "melpa" to a whatever name such as "meplas" helped to solve it.

I still would like to know what caused the problem.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.