When running:

sudo ./configure

I got error:

checking for libXaw... configure: error: No X toolkit could be found. If you are sure you want Emacs compiled without an X toolkit, pass --with-x-toolkit=no to configure. Otherwise, install the development libraries for the toolkit that you want to use (e.g. Gtk+) and re-run configure.

According to this answer, I ran the following command to install X toolkit:

sudo yum install build-essential texinfo libx11-dev libxpm-dev libjpeg-dev libpng-dev libgif-dev libtiff-dev libgtk2.0-dev libncurses-dev libxpm-dev automake autoconf

However, when I run configure, I get the same error. How do I successfully resolve the dependency error and install emacs?

  • Are you sure you need to run ./configure with sudo?  What happens if you run it as yourself? – G-Man Jan 4 at 3:01

Those development packages are for the Debian/Ubuntu/Mint family which is why they end in dev.

The development packages that you are looking for are libpng-devel libtiff-devel openjpeg-devel gtk2-devel ncurses-devel giflib-devel libX11-devel libXpm-devel. The development packages end in devel for the Fedora/RHEL/CentOS family.

As you have sudo, you can also just yum install emacs which is a lot easier.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.