Getting a no match when trying to install evil from emacs (M-x package-install RET evil [No match]) - how to fix?

392 views Asked by At

I saw this questionn https://emacs.stackexchange.com/questions/45056/how-do-i-install-the-evil-package but I can't decipher how to use it to help me.

I also have the same issue:

M-x package-install RET evil [No match]

I am following the instruction from here https://evil.readthedocs.io/en/latest/overview.html#installation-via-package-el and it says:

M-x package-refresh-contents
M-x package-install RET evil RET

the first one works fine. The second returns and error.

My emacs file is:

(meta_learning) brandomiranda~ ❯ cat .emacs
;; Open .v files with Proof General's Coq mode
(load "~/.emacs.d/lisp/PG/generic/proof-site")

(add-to-list 'load-path "~/.emacs.d/evil")
(require 'evil)
(evil-mode 1)

(eval-after-load "color-theme"
  '(progn
     (color-theme-initialize)
     (color-theme-dusk)
     (when (display-graphic-p)
       ;; settings for GUI emacs
       (add-to-list 'default-frame-alist '(background-color . "#282B35"))
       (add-to-list 'default-frame-alist '(foreground-color . "White"))
       (set-frame-font "Inconsolata 18" nil t))))
(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(ansi-color-faces-vector
   [default default default italic underline success warning error])
 '(ansi-color-names-vector
   ["#242424" "#e5786d" "#95e454" "#cae682" "#8ac6f2" "#333366" "#ccaa8f" "#f6f3e8"])
 '(custom-enabled-themes (quote (wheatgrass))))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )

(load-file (let ((coding-system-for-read 'utf-8))
                (shell-command-to-string "agda-mode locate")))

How to fix this?

2

There are 2 answers

0
Charlie Parker On

This doesn't really solve the exact question as asked but at least it install emacs for you:


This worked for me:

Evil Manual installation worked for me: https://evil.readthedocs.io/en/latest/overview.html#installation-via-package-el clone evil repo somewhere you know the path, I recommend ~, so run:

    git clone --depth 1 https://github.com/emacs-evil/evil.git

then add these line to your .emacs file in ~:

    vim .emacs

add:

(add-to-list 'load-path "path/to/evil")
(require 'evil)
(evil-mode 1)

likely:

(add-to-list 'load-path "~/evil")
(require 'evil)
(evil-mode 1)
0
jds On

For me, the issue was that I didn't realize RET indicated return. To be clear, do the following:

  • M-x
  • package-install (press "return" or "enter")
  • evil (press "return" or "enter" again)

That worked.