This post is primarily written to remind myself, an Ubuntu user, to figure out how to find what RPM package provides a file — for example a header file.

Today, I’m trying to compile and install R 3.1.3 on CentOS 6 from source code. This R installation is one of the requirements to install Tessera stack. The instruction from the installation page is:

Unfortunately, the process failed with ./configure with the complain about missing readline library. To fix it, I had to install readline-devel package.

After that, I re-ran the ./configure. This time it still complains that some X11 header files are missing, one of them is: Intrinsic.h.

Let’s find out what package provides this file:

Ah ha, so let’s install libXt-devel. This time, I was able to configure, make and install the R.