spacemacs icon indicating copy to clipboard operation
spacemacs copied to clipboard

Fresh Spacemacs install with Emacs 29.1.1 breaks Emacs

Open nicolasshu opened this issue 10 months ago • 13 comments

Fresh Spacemacs install with Emacs 29.1.1 breaks Emacs

OS: Arch-Linux I have tried to do a fresh install of Emacs / Spacemacs, and many packages are not being able to be found.

$ pacman -S emacs
$ emacs --version
GNU Emacs 29.1
Copyright (C) 2023 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of GNU Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

Then installing Spacemacs at df30d9592674f71fd304091de61582f1682d506d

git clone https://github.com/syl20bnr/spacemacs $HOME/.emacs.d

When opening up Spacemacs, these are the errors:

 ■  Error (use-package): Cannot load clean-aindent-mode
 ■  Error (use-package): Cannot load column-enforce-mode
 ■  Error (use-package): drag-stuff/:init: Symbol’s function definition is void: drag-stuff-mode
 ■  Error (use-package): Cannot load editorconfig
 ■  Error (use-package): evil-anzu/:init: Symbol’s function definition is void: global-anzu-mode
 ■  Error (use-package): Cannot load evil-anzu
 ■  Error (use-package): Cannot load evil-collection
 ■  Error (use-package): evil-easymotion/:init: Symbol’s function definition is void: evilem-default-keybindings
 ■  Error (use-package): Cannot load evil-mc
 ■  Error (use-package): Cannot load evil-textobj-line
 ■  Error (use-package): eyebrowse/:init: Symbol’s function definition is void: eyebrowse-mode
 ■  Error (use-package): Cannot load eyebrowse

nicolasshu avatar Aug 15 '23 19:08 nicolasshu

Reproduced on MacOS 12.3 on Emacs 29.1 (homebrew) and the "cask" version of Emacs.

Also reproduced in a debian docker image on GNU Emacs 28.2

tennysontbardwell avatar Aug 16 '23 05:08 tennysontbardwell

Also duplicated in debian docker on a spacemacs 4882f70e6541275969b09b52394bb9af563852f4 (codelink) from 3wk ago. Is this a MELPA issue? (website | github CI). I do not see any open issues or failing builds.

Alternatively, I had only a single error[1] when installing from develop in spacemacs-base mode.

[1]

 ■  Error (use-package): Cannot load evil-mc

tennysontbardwell avatar Aug 16 '23 05:08 tennysontbardwell

Seems to be a melpa problem. When I wait a few minutes, some more packages can be installed. Might be that too many requests in a certain amount of time lead to a rejection from the side of melpa? Have not verified it, but would be my best guess to add a sleep timer to the requests to melpa.

jannikseidel avatar Aug 16 '23 15:08 jannikseidel

After debugging this for my own installation last night, I found that setting the following within the .spacemacs config file helped prevent Melpa package installation errors.

(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")

This was added within the (defun dotspacemacs/init (...) ) function as the first line

(defun dotspacemacs/init ()
 (setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")
 ;; rest of init config ...
 )

Prior to adding that configuration line I also found that artificially throttling my bandwidth to something like 10Mb/s improved the process and reduced the number of packages that experienced an error.

EDIT: Applied the typo fixes from @sfalmo

Dangeranger avatar Aug 16 '23 16:08 Dangeranger

Reducing the bandwidth seems to help also in my case. But I could not reproduce the solution of @Dangeranger. There are a few typos, but even after correcting them (see below), the package installs fail most of the time.

(defun dotspacemacs/init ()
 (setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")
 ;; rest of init config ...
 )

sfalmo avatar Aug 16 '23 17:08 sfalmo

Using @sfalmo 's modification helped. I can confirm that after opening Emacs, letting the system attempt a compilation until it failed, closing, and reopening in a cycle ~300 times I was able to acquire all of my packages and they seem to be working fine, but obviously that's not really a solution. I couldn't figure out how to implement a time delay, but this brute force method worked for anyone coming trying to figure out how to just get a working configuration. In my case, progress would often pause (ie the # of packages remaining to install stayed constant for period of up to 10-20 cycles in a row), but if you keep with it eventually it will work.

joshjob42 avatar Aug 16 '23 20:08 joshjob42

When I tried again now - things just worked for me, huge relief after a day trying to remember long forgotten plain emacs commands ... :grin:

joakim-hove avatar Aug 16 '23 21:08 joakim-hove

I have problems with the first install of Spacemacs in my machine using Emacs 28.2...with --debug-init I see messages with

"Emacs version too old"

Is this issue related? 28.2 is the previous version.

yukiteruamano avatar Aug 16 '23 22:08 yukiteruamano

@joakim-hove Works now for me first try as well. Looks like whatever was going on has been resolved. (Mac Sonoma beta, emacs-mac 29 with ~all options turned on, fresh emacs).

joshjob42 avatar Aug 16 '23 23:08 joshjob42

(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")

Problem solved, new install without problems!

yukiteruamano avatar Aug 18 '23 04:08 yukiteruamano

Adding the recommendation by @Dangeranger and @sfalmo did not solve the problem for me with a fresh Emacs 29 install. I'm still seeing the messages stating packages are unavailable.

I also tried going back to Emacs 28 and had the same issue using the latest Spacemacs install.

Update: I was able to get packages to install by gradually adding layers back in but I believe there was something in my .spacemacs file causing the problem.

The following line was in my dotspacemacs/user-init and removing this line stopped the unavailable packages messages and resulted in a usable system. Now I'm not sure how I will get the Vue 2 language server setup working but at least I have Emacs up and running.


  (use-package lsp-vue
    :ensure t
    :config
    (add-hook 'vue-mode-hook #'lsp))  

robertmerrill avatar Sep 13 '23 17:09 robertmerrill

Even I am getting the same error image

please help me how to fix this. I am new to Emacs

AvAkanksh avatar Dec 28 '23 20:12 AvAkanksh

I was able to fix this by running the following in emacs 29.2 after unsuccesful initial start of spacemacs.

: (setq package-check-signature nil) then M-x package-install RET gnu-elpa-keyring-update

DoaneAS avatar May 13 '24 01:05 DoaneAS