Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error updating emacs packages: Failed to download 'gnu' archive

My init.el uses this to initialize packages:

(package-initialize) (add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")) (add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/")) (add-to-list 'package-archives '("melpa-stable" . "http://melpa-stable.milkbox.net/packages/")) 

When I do M-x package-refresh-contents I get the following error: Failed to download `gnu' archive.

M-x toggle-debug-on-error gives me this stacktrace:

Debugger entered--Lisp error: (error "Failed to verify signature archive-contents.sig: (\"No public key for 474F05837FBDEF9B created at 2014-09-29T07:20:03-0700 using DSA\")")   signal(error ("Failed to verify signature archive-contents.sig: (\"No public key for 474F05837FBDEF9B created at 2014-09-29T07:20:03-0700 using DSA\")"))   error("Failed to verify signature %s: %S" "archive-contents.sig" ("No public key for 474F05837FBDEF9B created at 2014-09-29T07:20:03-0700 using DSA"))   package--check-signature("http://elpa.gnu.org/packages/" "archive-contents")   package--download-one-archive(("gnu" . "http://elpa.gnu.org/packages/") "archive-contents") 

Is this a problem with my configuration, and how would I fix it?

like image 460
yayitswei Avatar asked Sep 29 '14 20:09

yayitswei


1 Answers

Looks like a bug in your version of Emacs. You can probably circumvent it by setting package-check-signature to nil.

like image 76
Stefan Avatar answered Sep 19 '22 15:09

Stefan