I've successfully installed InifiniDB on CENTOS 6.5.
InfiniDB is a columnar DB "compatible" with MySQL (same port etc.: I've even managed to install the latest version of MySQLWorkbench and works has a charm with InifiniDB - believing to deal with just another install of MySQL).
The installation does not have MySQL as I don't need it :)
I tried to install RMySQL from RStudio Server, but I am unable to install: the installation expect to find a copy of MySQL somewhere and I do not have it.
See below the installation log. I put :/usr/local/Calpont/mysql/bin in my PATH, but this didn't have any effect.
Please consider that the inspiration for this comes from InfiniDB itself: see here http://infinidb.co/system/files/Calpont%20InfiniDB_Quick%20Start_for%20R.pdf
I guess the main problem, comparing the error and the InfiniDB paper, is that they suggest to create the following global variables:
(From InfiniDB paper) RMySQL must be configured with the correct MySQL directory
(which comes with InfiniDB) and the developer library directory.
o Example in Ubuntu or CentOS:
export MYSQL_INC=”/usr/include/mysql/”
export MYSQL_LIB=”/usr/local/Calpont/mysql/lib/mysql”
But my installation on CENTOS does not have a mysql folder at /usr/include/mysql/.
Any suggestions?
==============
Installing package into ‘/usr/lib64/R/library’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/src/contrib/RMySQL_0.9-3.tar.gz'
Content type 'application/x-gzip' length 165363 bytes (161 Kb)
opened URL
==================================================
downloaded 161 Kb
* installing *source* package ‘RMySQL’ ...
** package ‘RMySQL’ successfully unpacked and MD5 sums checked
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -E
checking for compress in -lz... yes
checking for getopt_long in -lc... yes
checking for mysql_init in -lmysqlclient... no
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking mysql.h usability... no
checking mysql.h presence... no
checking for mysql.h... no
checking for mysql_init in -lmysqlclient... no
checking for mysql_init in -lmysqlclient... no
checking for mysql_init in -lmysqlclient... no
checking for mysql_init in -lmysqlclient... no
checking for mysql_init in -lmysqlclient... no
checking for mysql_init in -lmysqlclient... no
checking for mysql_init in -lmysqlclient... no
checking /usr/local/include/mysql/mysql.h usability... no
checking /usr/local/include/mysql/mysql.h presence... no
checking for /usr/local/include/mysql/mysql.h... no
checking /usr/include/mysql/mysql.h usability... no
checking /usr/include/mysql/mysql.h presence... no
checking for /usr/include/mysql/mysql.h... no
checking /usr/local/mysql/include/mysql/mysql.h usability... no
checking /usr/local/mysql/include/mysql/mysql.h presence... no
checking for /usr/local/mysql/include/mysql/mysql.h... no
checking /opt/include/mysql/mysql.h usability... no
checking /opt/include/mysql/mysql.h presence... no
checking for /opt/include/mysql/mysql.h... no
checking /include/mysql/mysql.h usability... no
checking /include/mysql/mysql.h presence... no
checking for /include/mysql/mysql.h... no
Configuration error:
could not find the MySQL installation include and/or library
directories. Manually specify the location of the MySQL
libraries and the header files and re-run R CMD INSTALL.
INSTRUCTIONS:
1. Define and export the 2 shell variables PKG_CPPFLAGS and
PKG_LIBS to include the directory for header files (*.h)
and libraries, for example (using Bourne shell syntax):
export PKG_CPPFLAGS="-I<MySQL-include-dir>"
export PKG_LIBS="-L<MySQL-lib-dir> -lmysqlclient"
Re-run the R INSTALL command:
R CMD INSTALL RMySQL_<version>.tar.gz
2. Alternatively, you may pass the configure arguments
--with-mysql-dir=<base-dir> (distribution directory)
or
--with-mysql-inc=<base-inc> (where MySQL header files reside)
--with-mysql-lib=<base-lib> (where MySQL libraries reside)
in the call to R INSTALL --configure-args='...'
R CMD INSTALL --configure-args='--with-mysql-dir=DIR' RMySQL_<version>.tar.gz
ERROR: configuration failed for package ‘RMySQL’
* removing ‘/usr/lib64/R/library/RMySQL’
Warning in install.packages :
installation of package ‘RMySQL’ had non-zero exit status
The downloaded source packages are in
‘/tmp/Rtmpz2Q4Wl/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
You do need to install mysql-devel. Please see step 3 of QuickStart Guide for R on InfiniDB website. It states the following:
Install a MySQL developer library on the client machine. Available from http://www.mysql.com and http://dev.mysql.com or you can use a package installer like apt-get. If you already installed a MySQL server, make sure that client header and library files are included in the install.
Example in Ubuntu:
sudo apt-get install mysql-client libmysqlclient-dev
Example in CentOS
sudo yum install mysql mysql-devel
If you have further questions please feel free to post in the InfiniDB forum as well.
I found a solution of sort.
First of all, my premise was to be able to use RMySQL with InfiniDB without adding a MySQL installation to the mix.
(As per wikipedia) "InfiniDB is accessed through a MySQL interface".
A recent paper on InfiniDB website on R and InifiniDB ("R Statistical Computing Quick Start Guide") listed simple instructions to install and use InfiniDB in R with RMySQL without mentioning any pre-requisite.
I found this to be incorrect. Within my CENTOS installation I wasn't able to compile the RMySQL package. The missing mysql.h was preventing it.
The solution I found was to install mysql-devel with yum. Yum installed also mysql client programs and shared libraries as a dependency.
On the other hand the total install with yum was 3MB and I can still say I didn't need MySQL server installed (at least!) as RMySQL+InfiniDB need just the MySQL libraries to work.
Related
I am trying to use the rize package to create a Dockerfile for ShinyApp. Starting the rize::shiny_dockerize() comand from the App dir. One of the packages which are required is the xlsx (Probably hier it is trying also to install rJava). I get the following error:
trying URL 'https://cran.rstudio.com/src/contrib/xlsxjars_0.6.1.tar.gz'
Content type 'application/x-gzip' length 9477071 bytes (9.0 MB)
==================================================
downloaded 9.0 MB
* installing *source* package ‘rJava’ ...
** package ‘rJava’ successfully unpacked and MD5 sums checked
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for string.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking whether time.h and sys/time.h may both be included... yes
configure: checking whether gcc supports static inline...
yes
checking whether setjmp.h is POSIX.1 compatible... yes
checking whether sigsetjmp is declared... yes
checking whether siglongjmp is declared... yes
checking Java support in R... present:
interpreter : '/usr/bin/java'
archiver : '/usr/bin/jar'
compiler : '/usr/bin/javac'
header prep.: '/usr/bin/javah'
cpp flags : '-I/usr/lib/jvm/java-8-openjdk-amd64/jre/../include -I/usr/lib/jvm/java-8-openjdk-amd64/jre/../include/linux'
java libs : '-L/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server -ljvm'
checking whether Java run-time works... ./configure: line 3766: /usr/bin/java: No such file or directory
no
configure: error: Java interpreter '/usr/bin/java' does not work
ERROR: configuration failed for package ‘rJava’
* removing ‘/usr/local/lib/R/site-library/rJava’
Error in i.p(...) :
(converted from warning) installation of package ‘rJava’ had non-zero exit status
Calls: <Anonymous> ... with_rprofile_user -> with_envvar -> force -> force -> i.p
Execution halted
The command '/bin/sh -c R -e "setwd('/srv/shiny-server/app'); automagic::automagic()"' returned a non-zero code: 1
Error in rize::shiny_dockerize() : object 'view_app' not found
does anyone how I can bring this to work in the rize package?
It looks like you have issues with setting proper location of Java. Note that making R happy with Java might be a little bit of struggle.
Take a look here: http://www.owsiak.org/r-java-11-and-making-sure-you-can-load-rjava/ for a sample. It is macOS based, but still, it should work fine.
Basically, what you want to do is to set your JAVA_HOME such way it points at Java installation. Once it's done, you can run R cmd javareconf like this
> sudo R CMD javareconf \
JAVA_HOME=${JAVA_HOME} \
JAVA=${JAVA_HOME}/bin/java \
JAVAC=${JAVA_HOME}/bin/javac \
JAVAH=${JAVA_HOME}/bin/javah \
JAR=${JAVA_HOME}/bin/jar
Make sure you have gcc installed and that you can compile simple C code.
rJava takes some time to install and is uaully a package which gives me a lot of issues. Here is what has generally worked for me in the past.
Install the JAVA JDK from: https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
In the command line run : sudo R CMD javareconf
if rJava library is not installed, (this particular version works for me but you could try installing the latest version)
devtools::install_version("rJava", version = "0.9-9", repos = "http://cran.us.r-project.org")
Restart R and attempt to reload the xlsx package
Caution: A lot of stackoverflow questions on this topic have advised people to alter environment variables. This has not been nessasary for me personally.
sudo R CMD javareconf should take care of this.
I'm trying to install udunits2 in R in order to satisfy the dependency for the ggforce package. However, the installer keeps failing on the check for udunits2. I have tried the instructions in this (udunits 2 devel is installed as shown here.)
and this thread, which produces the same result as trying to install.packages('udunits2').
I was able to get it working on my Mint machine by just installing udunits2-dev, however I'm quite new to Fedora, and am not sure what is causing this.
System info:
Fedora 28, R-3.4.4
EDIT
Error output when trying to install using install.packages("udunits2", configure.args = "--with-udunits2-lib=/usr/bin/udunits2"):
* installing *source* package ‘udunits2’ ...
** package ‘udunits2’ successfully unpacked and MD5 sums checked
checking for gcc... gcc -m64
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc -m64 accepts -g... yes
checking for gcc -m64 option to accept ISO C89... none needed
checking for XML_ParserCreate in -lexpat... yes
checking how to run the C preprocessor... gcc -m64 -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking udunits2.h usability... no
checking udunits2.h presence... no
checking for udunits2.h... no
checking for ut_read_xml in -ludunits2... yes
-----Error: udunits2.h not found-----
If the udunits2 library is installed in a non-standard location,
use --configure-args='--with-udunits2-lib=/usr/local/lib' for example,
or --configure-args='--with-udunits2-include=/usr/include/udunits2'
replacing paths with appropriate values for your installation.
You can alternatively use the UDUNITS2_INCLUDE and UDUNITS2_LIB
environment variables.
If udunits2 is not installed, please install it.
It is required for this package.
On Fedora the header file is installed in /usr/include/udunits2, c.f. this Github issue. Solution provided there:
sudo yum install udunits2-devel
Followed by:
install.packages("udunits2",configure.args='--with-udunits2-include=/usr/include/udunits2/')
Get the source code for udunits2 from the website: ftp://ftp.unidata.ucar.edu/pub/udunits
Download, compile, and install udunits2:
# Download the library
wget ftp://ftp.unidata.ucar.edu/pub/udunits/udunits-2.2.26.tar.gz
# Decompress the archive
tar xf udunits-2.2.26.tar.gz
# Navigate to the archive
cd ./udunits-2.2.26
# Configure the build for your system
./configure prefix=$HOME/.local
# Use 4 jobs to build quickly
make -j 4
# Install to our prefix
make install
Start a new R session and install the udunits2 R package:
(Make sure to change $HOME to your actual home path)
install.packages(
"udunits2",
configure.args = '--with-udunits2-include=$HOME/.local/include/'
)
Tested on this system:
R version 3.4.0 (2017-04-21)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux Server release 6.5 (Santiago)
As a supercomputer server user without permission of sudo yum, I found installing udunits2-devel quite diffcult. Alternatively, i found spack https://spack.readthedocs.io/en/latest/basic_usage.html
quite useful for installing udunits2&units R packages:
spack install r-udunits2
spack install r-units
Spack will automatically install dependent packages, and i don't have to install udunits2-devel by myself.
Since i installed units R package for ggforce R package, and ggforce can't be installed by spack, i need to load units before entering R and then install ggforce:
$source <(spack module tcl loads r-units)
$source <(spack module tcl loads r-udunits2)
$R
>install.packages("ggforce")
and everything worked well.
I am trying to install package RODBC via CRAN on MacBook Air with OS 10.12.
I am receiving the below error:
Installing package into ‘/Users/aaron.samuels/Library/R/3.3/library’
(as ‘lib’ is unspecified)
Package which is only available in source form, and may need compilation of
C/C++/Fortran: ‘RODBC’
Do you want to attempt to install these from sources?
y/n: y
installing the source package ‘RODBC’
trying URL 'https://cran.rstudio.com/src/contrib/RODBC_1.3-14.tar.gz'
Content type 'application/x-gzip' length 1163799 bytes (1.1 MB)
==================================================
downloaded 1.1 MB
* installing *source* package ‘RODBC’ ...
** package ‘RODBC’ successfully unpacked and MD5 sums checked
checking for gcc... clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether clang accepts -g... yes
checking for clang option to accept ISO C89... none needed
checking how to run the C preprocessor... clang -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files...
rm: conftest.dSYM: is a directory
rm: conftest.dSYM: is a directory
yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking sql.h usability... no
checking sql.h presence... no
checking for sql.h... no
checking sqlext.h usability... no
checking sqlext.h presence... no
checking for sqlext.h... no
configure: error: "ODBC headers sql.h and sqlext.h not found"
ERROR: configuration failed for package ‘RODBC’
* removing ‘/Users/aaron.samuels/Library/R/3.3/library/RODBC’
Warning in install.packages :
installation of package ‘RODBC’ had non-zero exit status
The downloaded source packages are in
/private/var/folders/3l/nrtzvm592736jz_qh_5l1wbmffq3bz/T/RtmpeuPUR0/downloaded_packages
Any suggestion on how I can easily install these headers and subsequently successfully install RODBC?
I found an official Microsoft Source that enable the ODBC driver.
You just need to run this lines on the Terminal
/usr/bin/ruby -e "$(curl -fsSL
https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew tap microsoft/mssql-release https://github.com/Microsoft/homebrew-mssql-release
brew update
brew install --no-sandbox msodbcsql17 mssql-tools
Use the below command to get rid of error thrown while installing RODBC package in R.
sudo zypper install unixODBC-devel
Thanks #Rafa Barragan.
Following commands worked for me on my mac-os (Mojave version).
Run following commands in terminal -
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew tap microsoft/mssql-release https://github.com/Microsoft/homebrew-mssql-release
brew update
brew install msodbcsql17 mssql-tools
configure: error: "ODBC headers sql.h and sqlext.h not found" means that ODBC drivers are not installed on your mac.
I would install iODBC and make sure the header files are present in the path
I'm trying to install R 3.2.3 from source. When I run ./configure I get the error:
configure: error: --with-readline=yes (default) and headers/libs are not available
Just before that, there is:
checking readline/history.h usability... no
checking readline/history.h presence... no
checking for readline/history.h... no
checking readline/readline.h usability... no
checking readline/readline.h presence... no
checking for readline/readline.h... no
checking for rl_callback_read_char in -lreadline... no
checking for main in -lncurses... no
checking for main in -ltermcap... yes
checking for rl_callback_read_char in -lreadline... no
checking for history_truncate_file... no
So I guess the problem is that the library readline is not installed on my system. As I don't have root access (I'm at work), I tried to install it locally. Here is what I did:
cd
mkdir readline
After downloading the tar.gz in /tmp:
cd /tmp
tar -zxvf readline-6.3.tar.gz
cd readline-6.3
./configure --prefix=$HOME/readline
make
make install
export LD_LIBRARY_PATH=$HOME/readline
This seems to have worked well but I still can't install R, I get the same error. How can I tell R where to find readline?
By the way, my OS is Debian 8, if this helps.
I've been trying to install RQuantLib package via
install.packages("RQuantLib")
It keeps giving me the following errors
* installing *source* package ‘RQuantLib’ ...
** package ‘RQuantLib’ successfully unpacked and MD5 sums checked
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking for R... yes
checking for quantlib-config... yes
checking for Boost development files... no
configure: error: Boost development files not found
ERROR: configuration failed for package ‘RQuantLib’
* removing ‘/usr/local/Cellar/r/3.1.1/R.framework/Versions/3.1/Resources/library/RQuantLib’
I've already done
brew install boost
brew install quantlib
and I've checked the sym links for both, which should be fine (done unlink/link for both).
SOLUTION :
Used the command below based on edd's answer, worked for me
install.packages("RQuantLib", configure.args="--with-boost-include=/usr/local/include/ --with-boost-lib=/usr/local/lib/")
Try to do it either in a shell based on the *.tar.gz file using these
edd#max:~/git/rquantlib(master)$ ./configure --help|grep boost
--with-boost-include=INCLUDE_PATH
--with-boost-lib=LIB_PATH
edd#max:~/git/rquantlib(master)$
or look at the help for install.packages() where you can pass arguments to configure as well -- I find the first method easier.
In essence, it seems that we need to help configure find your Boost headers (and then probably also the library).