Working with new version of Rhipe (0.66), Protobuf(2.4.1)

444 views
Skip to first unread message

Shekhar

unread,
Dec 9, 2011, 2:33:24 AM12/9/11
to Bangalore R Users - BRU
The pre-requisites for the Rhipe installation are as follows:
1. Install gcc if not present
Yum install gcc
Yum install gcc-c++

2.Check if pkg-config is present or not. Type pkg-config on the
consol, if it throws error saying that command not found then download
pkg-config from http://pkgconfig.freedesktop.org/releases/pkg-config-0.22.tar.gz
and follow the steps below:

A.Unntar the package

Tar –zxvf pkg-config-0.22.tar.gz

B.Go inside the directory pkg-config-0.22 and run the command:
./configure --prefix=/usr && make

C.You can run “make check” to make sure everything runs fine. In
my case one test got failed, but everything runs fine
D.Finally run the command “make install”.
E.Now if you type “pkg-config”, it shouldn’t throw error.

3.Download Protobuf.pc (2.4.1) from http://protobuf.googlecode.com/files/protobuf-2.4.1.tar.gz
, and follow the steps below:
A.Untar the package “tar –zxvf protobuf-2.4.1.tar.gz”.
B.Go inside the directory protobuf-2.4.1 and run the
following command serially:
I../configure
II.Make
III.Make check (to make sure everything is fine)
IV.Make install
Create an environment variable PKG_CONFIG_PATH=/usr/local/lib/
pkgconfig
In order to check whether protobuf libraries are properly installed or
not type the following commands:

I.Check for the proper installation of protobuf.pc
pkg-config –-modversion protobuf
The output should be 2.4.1

II.Check for the proper installation ofprotobuf libraries.
pkg-config –libs protobuf
The output should be –pthread –L/usr/local/lib –lprotobuf

4.Download latest version of Rhipe from http://ml.stat.purdue.edu/rhipe/download/Rhipe_0.66.tar.gz
and follow the steps:

A.Create the following environment variables in .bashrc

HADOOP = location to hadoop installation
HADOOP_LIB = $HADOOP/lib
HADOOP_CONF_DIR=$HADOOP/conf
HADOOP_BIN=$HADOOP/bin

B. Execute the following command

R CMD INSTALL Rhipe-0.66.tar.gz

As a check open the R console and load the Rhipe library using
the command library(Rhipe),it shouldn’t throw error.
The installation will fail if the libraries are not properly
linked. The error is as shown below:

Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/usr/lib64/R/library/Rhipe/libs/
Rhipe.so':
libprotobuf.so.6: cannot open shared object file: No such file or
directory
ERROR: loading failed
* removing â/usr/lib64/R/library/Rhipeâ

In order to link the libraries to LD_LIBRARY_PATH, create the file
Protobuf-x86.conf under /etc/ld.so.conf.d/ and add the line /usr/local/
lib to the file.
Sometimes even after creating the file Protobuf-x86.conf, library
libprotobuf.so is not found. This is because of the presence of stale
cache ld.so.cache. Delete this file and also add the path of protobuf
library to LD_LIBRARY_PATH “export LD_LIBRARY_PATH=/usr/local/lib:
$LD_LIBRARY_PATH”

You can find the sample code at http://groups.google.com/group/brumail/browse_thread/thread/d059bc223d4941ac

Regards,
Som Shekhar

Reply all
Reply to author
Forward
0 new messages