Emacs, Melpa and the “Failed to download GNU” archive error

The problem

If a few days ago you tried to install Evil for Emacs under Linux Debian 10 or Fedora 30 you might have found a bad surprise: a Failed to download GNU archive error.

Even in Linux Manjaro I found the same problem.

The same error occurs if you try to run the Emacs command: to refresh the Melpa archive.

The problem, however, does not affect all distributions. In Linux Mint 19.x I didn’t find the problem.

The version of Emacs in my Linux Mint distribution is 25.2.2. In Debian 10 I found Emacs 26.1. In Fedora 30 and Manjaro Emacs 26.2.

I suspect from these observations that the problem is related to version 26.x of Emacs.

I have done a lot of researches to find a solution to the problem.

I also tried installation via el-get with the command but in this archive the package was not found.

The solution

Finally I found a working solution that solved the problem in every distributions.

It seems that the key is to insert at the beginning of Emacs configuration file (i.e the .emacs file) the following string

as suggested in this page and this other page followed by and .

After the modifiy I was be able to install Evil without any problem.

Thank you for your attention.

I am a lawyer and occasionally write about technology.

I am a lawyer and occasionally write about technology.