zhumengzhu
zhumengzhu

Reputation: 778

Rust-mode listed in MELPA, but not found in package install

Very Similar Question

And I am currently trying to install rust-mode for emacs 24.5.1 following the instructions at https://github.com/rust-lang/rust-mode. Firstly I installed manually, it worked fun. But when I wanted to install it by MELPA, I got a problem. I'v added

(when (>= emacs-major-version 24)
  (require 'package)
  (package-initialize)
  (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t)
  )

(when (< emacs-major-version 24)
  ;; For important compatibility libraries like cl-lib
  (add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")))
(package-initialize)

to my ~.emacs.d/init.el. However, when I restart and do M-x package install [RETURN]rust-mode[RETURN], it returns [No Match] and I can't find it when I list the packages. However, I can find it at http://melpa.org/packages/rust-mode-20160106.642.el.


I changed my configuration to prelude's, then the problem is solved, so there must be something wrong with my old configuration, I'll try to find why.


I'm not a good English speaker, sorry for my poor English. Any help is much appreciated; Thank you!

Upvotes: 2

Views: 2093

Answers (2)

Jim Reesman
Jim Reesman

Reputation: 334

I just had this same experience. M-x package-install, type 'rust-mode' and emacs announces 'No match'. M-x package-list-packages does show rust-mode. Using the package list UI, C-s 'rust-mode', press 'i' (install) => a capital 'I' appears in the first column. 'x' terminates the package list mode, and downloads and installs rust-mode. Now, M-x package-list-packages shows rust-mode installed. I do not know why the one path works when the other "normal" path failed.

Upvotes: 0

zhumengzhu
zhumengzhu

Reputation: 778

This is my stupid mistake.

The author of the configuration which I use says in Checklist:

It’s my intentional design that you can NOT install packages from melpa-unstable by default. Experienced users can modify variable melpa-include-packages in “~/.emacs.d/lisp/init-elpa.el” to install packages from melpa-unstable.

I add rust-mode to “~/.emacs.d/lisp/init-elpa.el” and the problem sovled.

@jpkotta Thanks for your help, sorry for wasting your time.

Upvotes: 0

Related Questions