1

I am not sure if that is a problem on my site or more people are experiencing this. I thought at first that I broke something in my config file, but after loading by backup .emacs.d, the error is the same.

I put use-package ensuring magit up to my .init.el so it looks like so:

;;; PACKAGES CONFIGURATION
(require 'package)
(setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/")
             ("melpa" . "https://melpa.org/packages/")
             ("marmalade" . "https://marmalade-repo.org/packages/")
             ("melpa-stable" . "https://stable.melpa.org/packages/")
             ("elpy" . "https://jorgenschaefer.github.io/packages/")))
(package-initialize)

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

'(use-package-compute-statistics)

;; Ensure system binaries keyword
(use-package use-package-ensure-system-package
  :ensure t)

(use-package auto-package-update
  :ensure t
  :config
  (setq auto-package-update-delete-old-versions t)
  (setq auto-package-update-hide-results t)
  (auto-package-update-maybe))

(use-package magit
    :ensure t
    :pin melpa)

;; Evaluation of packages and all personal configuration is exported
;; to  `~/.emacs.d/myinit.org`.
(org-babel-load-file (expand-file-name "~/.emacs.d/config.org"))

(provide 'init.el)
;;; init.el ends here

I get also this list of unable to activate packages at startup in *Messages* buffer:

Unable to activate package ‘ghub’.
Required package ‘graphql-0.1’ is unavailable
Unable to activate package ‘magit’.
Required package ‘ghub-2.0.1’ is unavailable
Unable to activate package ‘ghub’.
Required package ‘graphql-0.1’ is unavailable
Unable to activate package ‘ghub’.
Required package ‘graphql-0.1’ is unavailable
Unable to activate package ‘ghub+’.
Required package ‘ghub-2.0’ is unavailable 

If nobody finds an answer here, I will rise an issue as it can be matter of a bug.

  • 2
    What error are you getting? – choroba Sep 17 '18 at 13:59
  • The one I write in the title, exactly: Error (use-package): Cannot load magit – siery Sep 17 '18 at 14:46
  • Maybe M-x package-refresh-contents and try again, since package.el is complaining graphql is not available. – xuchunyang Sep 17 '18 at 16:23
  • I forget to mention I been already trying this and reinstalling magit as well. – siery Sep 18 '18 at 15:58
  • Looks like magit/ghub#69, though that is supposed to be fixed by now... – npostavs Sep 18 '18 at 23:02
2

This issue appeared when I updated ghub's Melpa recipe to depend on graphql without realizing that the latter was not yet available from Melpa.

You might be able to resolve this simply by using M-x package-refresh-contents and then trying again.

Or not. It is also possible that package.el got itself into a bad state and cannot find its way out of it on its own anymore. If that is so, then install graphql explicitly. If that does not work, then also try reinstalling ghub.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.