I spent a day debugging it but can't see what's wrong in my setup. I'm using Linux (Fedora 22) running Emacs 24.5.1, behind company proxy and have environment variables "http_proxy", "https_proxy", "ftp_proxy" all setup correctly. I also have "setq url-proxy-services ..." in my init.el.
I added MELPA as a repository using: (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
But emacs keeps throwing this stack trace on error (emacs --debug-init):
Debugger entered--Lisp error: (file-error "https://melpa.org/packages/async-20150909.2257.tar" "Internal server error")
signal(file-error ("https://melpa.org/packages/async-20150909.2257.tar" "Internal server error"))
url-insert-file-contents("https://melpa.org/packages/async-20150909.2257.tar")
package-install-from-archive([cl-struct-package-desc async (20150909 2257) "Asynchronous processing in Emacs" ((emacs (24)) (cl-lib (0 5))) tar "melpa" nil ((:url . "https://github.com/jwiegley/emacs-async")) nil])
mapc(package-install-from-archive ([cl-struct-package-desc async (20150909 2257) "Asynchronous processing in Emacs" ((emacs (24)) (cl-lib (0 5))) tar "melpa" nil ((:url . "https://github.com/jwiegley/emacs-async")) nil] [cl-struct-package-desc helm-core (20151024 2233) "Development files for Helm" ((emacs (24)) (cl-lib (0 5)) (async (1 5))) tar "melpa" nil ((:url . "https://emacs-helm.github.io/helm/")) nil] [cl-struct-package-desc helm (20151024 2233) "Helm is an Emacs incremental and narrowing framework" ((emacs (24)) (cl-lib (0 5)) (async (1 5)) (helm-core (1 8 0))) tar "melpa" nil ((:url . "https://emacs-helm.github.io/helm/")) nil]))
package-download-transaction(([cl-struct-package-desc async (20150909 2257) "Asynchronous processing in Emacs" ((emacs (24)) (cl-lib (0 5))) tar "melpa" nil ((:url . "https://github.com/jwiegley/emacs-async")) nil] [cl-struct-package-desc helm-core (20151024 2233) "Development files for Helm" ((emacs (24)) (cl-lib (0 5)) (async (1 5))) tar "melpa" nil ((:url . "https://emacs-helm.github.io/helm/")) nil] [cl-struct-package-desc helm (20151024 2233) "Helm is an Emacs incremental and narrowing framework" ((emacs (24)) (cl-lib (0 5)) (async (1 5)) (helm-core (1 8 0))) tar "melpa" nil ((:url . "https://emacs-helm.github.io/helm/")) nil]))
package-install(helm)
(progn (package-install p))
(if (not (package-installed-p p)) (progn (package-install p)))
(while --dolist-tail-- (setq p (car --dolist-tail--)) (if (not (package-installed-p p)) (progn (package-install p))) (setq --dolist-tail-- (cdr --dolist-tail--)))
(let ((--dolist-tail-- ngupta/packages) p) (while --dolist-tail-- (setq p (car --dolist-tail--)) (if (not (package-installed-p p)) (progn (package-install p))) (setq --dolist-tail-- (cdr --dolist-tail--))))
eval-buffer(#<buffer *load*> nil "/home/ngupta/.emacs.d/init.el" nil t) ; Reading at buffer position 1037
load-with-code-conversion("/home/ngupta/.emacs.d/init.el" "/home/ngupta/.emacs.d/init.el" t t)
load("/home/ngupta/.emacs.d/init" t t)
#[0 "\205\262
Here's my init.el for reference:
(require 'package) (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/")) (package-initialize) (setq url-using-proxy t) (setq url-proxy-services '(("no_proxy" . "^\\(localhost\\|10.*\\)") ("http" . "www-proxy.us.mycompany.com:80") ("https" . "www-proxy.us.mycompany.com:80") ("ftp" . "www-proxy.us.mycompany.com:80")))