I'm a new user of Linux/Ubuntu, and I'm still not comfortable with the notion of a packages. Actually, I'm trying to install Emacs 25.1 and I try to find out the good package in emacs-25.1.tar.gz (see this website). Could anyone tell me what it is supposed to be?

  • 1
    EMACS 24 is available at the official repositories and can be installed the usual way. Always prefer the versions already available in the repos. Avoid downloading from the third party websites. And no, that's no "package", it's source code that needs to be compiled (after extracting the tar file) and if you don't know what that is then you shouldn't be doing that. – user589808 Nov 3 '16 at 3:22
  • @CelticWarrior I know how to extract the tar file. What do I need to do once I've managed this task? Do I need to extract the tar file and then apply sudo apt-get install path_of_file? – Sandra Ross Nov 3 '16 at 3:26
  • Isn't the 24 version enough? Ask yourself if you really have a valid reason to install the newer version before anything else. If you really want to compile then follow the instructions inside. – user589808 Nov 3 '16 at 3:27
  • Sorry, I just want to practice certain things at the same time. – Sandra Ross Nov 3 '16 at 3:29
  • 1
    You have two answers about how to build a package from source. Is this actually what you want to do, or do you just want to install and use the software? How do I install a .tar.gz (or .tar.bz2) file? – Zanna Nov 3 '16 at 6:29

If you want to build a package on your own, it is informative. I wrote it out: http://pj.freefaculty.org/blog/?p=328. The tarball you have is not sufficient to make a package, it lacks the "debian" directory that has the package building code. You might be able to compile emacs and install it, but it won't be a package.

Emacs25 has been discussed. I doubt it will build (discussed here Emacs toolbar icons missing in Ubuntu-16.10, struggle to compile emacs24 and 25), but conceptually it is not difficult: You run "./configure" (add some arguments), then "make" and "make install". Almost all GNU software is like that. I made some notes on compiling GNU stuff. Go here after slide 42 http://pj.freefaculty.org/guides/Computing-HOWTO/IntroTerminal-3/terminal-3.pdf).

As I said, I doubt Emacs25 will compile, you can't even compile Emacs24, or you could not when I made that post. If you try, you may need to install quite a few devel packages for your system. That's usual.

The shortest route will be "apt-get source emacs24". If you find a repo with emacs25, use instead. These will come with the debian subdirectory that guides the build.

Your question is a good novice question and I hope you'll keep trying. As put, you are asking a pretty giant question and that's why I'm pointing you at other locations to learn more. Try my notes.


A package is basically the data(the binaries, their icons, manuals etc) with some metadata which tells the OS where to put what(eg. put binary in /usr/bin, use xyz icon)

What you get on the website is basically source code. You can compile it, but you won't be able to create a package# unless

  1. You know which file should go where.
  2. This info is already provided.

get this info, and then you can build a package

A better option for a regular user is always to stick to the official repositories. If you don't find what you need there, look for unofficial repos. If you still don't find it, go for source code and just compile and install it. You don't(wouldn't/shouldn't) want to build a package unless you want to share it with others.

# source code might know how to install the software, but that won't be how debian/ubuntu expects it to be. The debian standard requires it in a specific format, which is adhered by the packages


I'm going to go on a limb here and assume that you don't care how Emacs is installed. In that case the easiest way is certainly the package manager.

  • Open the Software Center application, search for emacs and install the package of the same name.

  • Alternatively you can open a terminal and run sudo apt install emacs. This is also a good way to debug issues during the other approach (which often hides error messages or formats them disfiguringly).

Both approaches will install Emacs 24 (package emacs24) in supported Ubuntu releases.

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.