emacs can't find use-package

2.7k views Asked by At

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?

1

There are 1 answers

0
iFunction On

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))