1

I'm relatively new to Emacs (and Linux for that matter). I'm trying to install flycheck. Following the installation instructions, I added

(require 'package)
(add-to-list 'package-archives
         '("melpa" . "http://melpa.org/packages/") t)
(package-initialize)

to my .emacs file (then killed Emacs and restarted).

Then M-x package-install RET flycheck RET. But Emacs says [No match]. Any ideas what I'm doing wrong?

Platform: Emacs 24.3.1, Ubuntu 14.04 LTS 64bit running on VMware (Windows 10 host).

yroc
  • 886
  • 1
  • 10
  • 16
  • 1
    In no way sure what you are doing wrong or how the whole package stuff is intended to work as I don't use it, but `M-x package-refresh-contents` before `M-x package-install RET flycheck RET` should do the job. – mikyra Feb 21 '16 at 05:36
  • @mikyra Well apparently you _did_ know what I was doing wrong :-) Would have been nice for flycheck to have included this in their install instructions. Thank you. – yroc Feb 21 '16 at 12:51

1 Answers1

4

I'm also quite new to emacs, and I've had the same problem. What worked for me:

  1. M-x package-list-packages RET
  2. Find flycheck, mark it with an I
  3. Use X to install marked package.

For reference, this is how I call package in my .emacs:

(require 'package) 
(add-to-list 'package-archives
             '("melpa-stable" . "http://stable.melpa.org/packages/"))
(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)`
Peter Wills
  • 98
  • 1
  • 7
  • Thanks Peter -- looks like we're in this together ;-) The `package-list-packages` command is good to know. Regarding your `.emacs` file, I think the part that starts with `when` is only needed if you're running Emacs 23 or lower. – yroc Feb 22 '16 at 15:57
  • I think you're right. Thanks for the tip! Always looking to clean up my `.emacs` :) – Peter Wills Feb 23 '16 at 16:02
  • For me it says, "I is undefined". – lol Jul 13 '22 at 17:05