Skip to main content

installing twitteR package and its dependencies in SUSE 11.3

installing twitteR package and its dependencies in SUSE 11.3 
Installing R on SUSE 11.3

I was trying to install twitteR library
into R. but it didn't worked out for me as it was easy in windows.
So here is the tutorial for installing twitteR library into R
in SUSE 11.3.
Firstly I started using Rstudio since this was providing me a GUI interface at-least.
install.packages("twitteR")
Installing package(s) into ‘/usr/lib/R/library’ (as ‘lib’ is unspecified) also installing the dependencies ‘bitops’, ‘RCurl’, ‘rjson’
 
trying URL
'http://probability.ca/cran/src/contrib/bitops_1.0-4.1.tar.gz'
Content type 'application/x-gzip'trying URL 'http://probability.ca/
cran/src/contrib/RCurl_1.91-1.tar.gz'
Content type 'application/x-gzip' length 899364 bytes (878 Kb)
opened URL
==================================================
downloaded 878 Kb
trying URL 'http://probability.ca/cran/src/contrib/rjson_0.2.8.tar.gz'
Content type 'application/x-gzip' length 95519 bytes (93 Kb)
opened URL
==================================================
downloaded 93 Kb
trying URL 'http://probability.ca/cran/src/contrib/twitteR_0.99.19.tar.gz'
Content type 'application/x-gzip' length 191692 bytes (187 Kb)
opened URL
==================================================
downloaded 187 Kb
* installing *source* package ‘bitops’ ...
** package ‘bitops’ successfully unpacked and MD5 sums checked
** Creating default NAMESPACE file
** libs
sh: make: command not found
ERROR: compilation failed for package ‘bitops’
* removing ‘/usr/lib/R/library/bitops’
* restoring previous ‘/usr/lib/R/library/bitops’
Warning in install.packages :
installation of package ‘bitops’ had non-zero exit status
* installing *source* package ‘rjson’ ...
** package ‘rjson’ successfully unpacked and MD5 sums checked
** libs
sh: make: command not found
ERROR: compilation failed for package ‘rjson’
* removing ‘/usr/lib/R/library/rjson’
* restoring previous ‘/usr/lib/R/library/rjson’
Warning in install.packages :
installation of package ‘rjson’ had non-zero exit status
* installing *source* package ‘RCurl’ ...
** package ‘RCurl’ successfully unpacked and MD5 sums checked
checking for curl-config... no
Cannot find curl-config
ERROR: configuration failed for package ‘RCurl’
* removing ‘/usr/lib/R/library/RCurl’
* restoring previous ‘/usr/lib/R/library/RCurl’
Warning in install.packages :
installation of package ‘RCurl’ had non-zero exit status
* installing *source* package ‘twitteR’ ...
** package ‘twitteR’ successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
Error in library(pkg, character.only = TRUE, logical.return = TRUE,
lib.loc = lib.loc) :
‘RCurl’ is not a valid installed package
ERROR: lazy loading failed for package ‘twitteR’
* removing ‘/usr/lib/R/library/twitteR’
* restoring previous ‘/usr/lib/R/library/twitteR’
Warning in install.packages :
installation of package ‘twitteR’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpoTpMNY/downloaded_packages’
Updating HTML index of packages in '.Library'
Making packages.html ... done
> .libPaths()
[1] "/usr/lib/R/library" "/usr/lib/rstudio/R/library"


R CMD INSTALL --build twitteR_0.99.19.tar.gz
* installing to library ‘/usr/lib/R/library’
ERROR: dependencies ‘RCurl’, ‘rjson’ are not available for package ‘twitteR’
* removing ‘/usr/lib/R/library/twitteR’


R CMD INSTALL --build RCurl_1.91-1.tar.gz
* installing to library ‘/usr/lib/R/library’
ERROR: dependency ‘bitops’ is not available for package ‘RCurl’
* removing ‘/usr/lib/R/library/RCurl’


Ok then I tried installing
‘bitops’ library....

R CMD INSTALL --build bitops_1.0-4.1.tar.gz
* installing to library ‘/usr/lib/R/library’
* installing *source* package ‘bitops’ ...
** package ‘bitops’ successfully unpacked and MD5 sums checked
** Creating default NAMESPACE file
** libs
sh: make: command not found
ERROR: compilation failed for package ‘bitops’
* removing ‘/usr/lib/R/library/bitops’


WTF?? ISnt make installed by defaulf in SUSE????????????

I guess not.


lets install make


got some advice here .. make is a different tool
http://www.unix.com/suse/145334-suse-11-how-run-make.html

Listening to Challa from Harinder Sandhu
use yast to install make .. I installed multiple files that looked
like make ?? ;)

 




 
 
fianlly which make worked for me...


which make
/usr/bin/make

R CMD INSTALL --build bitops_1.0-4.1.tar.gz
* installing to library ‘/usr/lib/R/library’
* installing *source* package ‘bitops’ ...
** package ‘bitops’ successfully unpacked and MD5 sums checked
** Creating default NAMESPACE file
** libs
gcc -std=gnu99 -I/usr/lib/R/include -DNDEBUG  -I/usr/local/include    
-fpic  -fomit-frame-pointer -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 
-fstack-protector -funwind-tables -fasynchronous-unwind-tables  
-c bit-ops.c -o bit-ops.o
make: gcc: Command not found
make: *** [bit-ops.o] Error 127
ERROR: compilation failed for package ‘bitops’
* removing ‘/usr/lib/R/library/bitops’



SO gcc is even not installed in SUSE b default..


lets go back to YAST intaller

SHit its 38 MB and taking some time

CHALLA carry on.. by the way what does it mean by CHALLA??? 

ok intallation done.. lets go back to work

which gcc works now


linux-ns0g:/tmp/RtmpoTpMNY/downloaded_packages #
 R CMD INSTALL --build bitops_1.0-4.1.tar.gz
* installing to library ‘/usr/lib/R/library’
* installing *source* package ‘bitops’ ...
** package ‘bitops’ successfully unpacked and MD5 sums checked
** Creating default NAMESPACE file
** libs
gcc -std=gnu99 -I/usr/lib/R/include -DNDEBUG  -I/usr/local/include   
 -fpic  -fomit-frame-pointer -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 
-fstack-protector -funwind-tables -fasynchronous-unwind-tables  
-c bit-ops.c -o bit-ops.o
gcc -std=gnu99 -I/usr/lib/R/include -DNDEBUG  -I/usr/local/include   
 -fpic  -fomit-frame-pointer -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 
-fstack-protector -funwind-tables -fasynchronous-unwind-tables  -c cksum.c -o cksum.o
gcc -std=gnu99 -shared -L/usr/local/lib -o bitops.so bit-ops.o 
cksum.o -L/usr/lib/R/lib -lR
installing to /usr/lib/R/library/bitops/libs
** R
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
packaged installation of ‘bitops’ as ‘bitops_1.0-4.1_R_i686-pc-linux-gnu.tar.gz’

* DONE (bitops)

So bitops is installed now.. lets move on further

install all prerequisite packages for twitteR

and it will work now.
NNNNNNNNNNOOOOOOOOOOOOOO..... For building rjason using R CMD INSTALL command... it requires g++ compiler GNU C/C++ compiler also so install g++ also from YAST installer........ linux-ns0g:/tmp/RtmpoTpMNY/downloaded_packages # R CMD INSTALL --build rjson_0.2.8.tar.gz * installing to library ‘/usr/lib/R/library’ * installing *source* package ‘rjson’ ... ** package ‘rjson’ successfully unpacked and MD5 sums checked ** libs g++ -I/usr/lib/R/include -DNDEBUG -I/usr/local/include -fpic -fomit-frame-pointer -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -c dump.cpp -o dump.o make: g++: Command not found make: *** [dump.o] Error 127 ERROR: compilation failed for package ‘rjson’ * removing ‘/usr/lib/R/library/rjson’ linux-ns0g:/tmp/RtmpoTpMNY/downloaded_packages # g++ If 'g++' is not a typo you can use command-not-found to lookup the package that contains it, like this: cnf g++ linux-ns0g:/tmp/RtmpoTpMNY/downloaded_packages # which g++ which: no g++ in (/home/bhupinder/bin:/usr/local/bin:/usr/bin:/sbin:/usr/sbin :/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib/jvm/jre/bin) After Insalling using YAST linux-ns0g:/tmp/RtmpoTpMNY/downloaded_packages # which g++ /usr/bin/g++ FINALLY JSON IS INSALLED linux-ns0g:/tmp/RtmpoTpMNY/downloaded_packages # R CMD INSTALL --build rjson_0.2.8.tar.gz * installing to library ‘/usr/lib/R/library’ * installing *source* package ‘rjson’ ... ** package ‘rjson’ successfully unpacked and MD5 sums checked ** libs g++ -I/usr/lib/R/include -DNDEBUG -I/usr/local/include -fpic -fomit-frame-pointer -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -c dump.cpp -o dump.o gcc -std=gnu99 -I/usr/lib/R/include -DNDEBUG -I/usr/local/include -fpic -fomit-frame-pointer -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -c parser.c -o parser.o g++ -shared -L/usr/local/lib -o rjson.so dump.o parser.o -L/usr/lib/R/lib -lR installing to /usr/lib/R/library/rjson/libs ** R ** inst ** preparing package for lazy loading ** help *** installing help indices ** building package indices ** installing vignettes ‘json_rpc_server.Rnw’ ** testing if installed package can be loaded packaged installation of ‘rjson’ as ‘rjson_0.2.8_R_i686-pc-linux-gnu.tar.gz’ * DONE (rjson) linux-ns0g:/tmp/RtmpoTpMNY/downloaded_packages # R CMD INSTALL --build RCurl_1.91-1.tar.gz * installing to library ‘/usr/lib/R/library’ * installing *source* package ‘RCurl’ ... ** package ‘RCurl’ successfully unpacked and MD5 sums checked checking for curl-config... no Cannot find curl-config ERROR: configuration failed for package ‘RCurl’ * removing ‘/usr/lib/R/library/RCurl’
 
 
 
 linux-ns0g:/tmp/RtmpoTpMNY/downloaded_packages # which curl-config 
/usr/bin/curl-config


whoooo hooo!!


NOW I CAN EVEN USE RSTUDIO FOR INSTALLING THE twitteR package



and finally ....

> require(twitteR)
Loading required package: twitteR
Loading required package: RCurl
Loading required package: bitops
Loading required package: rjson



its done


I will also provide tutorial on how to use R for data mining in twitter using twitteR package soon.


cheers!



Comments

Popular posts from this blog

INSALLING LOCALPHONE ON SUSE 11.3

SIP_call_localphone INSTALLING LOCALPHONE ON SUSE 11.3 Well I find a better option rather than installing localphone, one can use SIP soft phone client for SUSE 11.3. This tutorial gives a demonstration for SUSE 11.3 softphone SIP installation and using localphone credentials for make calls.. here we go..

installing upwork client on linux environmnent

Download the Upwork client from the Download Link: https://www.upwork.com/downloads Installing the yum file I got the following errors [bsingh@localhost Downloads]$ sudo rpm -Uvh upwork_x86_64.rpm [sudo] password for bsingh: error: Failed dependencies:     libstdc++.so.6(GLIBCXX_3.4.14)(64bit) is needed by upwork-4.2.115.0-1fc18.x86_64     libstdc++.so.6(GLIBCXX_3.4.15)(64bit) is needed by upwork-4.2.115.0-1fc18.x86_64     libstdc++.so.6(GLIBCXX_3.4.20)(64bit) is needed by upwork-4.2.115.0-1fc18.x86_64     s(GLIBC_2.14)(64bit) is needed by upwork-4.2.115.0-1fc18.x86_64     libc.so.6(GLIBC_2.15)(64bit) is needed by upwork-4.2.115.0-1fc18.x86_64     libc.so.6(GLIBC_2.17)(64bit) is needed by upwork-4.2.115.0-1fc18.x86_64     libc.so.6(GLIBC_2.18)(64bit) is needed by upwork-4.2.115.0-1fc18.x86_64     libgdkglext-x11-1.0.so.0()(64bit) is needed by upwork-4.2.115.0-1fc...