syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.7k stars 4.9k forks source link

always fail when install package #6456

Closed xiaoyulei closed 3 years ago

xiaoyulei commented 8 years ago

Found 3 new package(s) to install... --> refreshing package archive: gnu... [3/3] --> installing package: adaptive-wrap@spacemacs... [1/3] An error occurred while installing adaptive-wrap (error: (bad-signature adaptive-wrap-0.5.el.sig)) --> installing package: evil-lisp-state@spacemacs... [2/3] An error occurred while installing evil-lisp-state (error: (bad-signature evil-lisp-state-20160403.1948.el.sig)) --> installing package: evil-numbers@spacemacs... [3/3] An error occurred while installing evil-numbers (error: (bad-signature evil-numbers-20140606.551.el.sig))

d12frosted commented 8 years ago

Running Emacs with --insecure flag might help you.

Also, could you please attach output of SPC h d s?

Edit: typo fix

xiaoyulei commented 8 years ago

@d12frosted I have try --insecure, it is the same.

#### System Info
- OS: gnu/linux
- Emacs: 25.1.50.2
- Spacemacs: 0.105.21
- Spacemacs branch: master (rev. 0283f64)
- Graphic display: t
- Distribution: spacemacs
- Editing style: emacs
- Completion: helm
- Layers:
```elisp
(auto-completion better-defaults emacs-lisp markdown go c-c++ shell-scripts sql gtags ag)
a13ph commented 8 years ago

had the same thing, emacs restart/retry helped

d12frosted commented 8 years ago

Well, previously I've heard about similar problem several times. Retying after certain amount of time always helped. But this is not cool. 😞

balakrishnanc commented 8 years ago

Is there a reason why this happens?

If I leave .spacemacs with only emacs-lisp enabled in dotspacemacs-configuration-layers (i.e., leave .spacemacs intact as such) then there are no errors. I am unable to add any other layer; if I do the installation fails. The following output, for instance, shows what happens if I add auto-completion.

--> installing package: ac-ispell@auto-completion... [1/9]
An error occurred while installing ac-ispell (error: (bad-signature auto-complete-20160710.1544.tar.sig))
--> installing package: auto-complete@auto-completion... [2/9]
An error occurred while installing auto-complete (error: (bad-signature auto-complete-20160710.1544.tar.sig))
--> installing package: auto-yasnippet@auto-completion... [3/9]
An error occurred while installing auto-yasnippet (error: (bad-signature yasnippet-20160713.1403.tar.sig))
--> installing package: company@auto-completion... [4/9]
An error occurred while installing company (error: (bad-signature company-20160709.1536.tar.sig))
--> installing package: company-quickhelp@auto-completion... [5/9]
An error occurred while installing company-quickhelp (error: (bad-signature company-20160709.1536.tar.sig))
--> installing package: company-statistics@auto-completion... [6/9]
An error occurred while installing company-statistics (error: (bad-signature company-20160709.1536.tar.sig))
--> installing package: helm-c-yasnippet@auto-completion... [7/9]
An error occurred while installing helm-c-yasnippet (error: (bad-signature yasnippet-20160713.1403.tar.sig))
--> installing package: helm-company@auto-completion... [8/9]
An error occurred while installing helm-company (error: (bad-signature company-20160709.1536.tar.sig))
--> installing package: yasnippet@auto-completion... [9/9]
An error occurred while installing yasnippet (error: (bad-signature yasnippet-20160713.1403.tar.sig))
d12frosted commented 8 years ago

@balakrishnanc just as a very insecure workaround you could try setting package-check-signature to nil at the very top of your .spacemacs file.

balakrishnanc commented 8 years ago

Thanks @d12frosted but problems persist.

--> refreshing package archive: gnu... [3/3]
--> installing package: ac-ispell@auto-completion... [1/9]
An error occurred while installing ac-ispell (error: (cl-assertion-failed (or (= (buffer-size tar-data-buffer) (buffer-size)) (eq tar-data-swapped (> (buffer-size tar-data-buffer) (buffer-size))))))
--> installing package: auto-complete@auto-completion... [2/9]
An error occurred while installing auto-complete (error: (cl-assertion-failed (or (= (buffer-size tar-data-buffer) (buffer-size)) (eq tar-data-swapped (> (buffer-size tar-data-buffer) (buffer-size))))))
--> installing package: auto-yasnippet@auto-completion... [3/9]
An error occurred while installing auto-yasnippet (error: (cl-assertion-failed (or (= (buffer-size tar-data-buffer) (buffer-size)) (eq tar-data-swapped (> (buffer-size tar-data-buffer) (buffer-size))))))
--> installing package: company@auto-completion... [4/9]
An error occurred while installing company (error: (cl-assertion-failed (or (= (buffer-size tar-data-buffer) (buffer-size)) (eq tar-data-swapped (> (buffer-size tar-data-buffer) (buffer-size))))))
--> installing package: company-quickhelp@auto-completion... [5/9]
An error occurred while installing company-quickhelp (error: (cl-assertion-failed (or (= (buffer-size tar-data-buffer) (buffer-size)) (eq tar-data-swapped (> (buffer-size tar-data-buffer) (buffer-size))))))
--> installing package: company-statistics@auto-completion... [6/9]
An error occurred while installing company-statistics (error: (cl-assertion-failed (or (= (buffer-size tar-data-buffer) (buffer-size)) (eq tar-data-swapped (> (buffer-size tar-data-buffer) (buffer-size))))))
--> installing package: helm-c-yasnippet@auto-completion... [7/9]
An error occurred while installing helm-c-yasnippet (error: (cl-assertion-failed (or (= (buffer-size tar-data-buffer) (buffer-size)) (eq tar-data-swapped (> (buffer-size tar-data-buffer) (buffer-size))))))
--> installing package: helm-company@auto-completion... [8/9]
An error occurred while installing helm-company (error: (cl-assertion-failed (or (= (buffer-size tar-data-buffer) (buffer-size)) (eq tar-data-swapped (> (buffer-size tar-data-buffer) (buffer-size))))))
--> installing package: yasnippet@auto-completion... [9/9]
An error occurred while installing yasnippet (error: (cl-assertion-failed (or (= (buffer-size tar-data-buffer) (buffer-size)) (eq tar-data-swapped (> (buffer-size tar-data-buffer) (buffer-size))))))
balakrishnanc commented 8 years ago

Problem does not appear when using emacs (and not emacs-plus) version 25.0.95.1.

a13ph commented 8 years ago

I appear to be having this again, on fresh new develop versions of everything with template config even

a13ph commented 8 years ago

@d12frosted None of suggestions here have helped me, including nuking elpa, excluding packages from messages on which freeze happens. I don't have 25.0 easily available though. And 24.5.1 errors out in the other way, with (void-function cl-struct-define), which i don't even think is relevant

bmag commented 8 years ago

The void-function error is likely because of byte-compilation incompatibilities. e.g. .elc files that are compiled with Emacs 25.0 can fail to load in Emacs 24.5 and vice-versa.

Try calling spacemacs/recompile-elpa when that happens, or alternatively delete all .elc files from elpa subdirectories (no byte-compiled files means no byte-compilation incompatibilities :smile:)

synic commented 8 years ago

@bmag: This happens to me every time I update, and I haven't changed which version of emacs I'm using.

Every time I update packages, I have to delete melpa and re-download everything. I don't think it's the emacs version mismatch.

The good news is, wiping elpa does fix it for me.

bmag commented 8 years ago

@synic oh well, I don't know why it happens to you in that case. What if next time you use M-x spacemacs/recompile-elpa instead of re-download. And if recompilation doesn't work, you can try deleting only the elc files before wiping and re-downloading, just to see what happens. Note that spacemacs/recompile-elpa only recompiles el files that already have elc files, so it won't do anything if you delete the elc files beforhand.

jackkamm commented 8 years ago

Want to report that I was experiencing this exact problem on my recent archlinux install, getting errors like:

An error occurred while installing adaptive-wrap (error: (bad-signature adaptive-wrap-0.5.el.sig))

and having emacs refusing to install packages as a result.

Interestingly, I found this only to occur in the emacs gui. Starting emacs -nw allowed emacs to install the packages correctly.

I was able to finally resolve this problem by setting up and configuring gnupg. Make sure you have a .gnupg folder, and have private-public key setup with gpg --full-gen-key (link). Once I was able to read and write .gpg files I found the emacs gui was willing to install the packages with bad signatures.

caolan commented 7 years ago

I can confirm I also had this problem on a fresh Emacs (not spacemacs) install, and that installing gpg and setting up a key with gpg --full-gen-key fixed it for me. Posting this here since @jackkamm's comment helped me out and it indicates a possible upstream issue.

OpenBSD 6.1 (amd64) emacs-25.1p3-gtk3 installed via pkg_add

bh1xuw commented 6 years ago

Is your GFW proxy working? DO NOT use socks proxies. HTTP proxy may work.

josiah14 commented 5 years ago

This issue appeared for me on the develop branch (using it for Mercury and Hy support). Moving from the master branch to develop broke Spacemacs for me. I'm on Ubuntu 18.04. Tried upgrading gnupg by installing the latest through compiling from source and generating new gpg keys, but that didn't do anything for me. I also tried various methods of installing emacs 25 (via Nix using nix-env, and then removing that and installing via apt, which also provides Emacs 25). None of these worked. In the end, I just set package-check-signature to nil to get things working again.

duianto commented 5 years ago

If your able to install or compile Emacs 26.3. There has been reports that it the/a signature issue.

Here's a gist with compilation instructions, that I've tested in Ubuntu 18.04.3. https://gist.github.com/Yevgnen/316e7e69fc224d0c2722222795944c84

But I'm using the snap for 26.3 at the moment in a virtualbox vm and it seems to be working fine.

github-actions[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!