{"id":6253,"date":"2016-09-18T09:17:48","date_gmt":"2016-09-18T09:17:48","guid":{"rendered":"http:\/\/ubuntuhandbook.org\/?p=6253"},"modified":"2016-09-18T09:17:48","modified_gmt":"2016-09-18T09:17:48","slug":"install-gnu-emacs-25-1-in-ubuntu-16-04","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2016\/09\/install-gnu-emacs-25-1-in-ubuntu-16-04\/","title":{"rendered":"How to Install GNU Emacs 25.1 in Ubuntu 16.04"},"content":{"rendered":"<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2016\/09\/emacs-icon245.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2016\/09\/emacs-icon245.png\" alt=\"emacs-icon245\" width=\"245\" height=\"250\" class=\"alignleft size-full wp-image-6262\" \/><\/a><\/p>\n<p>GNU Emacs text editor finally reached the 25.1 release last night. Here&#8217;s how you can install it in Ubuntu 16.04 and Ubuntu 16.10.<\/p>\n<p>Emacs 25.1 release highlights:<\/p>\n<ul>\n<li>Emacs can now load shared\/dynamic libraries (modules)<\/li>\n<li>Experimental support for Cairo drawing<\/li>\n<li>Enhanced network security (TLS\/SSL certificate validity and the like)<\/li>\n<li>New minor mode &#8216;electric-quote-mode&#8217; for using curved quotes as you type<\/li>\n<li>Character folding support in isearch.el<\/li>\n<li>Xwidgets: a new feature for embedding native widgets inside Emacs buffers<\/li>\n<li>New and improved facilities for inserting Unicode characters<\/li>\n<\/ul>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2016\/09\/gnu-emacs-25-1.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2016\/09\/gnu-emacs-25-1-600x413.jpg\" alt=\"gnu-emacs-25-1\" width=\"600\" height=\"413\" class=\"aligncenter size-large wp-image-6254\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2016\/09\/gnu-emacs-25-1-600x413.jpg 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2016\/09\/gnu-emacs-25-1-450x310.jpg 450w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2016\/09\/gnu-emacs-25-1.jpg 962w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<h4>How to install Emacs 25.1 in Ubuntu 16.04:<\/h4>\n<p>Besides installing the latest snapshot via the <a href=\"https:\/\/launchpad.net\/~ubuntu-elisp\/+archive\/ubuntu\/ppa\" target=\"_blank\">daily build PPA<\/a>, it&#8217;s easy to build the 25.1 stable release by following the steps below one by one:<\/p>\n<p><b>Remove previous Emacs if any before getting started:<\/b><\/p>\n<p><b>1.<\/b> Open terminal (Ctrl+Alt+T) and run command to install build tools:<\/p>\n<pre style=\"border:none;\">sudo apt install build-essential checkinstall<\/pre>\n<p><i>Type in your password (no visual feedback) when it asks and hit Enter.<\/i><\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2016\/09\/install-build-tools.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2016\/09\/install-build-tools-600x98.jpg\" alt=\"install-build-tools\" width=\"600\" height=\"98\" class=\"aligncenter size-large wp-image-6255\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2016\/09\/install-build-tools-600x98.jpg 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2016\/09\/install-build-tools-450x74.jpg 450w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2016\/09\/install-build-tools.jpg 783w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p><b>2.<\/b> Then install the build dependencies via command:<\/p>\n<pre style=\"border:none;\">sudo apt-get build-dep emacs24<\/pre>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2016\/09\/emacs-build-deps.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2016\/09\/emacs-build-deps-600x93.jpg\" alt=\"emacs-build-deps\" width=\"600\" height=\"93\" class=\"aligncenter size-large wp-image-6256\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2016\/09\/emacs-build-deps-600x93.jpg 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2016\/09\/emacs-build-deps-450x70.jpg 450w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2016\/09\/emacs-build-deps.jpg 774w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<div class=\"arconix-box arconix-box-yellow\"><i class='fa fa-2x pull-left fa-lightbulb-o'><\/i><div class=\"arconix-box-content\">1. Emacs 24 and 25 use the same build dependencies.<\/p>\n<p>2. For those who have upgraded Intel driver using <a href=\"https:\/\/01.org\/linuxgraphics\/downloads\" target=\"_blank\">Intel Graphics Update Tool for Linux<\/a>, like me, you won&#8217;t be able to install these dependencies. You need to <a href=\"http:\/\/askubuntu.com\/questions\/531540\/how-to-safely-remove-proprietary-intel-driver\" target=\"_blank\">downgrade the intel graphcs driver<\/a> first.<\/div><\/div>\n<p><b>3.<\/b> Now download the source at <a href=\"http:\/\/ftp.gnu.org\/gnu\/emacs\/\" target=\"_blank\">ftp.gnu.org\/gnu\/emacs\/<\/a>, then extract:<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2016\/09\/emacs25-source.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2016\/09\/emacs25-source.jpg\" alt=\"emacs25-source\" width=\"600\" height=\"297\" class=\"aligncenter size-full wp-image-6258\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2016\/09\/emacs25-source.jpg 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2016\/09\/emacs25-source-450x222.jpg 450w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p><b>4.<\/b> Open terminal and navigate to the &#8220;emacs-25.1&#8221; folder via command (or select &#8220;Open in terminal&#8221; from its context menu):<\/p>\n<pre style=\"border:none;\">cd ~\/Downloads\/emacs-25.1<\/pre>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2016\/09\/navigate-emacs-folder.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2016\/09\/navigate-emacs-folder-600x80.jpg\" alt=\"navigate-emacs-folder\" width=\"600\" height=\"80\" class=\"aligncenter size-large wp-image-6259\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2016\/09\/navigate-emacs-folder-600x80.jpg 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2016\/09\/navigate-emacs-folder-450x60.jpg 450w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2016\/09\/navigate-emacs-folder.jpg 768w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p><b>5.<\/b> In the same terminal window, once you&#8217;re in the source folder, run the commands below one by one:<\/p>\n<pre style=\"border:none;\">.\/configure\n\nmake<\/pre>\n<p><i>For the default GTK version in Ubuntu 16.04, there&#8217;s a known <a href=\"https:\/\/bugzilla.gnome.org\/show_bug.cgi?id=85715\" target=\"_blank\">bug<\/a> for multiple displays.<\/i><\/p>\n<p><b>6.<\/b> Finally use <code>checkinstall<\/code> command to create <b>.deb<\/b> and install Emacs 25.1:<\/p>\n<pre style=\"border:none;\">sudo checkinstall<\/pre>\n<p>While running the command, answer on screen questions, e.g., install docs, type package description, change package name, version, etc.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2016\/09\/checkinstall.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2016\/09\/checkinstall-600x364.jpg\" alt=\"Emacs checkinstall\" width=\"600\" height=\"364\" class=\"aligncenter size-large wp-image-6260\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2016\/09\/checkinstall-600x364.jpg 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2016\/09\/checkinstall-450x273.jpg 450w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2016\/09\/checkinstall.jpg 755w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>Once done, Emacs 25.1 is installed on your system and you can remove it anytime by running the command in the prompt with sudo privilege:<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2016\/09\/emacs-install-success.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2016\/09\/emacs-install-success-600x351.jpg\" alt=\"emacs-install-success\" width=\"600\" height=\"351\" class=\"aligncenter size-large wp-image-6261\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2016\/09\/emacs-install-success-600x351.jpg 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2016\/09\/emacs-install-success-450x263.jpg 450w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2016\/09\/emacs-install-success.jpg 740w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>In my case it&#8217;s:<\/p>\n<pre style=\"border:none;\">sudo dpkg -r emacs-25<\/pre>\n<p>And the last command create a <b>.deb<\/b> package in the source folder, and it can be used in another Ubuntu machine to install Emacs 25.1 (need to manually install dependencies via step 2).<\/p>\n<p>Finally, run command <code>emacs<\/code> to launch the text editor, or launch it from Unity Dash (App Launcher) at next login (or next boot).<\/p>","protected":false},"excerpt":{"rendered":"<p>GNU Emacs text editor finally reached the 25.1 release last night. Here&#8217;s how you can install it in Ubuntu 16.04 and Ubuntu 16.10. Emacs 25.1 release highlights: Emacs can now load shared\/dynamic libraries (modules) Experimental support for Cairo drawing Enhanced network security (TLS\/SSL certificate validity and the like) New minor mode &#8216;electric-quote-mode&#8217; for using curved [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[596,1381],"class_list":["post-6253","post","type-post","status-publish","format-standard","hentry","category-howtos","tag-emacs","tag-emacs-25"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/6253","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/comments?post=6253"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/6253\/revisions"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=6253"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=6253"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=6253"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}