Ubuntu compilation and installation of Emacs

Source: Internet
Author: User
Tags gtk

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

  1. You seem to be running X, but no X development libraries
  2. Were found. You shocould install the relevant development files for X
  3. And for the Toolkit you want, such as GTK +, lesstif or motif. Also make
  4. Sure you have development files for image handling, I. e.
  5. Tiff, GIF, JPEG, PNG and XPM.
  6. If you are sure you want Emacs compiled without X Window support, pass
  7. -- Without-x
  8. 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

  1. 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

  1. Configure: Error: The following required libraries were not found:
  2. Libxpm libjpeg libgif/libungif LibTIFF
  3. Maybe some development libraries/packages are missing?
  4. If you don't want to link with them give
  5. -- With-XPM = No -- With-JPEG = No -- With-GIF = No -- With-Tiff = No
  6. As options to configure

 

It seems that there are missing databases:
Libxpm libjpeg libgif/libungif LibTIFF

 

 

Then install

[C-sharp]View
Plaincopy

  1. Sudo apt-Get install libxpm-Dev
  2. Sudo apt-Get install libjpeg62-dev
  3. Sudo apt-Get install libgif-Dev
  4. 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
 
 
  1. 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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.