Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

js2-refactor from melpa: Package `emacs-24.1' is unavailable

Tags:

emacs

elpa

I'm on GNU Emacs 24.3.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.6.0), but when I try to use package (melpa) to install js2-refactor I get this odd error:

package-compute-transaction: Package `emacs-24.1' is unavailable

Any ideas what this could be about? Actually, this might be coming from a dependency of js2-refactor: js2-mode. It gives the same error.

like image 956
user2054900 Avatar asked Apr 23 '13 19:04

user2054900


1 Answers

The reason for this can be a lingering old version of package.el in your load path. package.el was officially included in GNU Emacs 24, and the downloadable file for earlier Emacs versions doesn't support dependencies on built-in packages (emacs-24.1 is considered a built-in package here).

Type M-x locate-library RET package to find where Emacs is getting its package.el from. The path it shows should end with lisp/emacs-lisp/package.elc. If it doesn't, try getting rid of the indicated file (or changing the load path so Emacs doesn't find it).

like image 197
legoscia Avatar answered Sep 28 '22 06:09

legoscia