Tag Archives: yum

YUM what provides this file, huh?

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:

sudo yum install blas blas-devel lapack lapack-devel
wget http://cran.r-project.org/src/base/R-3/R-3.1.3.tar.gz
tar zxvf R-3.1.3.tar.gz
cd R-3.1.3
./configure --with-blas --with-lapack --with-x --enable-R-shlib
make
sudo make install

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

sudo yum install blas blas-devel lapack lapack-devel readline-devel

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:

# yum provides \*/Intrinsic.h
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.mirror.digitalpacific.com.au
 * extras: centos.mirror.digitalpacific.com.au
 * updates: centos.mirror.digitalpacific.com.au
libXt-devel-1.1.4-6.1.el6.x86_64 : X.Org X11 libXt development package
Repo        : base
Matched from:
Filename    : /usr/include/X11/Intrinsic.h

libXt-devel-1.1.4-6.1.el6.i686 : X.Org X11 libXt development package
Repo        : base
Matched from:
Filename    : /usr/include/X11/Intrinsic.h

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

References: https://www.centos.org/forums/viewtopic.php?t=5933

CentOS: lsb_release: command not found

First let me declare that I’m new to CentOS. The folowing is a note to self which demonstrates how we search for a package that provides some commands and intall it using yum on CentOS.

When I ran ‘lsb_release -a’, the following message is returned:

-bash: lbs_release: command not found

To fix it, we need to install the package which provides lsb_release command.

# yum provides */lsb_release
...
redhat-lsb-4.0-3.el6.centos.i686 : LSB base libraries support for CentOS
Repo        : base
Matched from:
Filename    : /usr/bin/lsb_release

redhat-lsb-4.0-3.el6.centos.x86_64 : LSB base libraries support for CentOS
Repo        : base
Matched from:
Filename    : /usr/bin/lsb_release

dkms-2.2.0.3-2.el6.noarch : Dynamic Kernel Module Support Framework
Repo        : epel
Matched from:
Filename    : /usr/lib/dkms/lsb_release

So, let’s install redhat-lsb package:

# yum install redhat-lsb

...
Transaction Summary
==========================================================
Install     106 Package(s)

Total download size: 86 M
Installed size: 246 M
Is this ok [y/N]: 
...

Wow, it needs to download 86M just to install that package? Well, I guess I’ll stick with cat /etc/redhat-release.