3

I'm trying to get the latest stable release of emacs on linux mint (emacs-24.5). But, for some reason apt-get only installs 24.3.1. I would usually be OK with that, but I'm trying to use spacemacs, and a lot of the packages require at least 24.4.

I've tried installing it myself, but ./configure doesn't work (it says I need a whole bunch of libraries, and those libraries need a whole bunch of libraries...), I tried to install it without the libraries, and it only make a bad looking text based terminal only version.

I even tried using linuxbrew, but I couldn't find out how to get the gui working, since I couldn't just do:

brew install emacs --with-cocoa

I noticed that ubuntu comes with emacs 24.5, and I'm willing to install that operating system, since i've only been using linux mint for a day. But is there any way I can get emacs 24.4 or 24.5 on mint? A different package manager, something to install all the libraries that the manual make requires.

Also I have already looked on stack overflow and tried this tutorial but it did not work: Emacs 24.4 Released, How to Install it in Ubuntu 14.04

When I tried to install it myself, it gave me an error about X and gtk or some other window library, even after I did what all the tutorials said to do to get X libraries.

Thanks for any help and sorry if this isn't the right place to ask this kind of question. Also, ask me if I need to specify what errors I got etc...

  • (StackOverflow is a programming forum..) – Kusalananda Jun 26 '16 at 8:16
  • 1
    This is a good question! If you work out a solution on your own, be sure to answer your own question. :) – Wildcard Jun 26 '16 at 8:49
  • Isn't this Unix and Linux stack exchange? – Vityou Jun 26 '16 at 14:40
5

Use Ubuntu elisp ppa to install latest Emacs snapshot available. After installing you need to run emacs-snapshot instead of emacs.

$ sudo apt-add-repository ppa:ubuntu-elisp/ppa 
$ sudo apt-get update 
$ sudo apt-get install emacs-snapshot 

This will install emacs without any further steps. Good luck.

  • That works, but ironically emacs 25 isn't officially suported by spacemacs, but it will probably work better that emacs 24.3. – Vityou Jun 26 '16 at 14:44
0

I was able to install it after running these 2 scripts: https://gist.github.com/favadi/18438172892bc4178b27 and https://github.com/favadi/build-emacs/blob/master/build-emacs.sh

And then when they failed, I went back to the emacs 24.5 I downloaded as a .tar.gz, extracted it, and did:

./congigure
make
make install.

Those 2 scripts apparently installed the dependencies that were missing.

0

This is a general procedure for building with source on Debian-based distros, like Ubuntu and Mint.

Get your dependencies:

sudo apt-get build-dep emacs24 # or emacs24-lucid or whatever

Build:

tar xf emacs-whatever.tar.gz
cd emacs
./configure --with-whatever # see below
make

Install with checkinstall. This basically runs make install, but watches which files are installed and automatically creates a .deb and registers the package with the OS. Then you can e.g. remove it with dpkg -r package-name, or copy the .deb to another similar machine and install it.

sudo apt-get install checkinstall
sudo checkinstall

Configuring:

Emacs has a lot of compile-time configuration options. You can take the defaults or try tweaking it. I generally use similar options to what Arch Linux does e.g. this or this.

  • So could you make the .deb on an ubuntu, and then transfer it over to a linux mint? – Vityou Jun 27 '16 at 18:33
  • @codersarecool Maybe. I'd only recommend installing a .deb on the same OS, e.g. Debian Jessie -> Debian Jessie or Ubuntu 16.04 -> Ubuntu 16.04. Obviously the architectures need to match too. You also need to install the dependencies (the easiest way is probably to use build-dep). But it might work, and it's easy to undo if it doesn't. – jpkotta Jun 27 '16 at 19:54

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.