I can't seem to install any packages via M-x -> package-install. I keep getting the following error:
Contacting host: melpa.org:443
package-install-from-archive: Certificate validation failed melpa.org, verification code 142
On package-refresh-contents, I also get the following:
Contacting host: elpa.gnu.org:443
Failed to download ‘gnu’ archive.
Failed to download ‘melpa’ archive.
Package refresh done
Failed to download ‘org’ archive.
I just did a fresh emacs install with brew install emacs --with-cocoa --with-gnutls as described here
Describe what happened. Any aids you can include (that you think could be relevant) are a tremendous help; like a screencast gif, video, or link to your customizations for Doom (e.g. a repo or a pastebin).
Expect to be able to install a package
M-xpackage-installmagit git-flowMac OS High Sierra (10.13.1)
emacs 25.3.1
DOOM Doctor
Running Emacs v25.3.1, commit fatal: Not a git repository (or any of the parent directories): .git
shell: /bin/zsh
Compiled with:
JPEG NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS
uname -a:
Darwin Alexs-MBP.localdomain 17.2.0 Darwin Kernel Version 17.2.0: Fri
Sep 29 18:27:05 PDT 2017; root:xnu-4570.20.62~3/RELEASE_X86_64 x86_64
Attempt to load DOOM: success! Loaded v2.0.9
Revision 5d3cf4ca2ba4bafe8663bb1ffc7add273e739f10
----
test-emacs
test-windows
test-fonts
Found font material-design-icons.ttf
Found font weathericons.ttf
Found font octicons.ttf
Found font fontawesome.ttf
Found font file-icons.ttf
Found font all-the-icons.ttf
test-gnutls
test-tls
Validated https://elpa.gnu.org
Validated https://melpa.org
Successfully rejected https://self-signed.badssl.com
Successfully rejected https://wrong.host.badssl.com/
test-tar
Everything seems fine, happy Emacs’ing!
ls does not support --dired; see ‘dired-use-ls-dired’ for more details.
Do you get these issues if you run M-x package-initialize before doing either package-install or package-refresh-contents?
I get the exact same issue.
Hi Henrik, I ran the package-initialize command, but still encounter the
same issues with package-install and package-refresh-contents
On Mar 5, 2018 7:50 PM, "Rahul S" notifications@github.com wrote:
I get the exact same issue.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/hlissner/doom-emacs/issues/444#issuecomment-370621102,
or mute the thread
https://github.com/notifications/unsubscribe-auth/Ahm1C2dKCHEXBsZ-edJYeHZ_wx9TFFN-ks5tbd1KgaJpZM4SXM7p
.
@hlissner M-x package-initialize before package-install seems to solve this issue. Would you please tell us why?
Doom avoids package-initialize to halve its startup time. package-* commands requires some state that this function intializes.
In the lastest update (on develop), I've ensured that this state is initialied before you call any of the package commands. Let me know if that resolves your issue.
Is this still an issue? Doom has evolved a great deal since this was first posted, including better package.el compatibility.
Hey, I'm still having this issue on the develop branch. Any ideas?
@RodrigoLeiteF What version of Emacs are you on?
GNU Emacs 26.1
Seems to have fixed itself. It was probably some restriction on the connection I was using at the time.
I'm getting this issue now too. doom-doctor output:
Doom Doctor
Emacs v26.1
Doom v2.0.9 (nil)
shell: /bin/bash
Compiled with: JPEG SOUND GPM DBUS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 ZLIB
THREADS LIBSYSTEMD LCMS2
uname -msrv: Linux 4.19.0-5-amd64 #1 SMP Debian 4.19.37-5 (2019-06-19) x86_64
Checking Emacs
Checking your Emacs version is 25.3 or newer...
Checking if your version of Emacs has changed recently...
Checking for Emacs config conflicts...
Checking for private config conflicts...
Checking for stale elc files...
Checking your system...
Checking gnutls/openssl...
Testing your root certificates...
Checking for GNU/BSD tar...
Checking DOOM Emacs...
Attempt to load DOOM failed (modules/editor/evil/config.el (file-missing
Cannot open load file No such file or directory evil))
There is 1 warning!
When doing quickstart, I have a few packages it simply cannot grab because they're unavailable:
When running the quickstart with -d:
Refreshing package archives
Importing package-keyring.gpg...
Importing package-keyring.gpg...done
Contacting host: elpa.gnu.org:443
Failed to download ‘gnu’ archive.
Contacting host: melpa.org:443
Contacting host: www.mirrorservice.org:443
Contacting host: orgmode.org:443
Package refresh done
But I see that elpa.gnu.org is offline...so that may be the conflict? If that's the case, that'd be kinda funny only having that elpa repo having some of these packages
@stratacast It does seem like a connection issue. Occasionally, the sites go down. Unfortunately, there's little I can do about that besides find mirrors. I'm considering a switch to straight or creating my own Doom-based mirrors for these ELPA repos.
In any case, I'll consider the original issue resolved and close this. Feel free to follow up here if you have more to add.
Hi @hlissner It would be helpful to have a doom-based mirror.
If anyone is having problems downloading from https://elpa.gnu.org/packages/, change the mirror to https://mirrors.163.com/elpa/gnu/ in core/core-packages.el. Seems like 163.com is owned by some Chinese tech company. Not sure if safe or not so use at own risk.
credit: https://www.reddit.com/r/emacs/comments/cdf48c/failed_to_download_gnu_archive/ettq14z
I mention some better alternatives in another thread. I would recommend them over employing an uncertain mirror.
Have the same on emacs 25.2, emacs 26.2, latest develop branch by today.
Had to run with emacs --insecure, nothing else helped.
UPD: I have just noticed you have committed something for gnutls on master branch.
If anyone is having problems downloading from https://elpa.gnu.org/packages/, change the mirror to https://mirrors.163.com/elpa/gnu/ in core/core-packages.el. Seems like 163.com is owned by some Chinese tech company. Not sure if safe or not so use at own risk.
credit: https://www.reddit.com/r/emacs/comments/cdf48c/failed_to_download_gnu_archive/ettq14z
excellent
Most helpful comment
Do you get these issues if you run
M-x package-initializebefore doing eitherpackage-installorpackage-refresh-contents?