Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The package ‘dash’ has already been loaded by package.el, attempting to load el-get version instead #2766

Open
Xparx opened this issue Jun 28, 2020 · 3 comments

Comments

@Xparx
Copy link

Xparx commented Jun 28, 2020

Hello,
I get the following warning when trying to install a few packages (same/similar to the issue here: #2335).

Warning (el-get): The package ‘dash’ has already been loaded by
package.el, attempting to load el-get version instead. To avoid
this warning either uninstall one of the el-get or package.el
version of dash, or call ‘el-get’ before ‘package-initialize’ to
prevent package.el from loading it.

The suggested solution in that thread escapes me. I try to put (el-get) at the top of my init.el file but it does nothing. How should I "call 'el-get' before package-initialize" and how should I handle the install of el-get in this case?

@npostavs
Copy link
Collaborator

What Emacs version are you using? I think recent versions have changed to call package-initialize before init.el, so you would to have to put the el-get call in early-init.el to get the intended effect.

@Xparx
Copy link
Author

Xparx commented Jul 1, 2020

Thanks for the answer!

I was going to post a solution but I wasn't confident it was working long term. I apparently got around the problem by reshuffleing the code from the readme into the following

(setq el-get-dir (expand-file-name "el-get" emacs-init-dir))
(add-to-list 'load-path (concat emacs-init-dir "el-get/el-get"))

(unless (require 'el-get nil 'noerror)
  (with-current-buffer
      (url-retrieve-synchronously
       "https://raw.github.com/dimitri/el-get/master/el-get-install.el")
    (let (el-get-master-branch)
      (goto-char (point-max))
      (eval-print-last-sexp))))

(unless (require 'el-get nil 'noerror)
  (el-get 'sync) ;; Put el-get sync here
  (require 'package)
  (add-to-list 'package-archives
               '("melpa" . "http://melpa.org/packages/"))
  (package-refresh-contents)
  (package-initialize)
  (package-install 'el-get)
  (require 'el-get))

(add-to-list 'el-get-recipe-path (concat emacs-init-dir "recipes"))

I'm not sure this is "THE" solution but it seems to be working.

@priyadarshan
Copy link

I am running GNU Emacs 27.0.91 (build 1, x86_64-w64-mingw32) of 2020-04-20 and was experiencing same issue with org-mode, showing the built-in version.

By moving el-get call to .emacs.d/early-init.el I was able to load the newer version

Org mode version 9.3.7 (release_9.3.7-696-g82b496 @ c:/home/.emacs.d/el-get/org-mode/lisp/)

I am sure it would be useful for others to have this detailed somewhere in README.md.

hotoku added a commit to hotoku/dot-emacs that referenced this issue Oct 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants