1

I am trying to install a package called yaml-mode on my Emacs. Basically, a syntax highlighting for .yaml files. My current syntax highlighters do not have support for yaml files, apparently.

Hence, I added the following in my init.el file:

;; Trying to install yaml-mode
(use-package yaml-mode
  :ensure t)

Unfortunately, after re-starting Emacs, I got the following error message:

Error (use-package): Failed to install yaml-mode: https://melpa.org/packages/yaml-mode-20220903.1821.el: Not found Disable showing Disable logging Error (use-package): Cannot load yaml-mode Disable showing Disable logging

Although it mentions not being able to use MELPA, I can see yaml-mode package on MELPA repository here.

I would like to keep using use-package since it helps to make my init file declarative and more reproducible. This is my whole init file, in case it is relevant.

How can I fix this?

3
  • 2
    Do package-refresh-contents and try again. Your package cache is probably out of date. Nov 2, 2022 at 18:36
  • Thanks. After your suggestion, the error message changed. I have updated my question. Nov 2, 2022 at 18:39
  • Oh, it was just a small typo after I commented-out. Nov 2, 2022 at 18:48

1 Answer 1

1

Professor Fran Burstall suggested executing the command package-refresh-contents as a comment in my original post. I executed his suggestion and now things work as expected. Thank you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.