Use-package: Failing to load Use-Package

Created on 16 Dec 2017  ·  16Comments  ·  Source: jwiegley/use-package

Thank you for taking the time to create such a brilliant package. Having some trouble getting the "use-package" installed from my init.el; I'm a new user and was wondering if you had any suggestions.

When I run the refresh-package-contents it says the packages have been updated, but I still the get the error below.

Thank you. I would really appreciate any assistance.

MY ENTIRE INIT.EL:

(require 'package)
(setq package-enable-at-startup nil)
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))
(add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/"))
(package-initialize)

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

(eval-when-compile
  (require 'use-package))

ENTIRE ERROR MESSAGE:

Debugger entered--Lisp error: (file-error "Cannot open load file" "No such file or directory" "use-package")
  require(use-package)
  (progn (require (quote use-package)))
  eval((progn (require (quote use-package))) nil)
  #[128 "\301\302\303B\"D\207" [lexical-binding quote eval progn] 5 1787313]((require (quote use-package)))
  macroexpand((eval-when-compile (require (quote use-package))) nil)
  macroexp-macroexpand((eval-when-compile (require (quote use-package))) nil)
  macroexp--expand-all((eval-when-compile (require (quote use-package))))
  macroexpand-all((eval-when-compile (require (quote use-package))))
  eval-sexp-add-defvars((eval-when-compile (require (quote use-package))))
  elisp--eval-last-sexp(nil)
  eval-last-sexp(nil)
  funcall-interactively(eval-last-sexp nil)
  call-interactively(eval-last-sexp nil nil)
  command-execute(eval-last-sexp)

Most helpful comment

If I call correctly, I deleted the elpa directory and let use-package re-pull everything. I assume there was a conflicting version of a package that was causing me the issues. Hope this help you - best of luck.

--
Regards,
Kyle Cotton
E: [email protected]

On 27/01/2019, 00:29, "David Banas" notifications@github.com wrote:

@KyleCotton <https://github.com/KyleCotton> , can you say
how you resolved it, please?
(I'm having the same issue.)
Thanks,
-db
—
You are receiving this because you were mentioned.
Reply to this email directly, 
view it on GitHub <https://github.com/jwiegley/use-package/issues/593#issuecomment-457878305>, or 
mute the thread <https://github.com/notifications/unsubscribe-auth/AcFmYdzb-rzhCxYA3tVOoCNH-5hTg43Cks5vHPL6gaJpZM4REd4X>.

All 16 comments

Does this happen before use-package is installed, after it's installed, or both? What happens if you move (package-refresh-contents) after (package-initialize)?

Thanks for the suggestions, this is the error I'm getting now, after making the amendments, it appears to have made no difference. Is there anything else it could be? Thank you for taking the time to reply.

Debugger entered--Lisp error: (file-error "Cannot open load file" "No such file or directory" "use-package")
  require(use-package)
  (progn (require (quote use-package)))
  eval((progn (require (quote use-package))) nil)
  #[128 "\301\302\303B\"D\207" [lexical-binding quote eval progn] 5 1787313]((require (quote use-package)))
  macroexpand((eval-when-compile (require (quote use-package))) nil)
  macroexp-macroexpand((eval-when-compile (require (quote use-package))) nil)
  macroexp--expand-all((eval-when-compile (require (quote use-package))))
  macroexpand-all((eval-when-compile (require (quote use-package))))
  eval-sexp-add-defvars((eval-when-compile (require (quote use-package))))
  elisp--eval-last-sexp(nil)
  eval-last-sexp(nil)
  funcall-interactively(eval-last-sexp nil)
  call-interactively(eval-last-sexp nil nil)
  command-execute(eval-last-sexp)

What version of Emacs?

Hi, I'm using GNU Emacs 25.3.1

I've still been unable to rectify the issue.

On Sun, Dec 17, 2017 at 3:15 PM, Nick McCurdy notifications@github.com
wrote:

What version of Emacs?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/jwiegley/use-package/issues/593#issuecomment-352262745,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AcFmYTvnfaUw-NzGOrG-RPOzRKOgSaP3ks5tBTAegaJpZM4REd4X
.

--

Regards,
Kyle Cotton
[email protected]

That's odd, so am I. I'll try it later on my Emacs installation when I have
a chance.

On Sun, Dec 17, 2017 at 12:11 PM Kyle Cotton notifications@github.com
wrote:

Hi, I'm using GNU Emacs 25.3.1

I've still been unable to rectify the issue.

On Sun, Dec 17, 2017 at 3:15 PM, Nick McCurdy notifications@github.com
wrote:

What version of Emacs?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<
https://github.com/jwiegley/use-package/issues/593#issuecomment-352262745
,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AcFmYTvnfaUw-NzGOrG-RPOzRKOgSaP3ks5tBTAegaJpZM4REd4X

.

--

Regards,
Kyle Cotton
[email protected]


You are receiving this because you commented.

Reply to this email directly, view it on GitHub
https://github.com/jwiegley/use-package/issues/593#issuecomment-352270409,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA4l9HMAXZI52LxAzfc4V1O2lxA1CGCqks5tBUs9gaJpZM4REd4X
.

Thank you. Not sure what it could be. No one seems to have experienced this
issue.

On Sun, 17 Dec 2017 at 5:50 pm, Nick McCurdy notifications@github.com
wrote:

That's odd, so am I. I'll try it later on my Emacs installation when I have
a chance.

On Sun, Dec 17, 2017 at 12:11 PM Kyle Cotton notifications@github.com
wrote:

Hi, I'm using GNU Emacs 25.3.1

I've still been unable to rectify the issue.

On Sun, Dec 17, 2017 at 3:15 PM, Nick McCurdy notifications@github.com
wrote:

What version of Emacs?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<

https://github.com/jwiegley/use-package/issues/593#issuecomment-352262745

,
or mute the thread
<

https://github.com/notifications/unsubscribe-auth/AcFmYTvnfaUw-NzGOrG-RPOzRKOgSaP3ks5tBTAegaJpZM4REd4X
>

.

--

Regards,
Kyle Cotton
[email protected]


You are receiving this because you commented.

Reply to this email directly, view it on GitHub
<
https://github.com/jwiegley/use-package/issues/593#issuecomment-352270409
,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AA4l9HMAXZI52LxAzfc4V1O2lxA1CGCqks5tBUs9gaJpZM4REd4X

.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/jwiegley/use-package/issues/593#issuecomment-352272842,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AcFmYTZtdCdAQyYUDZoQsXr7nRVpIEXIks5tBVRGgaJpZM4REd4X
.

>

Regards,
Kyle Cotton
[email protected]

Morning,
I understand your are incredibly busy; just wondering if you have had chance to look into the “use-package” issue?

Thank you.

On 17 Dec 2017, at 5:51 pm, Kyle Cotton kylecottonkc@gmail.com wrote:

Thank you. Not sure what it could be. No one seems to have experienced this issue.

On Sun, 17 Dec 2017 at 5:50 pm, Nick McCurdy <[email protected] notifications@github.com> wrote:
That's odd, so am I. I'll try it later on my Emacs installation when I have
a chance.

On Sun, Dec 17, 2017 at 12:11 PM Kyle Cotton <[email protected] notifications@github.com>
wrote:

Hi, I'm using GNU Emacs 25.3.1

I've still been unable to rectify the issue.

On Sun, Dec 17, 2017 at 3:15 PM, Nick McCurdy <[email protected] notifications@github.com>
wrote:

What version of Emacs?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<
https://github.com/jwiegley/use-package/issues/593#issuecomment-352262745 https://github.com/jwiegley/use-package/issues/593#issuecomment-352262745
,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AcFmYTvnfaUw-NzGOrG-RPOzRKOgSaP3ks5tBTAegaJpZM4REd4X https://github.com/notifications/unsubscribe-auth/AcFmYTvnfaUw-NzGOrG-RPOzRKOgSaP3ks5tBTAegaJpZM4REd4X

.

--

Regards,
Kyle Cotton
[email protected] kylecottonkc@gmail.com


You are receiving this because you commented.

Reply to this email directly, view it on GitHub
<https://github.com/jwiegley/use-package/issues/593#issuecomment-352270409 https://github.com/jwiegley/use-package/issues/593#issuecomment-352270409>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA4l9HMAXZI52LxAzfc4V1O2lxA1CGCqks5tBUs9gaJpZM4REd4X https://github.com/notifications/unsubscribe-auth/AA4l9HMAXZI52LxAzfc4V1O2lxA1CGCqks5tBUs9gaJpZM4REd4X>
.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/jwiegley/use-package/issues/593#issuecomment-352272842, or mute the thread https://github.com/notifications/unsubscribe-auth/AcFmYTZtdCdAQyYUDZoQsXr7nRVpIEXIks5tBVRGgaJpZM4REd4X.

--
Regards,
Kyle Cotton
[email protected] slwa11kc1@dcsch.co.uk

@KyleCotton Does this happen when you're byte-compiling? If so, you'll need to wrap your add-to-list calls with eval-and-compile.

Same here with a complete new installation:

(eval-when-compile
  (require 'use-package))

(use-package swiper)

Strange, with your version @KyleCotton it works for me.

Sorry for first comment, of course I have to initialize package:

(require 'package)
(package-initialize)

(eval-when-compile
  (require 'use-package))

(use-package swiper
  :ensure t)

I had this issue too. I deleted use-package and on the next restart it came back up:

(require 'package)
(setq package-enable-at-startup nil)

;; https://emacs.stackexchange.com/a/2989
(setq package-archives
      '(("elpa"     . "https://elpa.gnu.org/packages/")
        ("melpa-stable" . "https://stable.melpa.org/packages/")
        ("melpa"        . "https://melpa.org/packages/"))
      package-archive-priorities
      '(("melpa-stable" . 10)
        ("elpa"     . 5)
        ("melpa"        . 0)))

(package-initialize)

;; Bootstrap `use-package`
(unless (package-installed-p 'use-package)
  (package-refresh-contents)
  (package-install 'use-package))
(require 'use-package)

I have resolved the issue I was having. Is anyone still having problems with this before I close the issue?

@KyleCotton , can you say _how_ you resolved it, please?
(I'm having the same issue.)

Thanks,
-db

If I call correctly, I deleted the elpa directory and let use-package re-pull everything. I assume there was a conflicting version of a package that was causing me the issues. Hope this help you - best of luck.

--
Regards,
Kyle Cotton
E: [email protected]

On 27/01/2019, 00:29, "David Banas" notifications@github.com wrote:

@KyleCotton <https://github.com/KyleCotton> , can you say
how you resolved it, please?
(I'm having the same issue.)
Thanks,
-db
—
You are receiving this because you were mentioned.
Reply to this email directly, 
view it on GitHub <https://github.com/jwiegley/use-package/issues/593#issuecomment-457878305>, or 
mute the thread <https://github.com/notifications/unsubscribe-auth/AcFmYdzb-rzhCxYA3tVOoCNH-5hTg43Cks5vHPL6gaJpZM4REd4X>.

This won't load for me either on Linux mint 19.1, emacs26.3. Nothing on Google except here, has this been solved yet?

On one of my laptops I have the same issue, compilation works fine, no errors. Arch linux, emacs 26.3. Exactly the same setup on other laptops and they works fine

Was this page helpful?
0 / 5 - 0 ratings

Related issues

komolovf picture komolovf  ·  8Comments

alphapapa picture alphapapa  ·  14Comments

xuzhao9 picture xuzhao9  ·  7Comments

Yevgnen picture Yevgnen  ·  5Comments

cswarth picture cswarth  ·  5Comments