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

error: Unable to activate package 'company-auctex'. #27

Open
c02y opened this issue May 7, 2018 · 1 comment
Open

error: Unable to activate package 'company-auctex'. #27

c02y opened this issue May 7, 2018 · 1 comment

Comments

@c02y
Copy link

c02y commented May 7, 2018

Every time I git clone my configuration of Emacs into a new machine and start Emacs, there will be error message in Emacs:

error: Unable to activate package 'company-auctex'.
Required package 'auctex-11.87' is unavailable

I know I can fix this problem by package-install auctex manually, but is there a way that I can check if activating company-auctex package failed and then install auctex automatically?

I've trying to use the following in my init.el:

(unless (package-installed-p 'auctex)
    (package-install 'auctex))

But it doesn't work at all and keeps saying the same error message everytime I start my emacs.

So how to fix this problem?

@rememberYou
Copy link

rememberYou commented Jun 17, 2018

Sorry for the late response, I am allowing myself to answer you in order to help others who may encounter this error.

You should know that the auctex package is first available on GNU ELPA which is the default source. I recommend you add the following package sources in your GNU Emacs configuration:

(setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/")
                         ("melpa" . "http://melpa.org/packages/")
                         ("org" . "http://orgmode.org/elpa/")))

NOTE: don't forget to evaluate (package-refresh-contents) to refresh your packages.

In order to better manage your packages, I start you use-package again. Therefore, with the following code:

(use-package company-auctex
  :after (auctex company)
  :config (company-auctex-init))

I hope I helped.

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

2 participants