XEphem is an outstanding software for astronomers.It is written in C and there aren’t any packages built for it so you have to compile it using the source codes.
When building on Ubuntu, it is most likely that you’ll get some error messages, because need some libraries not included in Ubuntu by default.
Download the source code and extract it.
$ wget http://97.74.56.125/free/xephem-3.7.4.tar.gz
$ tar -xvf xephem-3.7.4.tar.gz
Before compiling, we need these packages installed.
$ sudo apt-get install libmotif3 libmotif-dev x11proto-print-dev libxp-dev libxmu-dev
If you don’t install these packages, you’ll get errors during compilation from various files, like aavso.c
Now let’s compile!
$ cd xephem-3.7.4/GUI/xephem
$ make MOTIF=../../libXm/linux86
(NOTE : If you’re using an x86_64 system, use MOTIF=/usr/lib as make the option since the libXm delivered with xephem won’t do any good for you)
The rest is as stated in the INSTALL file.