Installing R on RHEL dependencies - libjpeg - r

This is pertaining to this question I asked earlier -
Installing R on RHEL 6
So, there were two missing dependencies in installing R on RHEL, texinfo and libjpeg. The first answer to the question solves the texinfo dependency. I set out to solve the libjpeg dependency in a similar manner. A Google search led me to this site -
http://rpmfind.net/linux/rpm2html/search.php?query=libjpeg
However, this one has many rpm files apparently for different flavors of RHEL (?) like alpha, i386, etc. I tried two random rpm's and none of them worked. I tried the apha one and got an error saying not compatible architecture and the i386 one said "--.rpm does not update installed package; Nothing to do". But when I try and install R, it still can't find the libjpeg. So, is there a way to understand if and which rpm from the long list on the above web site I should use so I can install R?
Edit - I went to this link: http://rpmfind.net/linux/rpm2html/search.php?query=libjpeg.so.62(LIBJPEG_6.2)(64bit)
and tried the first rpm. It seemed to work, but required yet another dependency.. libc.so.6 this time
Error: Package: libjpeg62-62.0.0-25.3.x86_64 (/libjpeg62-62.0.0-25.3.x86_64)
Requires: libc.so.6(GLIBC_2.14)(64bit)
And searching for this one on google isn't leading me to the rpm.

https://unix.stackexchange.com/questions/91619/libc-so-6glibc-2-1464bit this would be helpful.
Thanks & Regards,
Alok Thaker

Related

zlib/bz2 library and headers are requried for compiling R

Trying to compile R-3.3.2 on Debian Jessie, all dependencies are installed. However the ./configure script complains about the zlib/bzip2 library versions not matching with the minimum requirement.
Minimum version required:
zlib: 1.2.6 (installed version: 1.2.11)
bzip2: 1.0.6 (installed version: 1.0.6)
After looking at the parts of configure script checking the library versions, it seems that it compares versions with strcmp or strncmp. Since "1.2.11" is lexicographically smaller that "1.2.6" it return a non-zero value indicating that the match failed. Besides, it just compares the first 5 characters which is also not what it is intented. So, it's a bug in configure script. Changing the script fixed the issue.
For zlib, find this line:
exit(strncmp(ZLIB_VERSION, "1.2.5", 5) < 0);
Change it to:
exit(ZLIB_VERNUM < 0x1250);
I had some issues installing R myself, specifically with the error
checking for BZ2_bzlibVersion in -lbz2... no
I had to install libbz2-dev to get that error to go away.
Unfortunately, I came across a few more issues while running ./configure and had to do a little more digging to find out how to solve it.
Discussion on issue
After reading that, I had realized I had to install a couple packages like libcurl4-openssl-dev, libpcre3, and liblzma-dev to finally finish the configuration.
The cited link suggested
At this stage you could have as well tried to install R 3.2.0RC ...
R-devel has not yet diverged much.
Personally, I think that installing an older version to resolve dependency issues reeks of laziness, but that's just my two cents.

Package installation issues with R 3.1.0

My Fedora system (Fedora 20, all up to date) has just had R updated to version 3.1.0. Since then, I've had issues installing multiple packages. glmnet failed previously, and now I'm having trouble with treemap. More specifically, I get an error during treemap installation that httpuv has zero exit status.
I never had issues with the previous version of R. Any reason this version should have such problems??
There could be many causes to do with your OS, version, permissions, other installed packages/software, etc, etc. Without seeing the full error message it's hard to know.
One possibility specific to httpuv is root privileges. I've noticed a few threads on various forums when searching for installation errors with this package and Linux, many of them mentioning root v. non-root issues. In another case, libuv needed to be upgraded.
I encounter package installation problems daily and I have some more general work-arounds as well. Hopefully one of these will solve your problem.
Install the package from source
download.file(url="http://cran.r-project.org/src/contrib/httpuv_1.3.0.tar.gz", destfile = "httpuv.tar.gz")
install.packages("httpuv.tar.gz", type = "source", repos = NULL)
Install using devtools via GitHub if the package supports it
Install RTools and re-try your package installation
Install an older version of the package
If those above do not work, then I dig deeper by referring to advice given to me by a VP of IT in my company. These comments were made in reference to frequent package installation problems I encountered when switching from Windows to Solaris:
There are two types of install/make problems. Missing .h files
and/or missing .so/.a libs. The reason for these are multiple:
1.- the package that delivers these is not installed. This means that those files cannot be found anywhere in the /usr tree. Solution is
install right package, make sure the files are there
2.- the includes are not found by the install configurator. This means some environment variable or install option is not properly set (this
is our case for RODBC). Figuring out which variable to set is
challenging without looking at the package documentation [fortunately, documentation is not hard to find!]
3.- the libs are not in the LD_LIBRARY_PATH, easy to fix.
4.- There is a deeper compile/link error, meaning the package is not compatible with the rest of the sw, or has not been properly ported.

How can I access Windows COM objects in R v3?

Some time ago, you used to be able to install the rcom package in R to use COM scripting (eg, access to external programs.) Unfortunately, it seems to be discontinued:
Package ‘rcom’ was removed from the CRAN repository.
Formerly available versions can be obtained from the archive.
This depends on statconnDCOM, which nowadays restricts use, contrary
to the CRAN policy for a package with a FOSS licence. See
http://rcom.univie.ac.at/ and http://www.statconn.com/.
Following the archive and statconn links and installing one of the older versions in R version 3 gives the error:
“Error: package ‘rcom’ was built before R 3.0.0: please re-install
it”.
I am not very familiar with R, but there seems no way around this message - after all, it occurs when installing, so re-installing doesn't seem to be the answer. It appears as though rcom is simply not available for recent (3.0+) versions of R. I have also scanned the package list, although searching for "COM" there returns over a hundred results and it is possible I missed the right one when clicking through them.
How can I use the rcom package, or use COM from within R some other way?
(Note: I am asking this question on behalf of a colleague. I have no experience with R myself at all. Both of us, when searching for answers, could not find anything. I am sure that others are also using COM in the latest version of R, though!)
I looked at the rcom source code a few months ago. It seems I can get it to build and install OK on R3.0.1. Below is the procedure if it helps.
Get a checkout of the latest source code of rcom. I have rcom_2.2-5.tar.gz locally. I can google something at the following address, but I have no idea of the provenance, so up to you to check it is legit. http://cran.open-source-solution.org/web/packages/rcom/index.html
in R do install.packages('rscproxy')
install Rtools as per the instructions on the R web site (http://cran.r-project.org/bin/windows/Rtools),
open a Windows command prompt i.e. run "CMD"
go to the folder containing the 'rcom' folder, and at the command prompt:
set R="c:\Program Files\R\R-3.0.1\bin\i386\R.exe"
%R% CMD check --no-manual rcom
check it passes without too many complaints. Your call as to the --no-manual option (if you have MiKTeX installed you may remove it)
%R% CMD INSTALL rcom
should result in
installing to c:/Rlib/rcom/libs/i386
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
rcom requires a current version of statconnDCOM installed.
To install statconnDCOM type
installstatconnDCOM()
This will download and install the current version of statconnDCOM
You will need a working Internet connection
because installation needs to download a file.
* DONE (rcom)
in R:
library(rcom)
installstatconnDCOM()
I tried a comRegisterRegistry() ; comRegisterServer()
; x<-comGetObject("Excel.Application") but I get a NULL for x. I am not a user of rcom so while it all seems to compile fine; it may just not work anymore.
If you happen to need to access .NET code, a viable option (and yes I have a vested interest in mentioning it) may be the rClr package.
Hope this helps; I'd be interested to hear how you go.
This really should be a comment, but I don't have enough rep points yet to leave one.
I found that the above steps did not work for me, but the answer posted by Lisa Ann on this question, RExcel in R 3.0.x, did solve my problem installing rcom. Since you need rcom to run RExcel, the initial steps to install RExcel cover installing rcom on newer versions of R (such as 3.0.2).
Specifically, following the advice on statconn's wiki, http://homepage.univie.ac.at/erich.neuwirth/php/rcomwiki/doku.php?id=wiki:how_to_install
You also need to follow these instructions if you upgrade R, i.e. you install a new >release of R after you have installed RExcel.
Download the statconn DCOM server and execute the program you downloaded
Start R as administrator (on Windows 7 you need to right-click the R icon and click the >corresponding item)
In R, run the following commands (you must start R as administrator to do this)
install.packages(c("rscproxy","rcom"),repos="http://rcom.univie.ac.at/download",lib=.Library)
library(rcom)
comRegisterRegistry()
Now you have rcom installed, [instructions for installing RExcel follow...]
New versions of rcom and rscproxy (also for current versions of R) are available from a different repository. Just use http://rcom.univie.ac.at/download as the R repository to install from and you can download and install binary versions of statconn packages from there.
Hope this helps!

most common config flags for installing R from source on 64-bit Ubuntu

I'm convinced that using Dirk's package is the best way to install and maintain R on an Ubuntu system. But I want to have some fun and get used to installing R from source.
What are the most common configure flags to use when installing?
Also, if I want to install 2.14.1 and I have 2.14.0 currently installed (which was installed from source), should I first uninstall 2.14.0?
There was a recent thread somewhere about having several versions---one from the apt-get repo, one in /usr/local. Try to find that...
Otherwise, I will roll up 2.14.1 on Friday morning, Michael will do his magic and the repo will have .deb packages of 2.14.1 'real soon', sometimes within a day.
Lastly, you can see which flags are used by getting the package sources for which you just do apt-get source r-base (and that works for any Debian/Ubuntu package that way if you have source references in apt's file.
Edit: By the way, regarding the '64-bit' aspect of your question: Nada. We don't do anything differently. It is "merely" the host OS being more generous with resources. But R finds all it needs to know on its own via its configure etc logic.

R: RGraphviz installation

I've been trying to install the library using brute force - trying different combinations of the things people have posted in mailing lists (I'm too lazy to list them out one by one, but I think I tried the most of them. I can list that too if it helps anyone.). The results have varied from a harmless message of a missing dll to RGui not being able to start before I remove the library manually. Nevertheless, I haven't succeeded...
Do you know how to install it properly, so that it works? I'm running 64bit Windows 7 and I'm not keen of compiling packages from source. Thanks!
Install Rgraphviz 2.2.1 from Bioconductor
According to the latest README:
Rgraphviz now comes bundles with Graphviz. This should greatly simplify
installation on all platforms, compared with earlier versions.
Bioconductor 2.11 contains a lot of libraries that you might not want or need, but it does seem to be the easiest path to achieving what you want. These are the instructions on the Rgraphviz homepage:
source("http://bioconductor.org/biocLite.R")
biocLite("Rgraphviz")
These instructions work for R x64 2.15.2 on Windows 7
library("Rgraphviz")
Loading required package: graph
Loading required package: grid
set.seed(123)
V <- letters[1:10]
M <- 1:4
g1 <- randomGraph(V, M, 0.2)
plot(g1)
The README inside the source package for RGraphviz contains very some pretty clear instructions.
I think it's a bit user-unfriendly to those who only want to install the binary package, to hint that they might also want to download and unpack a tar.gz file containing the complete source, in order to find some technical info .... which turns out to be absolutely crucial.
One word of warning. If you follow the installation instructions for Rgrahpviz precisely, things won't work. Installing the package graphviz edits the environment PATH, but incorrectly. I didn't notice and I bet lots of others missed it too.
Rgraphviz wants to look for the binary in ...;C:\Graphviz2.20\bin\;
BUT the graphviz install adds a path only as far as ;C:\Graphviz2.20\;.
You'll have to edit it. Older instructions suggest a manual edit anyway, but newer ones leave it to graphviz.
I have same problems to install Rgraphviz (for using it in Bayesian Network packages). I used to get brute force solutions, but, now I trying an other one described here in this page
maybe you had also tried. If you succeed in installing Rgraphviz, I will be grateful if you learn me how to do.
I am using R-Studio on Ubuntu 12.10 x64 and installed Rgraphviz from the BioC software repository. Hope this helps. Eg: http://www.biotricks.net/2012/03/rstudio-and-bioconductor.html
I don't know if you have managed to solve your problem 100% but my installation problem came with the R version. Rgraphiz is developed by Bioconductor and it seems to be outdated. However, I had to use it since I moved to a new company and they are using it in one of their shiny apps for whatever reason.
With that being said, I have a dirty solve that I came up with after a couple of days of struggling with it.
First I include a line in the code which seems to be needed since without that line the shiny app simply doesn't do anything after opening:
if(!requireNamespace('BiocManager', quietly = TRUE))
install.packages('BiocManager')
It's weird that it won't work otherwise.The above line is found on Bioconductor's site: https://www.bioconductor.org/packages/devel/bioc/html/Rgraphviz.html
The second thing you need to do only once is to run the biocLite command below in the R console to install the Rgraphviz package
source("http://bioconductor.org/biocLite.R")
biocLite("Rgraphviz")
The above command I found on another thread: R: RGraphviz installation
Hopefully this update will help you or anyone else.
Since with the version of R 3.6.1 the script http://bioconductor.org/biocLite.R returns this message " Error: With R version 3.5 or greater, install Bioconductor packages using BiocManager; see https://bioconductor.org/install " I solved the problem with the following steps:
Get the list of directories used by R to install libraries and
choose the one with write permissions using: .libPaths()
Installing the "BiocManager" library using: install.packages("BiocManager")
Installation of the library "bioconductor" by forcing the directory
with write permissions using: BiocManager::install("Rgraphviz", lib = "C:/Users/tizbet/Documents/R/win-library/3.6")
I worked on the following R installation:
platform x86_64-w64-mingw32, arch x86_64, os mingw32, system x86_64, mingw32, version.string R version 3.6.1 (2019-07-05)

Resources