reddit / emacs

How to install or upgrade to the new Emacs 28.1 on a Linux device?

Aberfitness · 2022-04-06 07:56
My Linux distro is Pop!_OS Update: Managed to compile it myself. Thanks to @fabianm
funk443 · 2022-04-06 08:04
Use your package manager
Aberfitness · 2022-04-06 08:08
The current available version is 27.1 on the package manager.
fabianmg · 2022-04-06 08:25
You can compile from source. I'm not a Linux expert but is relatively simple to follow the commands. What distro are you using?.
Aberfitness · 2022-04-06 08:29
I am on Pop!_OS
Maneatsdog · 2022-04-06 08:29
If a new version is not available in your package manager can be a compatibility issue. Usually that means Emacs requires a higher version of shared library than is supported by your OS. Or perhaps you are too quick, sometimes package maintainers need a day. Alternatively you may: - See if there is a testing repository for your distribution that has newer versions - Build the package by yourself & install with package manager. For most distributions you can find their source for building the package somewhere on their website. You can modify it (bump the version), but be aware you may be in a world of pain: you probably also need to bump the version of dependencies. - Less painful route is to try using Flatpak, Snap, Docker
TommyHeizer · 2022-04-06 08:29
The general way that will work on all GNU/Linux distros is to download the source code (you can use git) and compile from source, usually ./configure and make install. If your distro already has a 28 version released you can use the package manager. On Gentoo for me, I have to specify I want the unstable version. If we knew your distro we could help you more. You can also refer to the emacs manual which probably has some steps to build emacs from source
Aberfitness · 2022-04-06 08:30
Can you please teach me how to compile from source?
Aberfitness · 2022-04-06 08:32
I am using Pop!_OS
TommyHeizer · 2022-04-06 08:34
I don't use Debian based distros but this might help you out : https://www.emacswiki.org/emacs/EmacsSnapshotAndDebian
fabianmg · 2022-04-06 08:43
I haven't used Pop!\_OS but I found [this guide](https://gist.github.com/rscircus/77e91b36de1e431e0310611a32786e3c#:~:text=Install%20Emacs%20via%20source), maybe it could work on yours. Remember to change this line to emacs-28 or you would compile again the 27 branch. [https://ibb.co/whHy0qg](https://ibb.co/whHy0qg) Another option is following the official guide: [https://www.gnu.org/software/emacs/manual/html\_node/efaq/Installing-Emacs.html](https://www.gnu.org/software/emacs/manual/html_node/efaq/Installing-Emacs.html) But as I said, I haven't worked with Pop!\_OS so I have no idea.
Aberfitness · 2022-04-06 09:36
Awesome! Thank you so much. I followed the steps outlined here "Another option is following the official guide: https://www.gnu.org/software/emacs/manual/html\_node/efaq/Installing-Emacs.html " I ran into an error "you seem to be running X, but no X development libraries were found. You should install the relevant development files for X and for the toolkit you want, such as Gtk+ or Motif." So I just ran abe@pop-os:\~/emacs-28.1$ sudo apt-get build-dep emacs abe@pop-os:\~/emacs-28.1$ ./configure abe@pop-os:\~/emacs-28.1$ make abe@pop-os:\~/emacs-28.1$ sudo make install abe@pop-os:\~/emacs-28.1$ emacs Violla!
Aberfitness · 2022-04-06 09:52
Thank you
fabianmg · 2022-04-06 11:30
Glad it worked. Usually the libraries depends of each distro and each installation. But I'm glad you make it work.
Phil-Hudson · 2022-04-06 11:56
The process is documented in the file named `INSTALL` in the top level of the source code "tarball" (compressed archive). Details of how to obtain it are here: https://lists.gnu.org/archive/html/emacs-devel/2022-04/msg00093.html
stormrider-io · 2022-04-06 13:27
tl;dr: I use snaps because informal QA on prerelease Ubuntu kernels; new emacs updates automatically after snap teams have already shaken some bugs out. ------------- I work on a network developer team at Canonical, and I just chose the snap last time I got a new laptop. the good news is the scuba-like container, so no interactions with my current OS level, which is typically prerelease (helping to apply Linus' Law to kernels under dev). hint: that fact is important in my decision to use snaps, and a way to show solidarity with other teams -- not to mention I've already caught one major bug before a new kernel release; so I'm flameproof on that approach, don't bother. the annoying news is (1) that I haven't set my snap notifications or update flags to warn/ask me on updates, since I'm particularly lazy and pretty much able to spot and handle weird behaviors, and (2) I have to do some extra work for complex configuration because of snap containment. for example, yesterday, when it updated, I had to take ten minutes, after signing onto group chat, to go away and figure out why emacs was barfing on startup (newly-obsolete ob- package). that got me a little ribbing by my teammates. I'd still recommend snaps for some people, depending on their skill level and how much IRL they crave.
flyin1501 · 2022-04-06 14:00
On non-rolling distros, you can install from Flatpak instead to get apps that are mpre up-to-date. Since Pop comes with Flatpak and Flathub preconfigured, you should be able to just open AppCenter, search Emacs, and select Flathub from a dropdown menu in the app page. Your configuration will remain unchanged, and should just work as expected.
briang_ · 2022-04-06 16:58
I haven't checked all the links you've been given so far, but of the couple I have looked at, neither compiled emacs-28's big new feature: native-compilation. To do so, you need to add `--with-native-compilation` to your `configure` command line. It's probably going to need another library installed first. On debian it's called `libgccjit-10-dev` (replace `10` with the major version number of your `gcc` if necessary). You really need to spend some time reading the `INSTALL` document. That'll tell you about all the other flags that `configure` understands.
yxhuvud · 2022-04-06 19:39
How enormous is the emacs snap file though? Estimated time is 20 minutes to download over 200k/s x\_x (on a gigabit connection. wtf).
stormrider-io · 2022-04-06 19:45
yeah. gigabit connection. i work from home. and nothing else would work anyway: i'm downloading OS images 5 and 6 a day for my work anyway, non-gigabit would destroy me.
[deleted] · 2022-04-07 08:30
[deleted]
NoahEtan · 2022-04-07 08:31
Thank you! This is was informative!
nagora · 2022-04-07 09:19
The first thing I do with a new Ubuntu device is remove snap. It's a disease.