I want to install ESS. I initialised the package manager with

(require 'package)
(add-to-list 'package-archives
             '("melpa-stable" . "https://stable.melpa.org/packages/"))

and try installing ESS with M-x package-install RET ess RET. I get the error

Package `julia-mode-0.3` is unavailable.

I only found this thread, where the same error is a side-effect and has no solution to the problem.

How can I install ESS from MELPA?

  • Maybe your package list is out of sync, because both julia-mode and ess are currently available in MELPA. Can you try M-x package-list-packages, r (refresh packages, which should happen automatically), and then install ESS from the package list? – Tyler Mar 14 at 16:44
  • I tried that and still get the same error. – mmorin Mar 15 at 9:59
  • do you see the julia-mode package in the package list? – Tyler Mar 15 at 13:32
  • No, I see jsx-mode, julia-repl, and jump-to-line. I only want to use R, can I disable julia? – mmorin Mar 15 at 14:11
  • I don't think you can install ESS from the repository without Julia-mode. You can install it directly from source: ess.r-project.org/index.php?Section=download However, julia-mode should be available, at least after you add the melpa repository as @matteol suggested. – Tyler Mar 15 at 15:04

The julia-mode package is in MELPA, but not in MELPA Stable, so you have to add another repository.

(require 'package)
(add-to-list 'package-archives
             '("melpa-stable" . "https://stable.melpa.org/packages/"))
(add-to-list 'package-archives
             '("melpa" . "http://melpa.org/packages/"))

If you prefer to use packages from MELPA Stable when available and use MELPA as a fallback you should set the archive priorities before calling package-initialize

(setq package-archive-priorities
  '(("melpa-stable" . 1)
    ("melpa" . 0)))
  • I tried that and still get the same error. – mmorin Mar 15 at 10:01
  • 1
    did you make those changes, restart Emacs, and refresh your package list? Have you tried removing ‘melpa-stable’ from your package-archives? (And restarting Emacs, and refreshing your package list) – nega Mar 15 at 14:34
  • Yes, it does work with @nega's directions. Now, after I (require 'ess-site) and I load a new file, I get Warning (flymake): Disabling backend flymake-proc-legacy-flymake because (error Can’t find a suitable init function) and Warning [ess-r-flymake *ess-r-flymake*]: Error in cat("@@warning: @@", e) : argument 2 (type ’list’) cannot be handled by ’cat’ – mmorin Mar 15 at 18:11
  • You should create a new question – matteol Mar 15 at 18:15

One solution is to install from source. Run this commands in a shell:

git clone https://github.com/emacs-ess/ESS.git /path/to/ESS
cd /path/to/ESS/

I needed to comment lines 23-27:

##\__ GNU Emacs __
#EMACS ?= emacs
#ETCDIR =\$(PREFIX)/share/emacs/etc/ess

and to uncomment lines 36-42:

##__ GNU Emacs __ for Mac OS X with NeXTstep (Cocoa or GNUstep)
ETCDIR =\$(PREFIX)/etc/ess

Then I ran:

sudo make install

And added these lines to ~/.emacs:

(add-to-list 'load-path "/path/to/ESS/lisp/")
(load "ess-site")

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.