| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
7.1 How do I install Emacs? 7.2 How do I update Emacs to the latest version? 7.3 What should I do if I have trouble building Emacs? 7.4 Why does linking Emacs with -lX11 fail?
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This answer is meant for users of Unix and Unix-like systems. Users of other operating systems should see the series of questions beginning with 8.7 Where can I get Emacs for my PC running MS-DOS?, which describe where to get non-Unix source and binaries, and how to install Emacs on those systems.
For Unix and Unix-like systems, the easiest way is often to compile it from scratch. You will need:
ftp://ftp.gnu.org/pub/gnu/emacs/emacs-21.1.tar.gz
The above will obviously change as new versions of Emacs come out. For instance, when Emacs 21.42 is released, it will most probably be available as
ftp://ftp.gnu.org/pub/gnu/emacs/emacs-21.42.tar.gz
Again, you should use one of the GNU mirror sites (see 8.5 Where can I get other up-to-date GNU stuff?, and adjust the URL accordingly) so as to reduce load on `ftp.gnu.org'.
gzip, the GNU compression utility. You can get gzip via
anonymous ftp at mirrors of `ftp.gnu.org' sites; it should compile
and install without much trouble on most systems. Once you have
retrieved the Emacs sources, you will probably be able to uncompress
them with the command
gunzip --verbose emacs-21.1.tar.gz |
changing the Emacs version (21.1), as necessary. Once
gunzip has finished doing its job, a file by the name of
`emacs-21.1.tar' should be in your build directory.
tar, the tape archiving program, which moves multiple files
into and out of archive files, or tarfiles. All of the files
comprising the Emacs source come in a single tarfile, and must be
extracted using tar before you can build Emacs. Typically, the
extraction command would look like
tar -xvvf emacs-21.1.tar |
The `x' indicates that we want to extract files from this tarfile,
the two `v's force verbose output, and the `f' tells
tar to use a disk file, rather than one on the tape drive.
If you're using GNU tar (available at mirrors of
`ftp.gnu.org'), you can combine this step and the previous one by
using the command
tar -zxvvf emacs-21.1.tar.gz |
The additional `z' at the beginning of the options list tells GNU
tar to uncompress the file with gunzip before extracting
the tarfile's components.
At this point, the Emacs sources (all 70+ megabytes of them) should be sitting in a directory called `emacs-21.1'. On most common Unix and Unix-like systems, you should be able to compile Emacs (with X Window system support) with the following commands:
cd emacs-21.1 # change directory to emacs-21.1 ./configure # configure Emacs for your particular system make # use Makefile to build components, then Emacs |
If the make completes successfully, the odds are fairly good that
the build has gone well. (See section 7.3 What should I do if I have trouble building Emacs?, if you weren't
successful.)
By default, Emacs is installed in the following directories:
To install files in those default directories, become the superuser and type
make install |
Note that `make install' will overwrite `/usr/local/bin/emacs' and any Emacs Info files that might be in `/usr/local/info'.
Much more verbose instructions (with many more hints and suggestions) come with the Emacs sources, in the file `INSTALL'.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
See section 7.1 How do I install Emacs?, and follow the instructions there for installation.
Most files are placed in version-specific directories. Emacs 21.1, for instance, places files in `/usr/local/share/emacs/21.1'.
Upgrading should overwrite only, `/usr/local/bin/emacs' (the Emacs binary) and documentation in `/usr/local/info'. Back up these files before you upgrade, and you shouldn't have too much trouble.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
First look in the file `etc/PROBLEMS' (where you unpack the Emacs source) to see if there is already a solution for your problem. Next, look for other questions in this FAQ that have to do with Emacs installation and compilation problems.
If you'd like to have someone look at your problem and help solve it, see 3.9 Where can I get help in installing Emacs?.
If you cannot find a solution in the documentation, send a message to bug-gnu-emacs@gnu.org.
Please don't post it to news:gnu.emacs.help or send e-mail to help-gnu-emacs@gnu.org. For further guidelines, see 2.3 What are appropriate messages for news:gnu.emacs.help, news:gnu.emacs.bug, news:comp.emacs, etc.? and 2.5 Where should I report bugs and other problems with Emacs?.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Emacs needs to be linked with the static version of the X11 library, `libX11.a'. This may be missing.
On OpenWindows, you may need to use add_services to add the
"OpenWindows Programmers" optional software category from the CD-ROM.
On HP-UX 8.0, you may need to run update again to load the
X11-PRG "fileset". This may be missing even if you specified "all
filesets" the first time. If `libcurses.a' is missing, you may
need to load the "Berkeley Development Option."
David Zuhn says that MIT X builds shared
libraries by default, and only shared libraries, on those platforms that
support them. These shared libraries can't be used when undumping
temacs (the last stage of the Emacs build process). To get
regular libraries in addition to shared libraries, add this to
`site.cf':
#define ForceNormalLib YES |
Other systems may have similar problems. You can always define
CANNOT_DUMP and link with the shared libraries instead.
To get the Xmenu stuff to work, you need to find a copy of MIT's `liboldX.a'.
| [ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |