Author: Zhengjia Wang
Date: Oct 28,2018
We need to nail down some terms:
Console
. By saying "typing in the R console", I mean entering something here. (NOT system terminal)Topics:
brew
(optional) *If you miss some system packages but don't know where to finddevtools
*To install RAVE from githubfftw3
found *Wavelet, Hilbert, Fourier transformsV8
*Web Servicexml2
*Dependencieshdf5
not found *A commonly used data formathdf5
version is too lowhttpuv
compiler failure *Web ServiceI tested under Ubuntu 16.04
and CentOS 7
.
sudo apt-get install libssl-dev libcurl4-openssl-dev libssh2-1-dev libfftw3-dev libv8-3.14-dev libxml2-dev libhdf5-dev libtiff5-dev
sudo yum install -y libcurl-devel openssl-devel libssh2-devel fftw-devel v8-devel libxml2-devel hdf5-devel
Linux-brew
to install part of the packagesbrew install openssl@1.1 fftw v8@3.15 libxml2 hdf5 libssh2
Brew might not install libcurl
, fftw3
, V8
and libssh2
correctly, so you might want to search online or try the following lines to see if you can install them. (you are more than welcome to post any issues to this github repository)
Try:
sudo apt-get install libcurl4 libfftw3-dev libv8-3.14-dev
sudo yum install -y libcurl-devel fftw-devel v8-314-devel
brew
For linux, we recommend installing brew
, which helps you save time for 3rd-party softwares. Here is the official document of linux-brew.
Open system terminal, enter:
For Debian or Ubuntu:
sudo apt-get install build-essential curl file git
For Fedora
sudo dnf groupinstall 'Development Tools' && sudo dnf install curl file git
For CentOS or Red Hat,
sudo yum groupinstall 'Development Tools' && sudo yum install curl file git
Then, run
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
to download brew
.
To enable command, copy and paste:
test -d ~/.linuxbrew && PATH="$HOME/.linuxbrew/bin:$HOME/.linuxbrew/sbin:$PATH"
test -d /home/linuxbrew/.linuxbrew && PATH="/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$PATH"
test -r ~/.bash_profile && echo "export PATH='$(brew --prefix)/bin:$(brew --prefix)/sbin'":'"$PATH"' >>~/.bash_profile
echo "export PATH='$(brew --prefix)/bin:$(brew --prefix)/sbin'":'"$PATH"' >>~/.profile
echo "export PATH='$(brew --prefix)/bin:$(brew --prefix)/sbin'":'"$PATH"' >>~/.bash_profile
echo "export PATH='$(brew --prefix)/bin:$(brew --prefix)/sbin'":'"$PATH"' >>~/.bashrc
brew install hello
- ERROR: dependencies ‘git2r’, ‘httr’, ‘usethis’ are not available for package ‘devtools’
Reason
This is because libcurl
and openssl
are not installed to your system.
Solution:
Open system terminal,
sudo apt-get install libssl-dev libcurl4-openssl-dev
sudo yum install -y libcurl-devel openssl-devel
brew install openssl@1.1
Restart RStudio and try
install.packages('devtools')
If passed, continue installing RAVE
Notes:
Detailed errors are provided to you. Instructions has been already included in the error code
ERROR: dependencies ‘git2r’, ‘httr’, ‘usethis’ are not available for package ‘devtools’
# Relative informations:
# 1. libssh
* libssh2-1-dev (package on e.g. Debian and Ubuntu)
* libssh2-devel (package on e.g. Fedora, CentOS and RHEL)
* libssh2 (Homebrew package on OS X)
# 2. libcurl
* deb: libcurl4-openssl-dev (Debian, Ubuntu, etc)
* rpm: libcurl-devel (Fedora, CentOS, RHEL)
* csw: libcurl_dev (Solaris)
# 3. openssl
* deb: libssl-dev (Debian, Ubuntu, etc)
* rpm: openssl-devel (Fedora, CentOS, RHEL)
* csw: libssl_dev (Solaris)
* brew: openssl@1.1 (Mac OSX)
# 4. libgit2
* libgit2-dev (package on e.g. Debian and Ubuntu)
* libgit2-devel (package on e.g. Fedora, CentOS and RHEL)
* libgit2 (Homebrew package on OS X)
- Error: No package `fftw3` found
Reason
RAVE requires fftw
package for faster wavelet transforms. Some systems might not have the library.
Solution:
Open system terminal,
sudo apt-get install libfftw3-dev
sudo yum install -y fftw-devel
In RStudio console, enter
install.packages('fftw')
If passed, continue installing RAVE
Notes:
Alternative might be installing brew
first (see instructions), or if you have brew installed,
brew install fftw
- ERROR: configuration failed for package ‘V8’
Solution:
Open system terminal,
sudo apt-get install libv8-3.14-dev
sudo yum install -y v8-devel
brew install v8@3.15
In RStudio console,
install.packages('V8')
If passed, continue installing RAVE
Notes:
Here's detailed error code when I first install this package
ERROR: configuration failed for package ‘V8’
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because was not found. Try installing:
* deb: libv8-3.14-dev (formerly: libv8-dev) (Debian, Ubuntu)
* rpm: v8-314-devel (formerly: v8-devel) (Fedora, EPEL)
* brew: v8@3.15 (OSX) -- NOT regular v8! Tap from homebrew/versions
* csw: libv8_dev (Solaris)
To use a custom libv8, set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
------------------------- ANTICONF ERROR ---------------------------
- ERROR: configuration failed for package ‘xml2’
Solution:
Open system terminal,
sudo apt-get install libxml2-dev
sudo yum install -y libxml2-devel
In RStudio console,
install.packages('xml2')
If passed, continue installing RAVE
Notes:
Here's detailed error code when I first install this package
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because libxml-2.0 was not found. Try installing:
* deb: libxml2-dev (Debian, Ubuntu, etc)
* rpm: libxml2-devel (Fedora, CentOS, RHEL)
* csw: libxml2_dev (Solaris)
If libxml-2.0 is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a libxml-2.0.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
--------------------------------------------------------------------
ERROR: configuration failed for package ‘xml2’
There might be two errors for this dependency
hdf5
detected- Error: hdf5 does not seem to be installed on your platform. Please install the hdf5 library.
Reason
hdf5
is a data file format that shares across platform and can be loaded via R
, Python
, Matlab
, C
, Julia
and Java
. RAVE
uses hdf5
to store data, which requires hdf5
library to be installed.
Solution:
Open system terminal,
sudo apt-get install libhdf5-dev
sudo yum install -y hdf5-devel
brew install hdf5
In RStudio console
install.packages('hdf5r')
If passed, continue installing RAVE
Notes:
Original error message has some misleading information:
brew install hdf5
instead of instructedhdf5-1.8.12
for this system.configure: error: hdf5 does not seem to be installed on your platform.
Please install the hdf5 library.
The required HDF5 library files can be installed as follows:
- Debian-based (e.g. Debian >= 8.0, Ubuntu >= 15.04): 'sudo apt-get install libhdf5-dev'
- Old Debian-based (e.g Debian < 8.0, Ubuntu < 15.04): Install from source (see INSTALL)
- OS X using Homebrew: 'brew install homebrew/science/hdf5'
- RPM-based (e.g Fedora): 'sudo yum install hdf5-devel'
ERROR: configuration failed for package ‘hdf5r’
hdf5
requires at least version XX.XX.XX- configure: error: The version of hdf5 installed on your system is not sufficient. Please ensure that at least version 1.8.13 is installed
Reason
Your system hdf5
version is too old. To fix it, you need to install brew
. You might also have gcc
version that is too low.
Solution:
Install brew first (see here, or reference official docs).
Open your system terminal, check gcc version
gcc --version
If the version is below 5, install gcc@5
first
brew install gcc@5
Next, install hdf5
brew install hdf5
Restart RStudio and try
install.packages('hdf5r')
If passed, continue installing RAVE
.
If fails, you might need to specify hdf5
library path.
Find hdf5
path by typing in system terminal:
which h5cc
or
which h5pcc
I got result on my computer: home/linuxbrew/.linuxbrew/Cellar/hdf5/1.10.4/bin/h5cc
Replace configure.vars
below with your results.
# One of the following two works
install.packages(
'hdf5r',
configure.args = '--with-hdf5 [YOUR h5cc PATH]',
type = 'source'
)
install.packages(
'hdf5r',
configure.args = 'with-hdf5',
configure.vars = '[YOUR h5cc PATH]'
)
- g++: internal compiler error: Killed (program cc1plus).
- compilation failed for package ‘httpuv’
Reason
Usually this is because memory (RAM) is too low and you might want to increase your RAM
to at least 4GB.
Solution:
Increase RAM to at lease 4GB.
If still fail, check this.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.