Original link http://blog.csdn.net/gexueyuan/article/details/6452459
If you use apt-get to install Emacs, the version is 23.1.1 and the version is too low. Therefore, a GNU Emacs is installed on the GNU website.
Decompress the file package downloaded from gnu ftp to a directory, and enter CD to this directory./configure is configured to generate the make file. However, after running for a while, the following error is reported:
[C-sharp]View
Plaincopy
- You seem to be running X, but no X development libraries
- Were found. You shocould install the relevant development files for X
- And for the Toolkit you want, such as GTK +, lesstif or motif. Also make
- Sure you have development files for image handling, I. e.
- Tiff, GIF, JPEG, PNG and XPM.
- If you are sure you want Emacs compiled without X Window support, pass
- -- Without-x
- To configure.
The original is not installed GTK development library, you can install the latest gtk-3 can also install gtk-2.0
[C-sharp]View
Plaincopy
- Sudo apt-Get install libgtk2.0-Dev
You can also choose to use the synaptic manager in the system for installation.
Run./configure again. I did not expect an error again, as shown below:
[C-sharp]View
Plaincopy
- Configure: Error: The following required libraries were not found:
- Libxpm libjpeg libgif/libungif LibTIFF
- Maybe some development libraries/packages are missing?
- If you don't want to link with them give
- -- With-XPM = No -- With-JPEG = No -- With-GIF = No -- With-Tiff = No
- As options to configure
It seems that there are missing databases:
Libxpm libjpeg libgif/libungif LibTIFF
Then install
[C-sharp]View
Plaincopy
- Sudo apt-Get install libxpm-Dev
- Sudo apt-Get install libjpeg62-dev
- Sudo apt-Get install libgif-Dev
- Sudo apt-Get install libtiff4-dev
Then run./configure. Then, it can finally run to the end normally. Check the output information and generate all the generated files. Therefore, run make and run sudo make install. After a period of time, the compilation is complete and the installation is successful.
If a compilation error occurs. And after opening Emacs, the error "cannot open termcap database file" is reported, and a libncurses5-dev library is missing, so, run:
[C-sharp]View plaincopy
- Sudo apt-Get install libncurses5-dev
Because it has been compiled before, run make clean, make distclean to clear it, and then run./configure, make, and sudo make install again. This installation is complete.