0

I am on emacs version 26.3 for OS X.

This is my ~/.emacs.d/init.el file

(require 'package)

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

I have run M-x eval-buffer on this init.el file. I would like to install packages from Melpa such as move-text. However M-x package-list doesn't show move-text. This is the case for many packages. How do I get alllll the packages from Melpa available for M-x package-install?

Drew
  • 29,895
  • 7
  • 74
  • 104
BigBoy1337
  • 4,735
  • 16
  • 70
  • 138
  • You mention `M-x package-list`. Did you mean `M-x list-packages` (an old name for `M-x package-list-packages`). Try also [`M-x package-refresh-contents`](https://github.com/melpa/melpa/blob/master/README.md#usage); and see if any errors logged in `*Messages*`. – Y. E. Nov 28 '21 at 07:47
  • Potential duplicate, f.i.: https://stackoverflow.com/questions/24833964/package-listed-in-melpa-but-not-found-in-package-install, https://stackoverflow.com/questions/51925446/php-mode-for-gnu-emacs-not-listed-as-a-melpa-package. – Y. E. Nov 28 '21 at 07:56
  • Thank you! list-packages helped me discover that my TLS certificate had expired. – BigBoy1337 Dec 07 '21 at 19:48

1 Answers1

0

It took a few things to fix this. First of a M-x package-list is outdated by M-x list-packages (thanks @Y.E.).

Now when I M-x list-packages I got the following error: Can't use the package manager. It says The TLS Connection to elpa.org:443 is insecure.

To fix this I found this link (https://www.reddit.com/r/emacs/comments/pyevj8/what_should_i_do_cant_use_the_package_manager_it/) which advises adding package-archives for gnu and a mirror of melpa. My init.el now looks like this:

(require 'package)

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

'(package-archives
   '(("gnu" . "http://elpa.gnu.org/packages/")
     ("melpa" . "http://www.mirrorservice.org/sites/stable.melpa.org/packages/")))
(package-initialize)

And it seems that it Can fetch all packages from Melpa. I don't entirely understand why gnu is necessary but it seems to be.

BigBoy1337
  • 4,735
  • 16
  • 70
  • 138