spacemacs icon indicating copy to clipboard operation
spacemacs copied to clipboard

Package emacs (yes, emacs) unavailable

Open madanh opened this issue 6 years ago • 16 comments

Description :octocat:

Package emacs unavailable (tried to activate git layer). Also from errors it seems that emacs 25 is being requested.

Tried removing emacs.d/elpa: several other packages broke with similar errors.

Reproduction guide :beetle:

  • Start Emacs
  • Uncomment the git layer in .spacemacs
  • SPC f e R
  • Restart emacs

Observed behaviour: :eyes: :broken_heart: magit instalation fails with Package emacs unavailable...

Expected behaviour: :heart: :smile: magit installed

System Info :computer:

  • OS: gnu/linux
  • Emacs: 24.5.1
  • Spacemacs: 0.200.13
  • Spacemacs branch: master (rev. c7a103a)
  • Graphic display: t
  • Distribution: spacemacs
  • Editing style: vim
  • Completion: helm
  • Layers:
(helm auto-completion emacs-lisp git common-lisp python deft latex)

Backtrace :paw_prints:

The part relevant to magit

An error occurred while installing magit (error: (error Package `emacs-25.1' is unavailable))
--> installing package: magit-gitflow@git... [7/9]
Package emacs is unavailable. Is the package name misspelled?

Package emacs is unavailable. Is the package name misspelled?

Package emacs is unavailable. Is the package name misspelled?

An error occurred while installing magit-gitflow (error: (error Package `emacs-25.1' is unavailable))


Errors in spacemacs buffer after removing ~/emacs.d/elpa/ and restarting a couple of times

Found 9 new package(s) to install...
--> refreshing package archive: gnu... [3/3]
--> installing package: anaconda-mode@python... [1/9]
Package emacs is unavailable. Is the package name misspelled?

Package emacs is unavailable. Is the package name misspelled?

Package emacs is unavailable. Is the package name misspelled?

An error occurred while installing anaconda-mode (error: (error Package `emacs-25' is unavailable))
--> installing package: company-anaconda@python... [2/9]
Package emacs is unavailable. Is the package name misspelled?

Package emacs is unavailable. Is the package name misspelled?

Package emacs is unavailable. Is the package name misspelled?

An error occurred while installing company-anaconda (error: (error Package `emacs-25' is unavailable))
--> installing package: evil-ediff@spacemacs-evil... [3/9]
Package evil-ediff is unavailable. Is the package name misspelled?
--> installing package: evil-magit@git... [4/9]
Package emacs is unavailable. Is the package name misspelled?

Package emacs is unavailable. Is the package name misspelled?

Package emacs is unavailable. Is the package name misspelled?

An error occurred while installing evil-magit (error: (error Package `emacs-25.1' is unavailable))
--> installing package: git-commit@git... [5/9]
Package emacs is unavailable. Is the package name misspelled?

An error occurred while installing git-commit (error: (error Package `emacs-25.1' is unavailable))
--> installing package: magit@git... [6/9]
Package emacs is unavailable. Is the package name misspelled?

Package emacs is unavailable. Is the package name misspelled?

Package emacs is unavailable. Is the package name misspelled?

An error occurred while installing magit (error: (error Package `emacs-25.1' is unavailable))
--> installing package: magit-gitflow@git... [7/9]
Package emacs is unavailable. Is the package name misspelled?

Package emacs is unavailable. Is the package name misspelled?

Package emacs is unavailable. Is the package name misspelled?

An error occurred while installing magit-gitflow (error: (error Package `emacs-25.1' is unavailable))
--> installing package: orgit@git... [8/9]
Package emacs is unavailable. Is the package name misspelled?

Package emacs is unavailable. Is the package name misspelled?

Package emacs is unavailable. Is the package name misspelled?

An error occurred while installing orgit (error: (error Package `emacs-25.1' is unavailable))
--> installing package: pyenv-mode@python... [9/9]
Package emacs is unavailable. Is the package name misspelled?

Package emacs is unavailable. Is the package name misspelled?

An error occurred while installing pyenv-mode (error: (error Package `emacs-25' is unavailable))

madanh avatar Jul 02 '18 12:07 madanh

A workaround is to install emacs > 25 and(!) switch to develop branch. There are hints that the situation with package versioning might improve soon.

madanh avatar Jul 02 '18 14:07 madanh

Packages can require a minimum Emacs version to work, and when the installed version of Emacs isn't new enough, you get the "emacs-XXX is unavailable" message. That's what happens here - Magit (and others) now require at least Emacs 25.1 and won't install on Emacs 24.5. You should rollback your packages if you can.

The situation of master branch isn't so good right now. What you can do is:

  1. wait for next stable release of Spacemacs (don't know what that will happen)
  2. switch to develop branch
  3. change each problematic package to use a location recipe that points to good commit (don't actually do that, it's possible but ridiculous)

I'm guessing for the workaround you had to switch to develop branch because of other issues that are fixed in develop.

bmag avatar Jul 09 '18 08:07 bmag

A nitpicking comment: the error message could be clearer. Like saying explicitly (and in the first place, not in parentheses) that installed emacs is too old.

madanh avatar Jul 14 '18 13:07 madanh

I'm not sure a big enough deal was made about this, but, it breaks the quick start instructions on linux (and OSX?). As a vim user I was looking to ease myself into emacs + evil, found spacemacs, followed the directions and whon whon whon helm (autocompletion?) requires emacs 25.x

jasmith79 avatar Aug 20 '18 21:08 jasmith79

I have apt installed emacs 25.3 and this still happens (on Ubuntu 16.04.5).

emrainey avatar Nov 02 '18 17:11 emrainey

@emrainey which packages caused the error? In the original post there's this line:

An error occurred while installing magit (error: (error Package `emacs-25.1' is unavailable))

You should have similar lines, please post all of them. We support Emacs 25.1 and newer, so if a package got stricter restrictions I'd like to know, thanks.

bmag avatar Nov 02 '18 19:11 bmag

Found the issue, even though I installed emacs25, emacs24 was being run when executing "emacs". Had to remove emacs24 and reinstall emacs25. Packaging system seems to be geared to defeat normal usage.

emrainey avatar Nov 05 '18 18:11 emrainey

I'm having a similar issue, emacs 25.2.2, devel branch of spacemacs, just that for me it is: An error occurred while installing org-brain (error: (error Package ‘emacs-26.1’ is unavailable))

manuel-arguelles avatar Jan 06 '20 14:01 manuel-arguelles

I got this error because version resolution in $PATH resolves to the old system-wide version whereas the newest version has lower priority. Putting a symbolic link into ~/bin to the correct version helped.

biocyberman avatar Jun 09 '20 19:06 biocyberman

I have the same issue, but the README.md says Spacemacs requires Emacs 24.4 or above, I think it should change to 25.1, thanks!

standin000 avatar Jul 01 '20 08:07 standin000

Same - I have emacs 24.5.1 on mac - gives this issue

bradparks avatar Oct 29 '20 23:10 bradparks

As mentioned above by bmag:

Packages can require a minimum Emacs version to work, and when the installed version of Emacs isn't new enough, you get the "emacs-XXX is unavailable" message. That's what happens here - Magit (and others) now require at least Emacs 25.1 and won't install on Emacs 24.5.

For example as mentioned above, when the comment was posted, org-brain required Emacs 26.1:

An error occurred while installing org-brain (error: (error Package ‘emacs-26.1’ is unavailable))

A lot of issues would be solved if your able to install a newer version of Emacs, the latest version is 27.1 https://www.gnu.org/software/emacs/

And if your not on the Spacemacs develop branch.

develop is the recommended branch until the next version is released (I have no insight into when that is).

To try the develop branch:

Backup your current setup and make sure that there isn't a .emacs.d directory or a .spacemacs file in your home directory. Then navigate to your home directory in a terminal (or command prompt) and clone directly to the develop branch with:

git clone -b develop https://github.com/syl20bnr/spacemacs .emacs.d

duianto avatar Oct 31 '20 08:10 duianto

I install emacs 27.1, and it worked... thanks!

bradparks avatar Oct 31 '20 12:10 bradparks

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!

github-actions[bot] avatar Mar 14 '22 11:03 github-actions[bot]

I still get this issue while installing org-mode

Spacemacs and emacs version: [email protected]

An error occurred while installing org-projectile (error: (error Package ‘emacs-28’ is unavailable))

pamitabh avatar Sep 27 '23 19:09 pamitabh

I still get this issue while installing org-mode

Spacemacs and emacs version: [email protected]

An error occurred while installing org-projectile (error: (error Package ‘emacs-28’ is unavailable))

I just did git pull on ~/.emacs.d and the same happens to me :(

neverkas avatar Oct 05 '23 14:10 neverkas