4

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/"))
(package-initialize)

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?

8
  • 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
    Commented Mar 14, 2019 at 16:44
  • I tried that and still get the same error.
    – emonigma
    Commented Mar 15, 2019 at 9:59
  • do you see the julia-mode package in the package list?
    – Tyler
    Commented Mar 15, 2019 at 13:32
  • No, I see jsx-mode, julia-repl, and jump-to-line. I only want to use R, can I disable julia?
    – emonigma
    Commented Mar 15, 2019 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
    Commented Mar 15, 2019 at 15:04

2 Answers 2

6

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/"))
(package-initialize)

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)))
4
  • I tried that and still get the same error.
    – emonigma
    Commented Mar 15, 2019 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
    Commented Mar 15, 2019 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’
    – emonigma
    Commented Mar 15, 2019 at 18:11
  • You should create a new question
    – matteol
    Commented Mar 15, 2019 at 18:15
0

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

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

I needed to comment lines 23-27:

##\__ GNU Emacs __
#EMACS ?= emacs
#SITELISP=\$(PREFIX)/share/emacs/site-lisp
#LISPDIR=\$(SITELISP)/ess
#INFODIR=\$(PREFIX)/share/info
#ETCDIR =\$(PREFIX)/share/emacs/etc/ess

and to uncomment lines 36-42:

##__ GNU Emacs __ for Mac OS X with NeXTstep (Cocoa or GNUstep)
PREFIX=/Applications/Emacs.app/Contents/Resources
EMACS=/Applications/Emacs.app/Contents/MacOS/Emacs
SITELISP=\$(PREFIX)/site-lisp
LISPDIR=\$(SITELISP)/ess
INFODIR=/usr/local/info
ETCDIR =\$(PREFIX)/etc/ess

Then run:

sudo make install

And add 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 and acknowledge you have read our privacy policy.

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