1

I'm having trouble getting use-package to work on my work Mac. I just added it to my linux box at home and everything was fine, but on the mac it can't find it. I've installed use-package from Melpa, and added it to my init file with:

(require 'use-package)

I've checked in the elpa folder and it's there fine, but it won't load. Any suggestions as to how I can get this to work?

iFunction
  • 1,208
  • 5
  • 21
  • 35
  • Is the path to the `use-package` directory in your `load-path`? You can test this by seeing if you get a non-`nil` value when evaluating `(member "PATH/TO/YOUR/USE-PACKAGE" load-path)`. If it isn't already there, you could try adding your `use-package` directory to the `load-path` (`(add-to-list 'load-path "PATH/TO/YOUR/USE-PACKAGE)`). If this doesn't work, reinstalling `use-package` may help (although I realize that's a non-answer as to what is actually going wrong). – D. Gillis Jul 16 '20 at 14:27
  • you can check with `M-x locate-library` as well - or `M-x package-reinstall` – Rorschach Jul 16 '20 at 14:31

1 Answers1

1

Thanks for the replies here. I've now solved this now, it just needed the following to get it working, the last part is what got it working, but a kind person on reddit suggested the first part also, so I've included that also:

(unless (package-installed-p 'use-package)
  (package-refresh-contents)
  (package-install 'use-package))

(eval-when-compile
  (require 'use-package))
iFunction
  • 1,208
  • 5
  • 21
  • 35