I am using R version 3.4.0
I'm trying to install tseries package on linux machine:
install.packages('https://cran.cnr.berkeley.edu/src/contrib/tseries_0.10-42.tar.gz',dependencies = TRUE,repos = NULL,type ="source")
It gives error:
ERROR: compilation failed for package 'xts'
* removing '/usr/lib64/R/library/xts'
ERROR: dependency 'xts' is not available for package 'TTR'
* removing '/usr/lib64/R/library/TTR'
ERROR: dependencies 'xts', 'TTR' are not available for package 'quantmod'
* removing '/usr/lib64/R/library/quantmod'
ERROR: dependencies 'quadprog', 'quantmod' are not available for package 'tseries'
* removing '/usr/lib64/R/library/tseries'
1: In install.packages("tseries", dependencies = TRUE) :
installation of package 'quadprog' had non-zero exit status
2: In install.packages("tseries", dependencies = TRUE) :
installation of package 'xts' had non-zero exit status
3: In install.packages("tseries", dependencies = TRUE) :
installation of package 'TTR' had non-zero exit status
4: In install.packages("tseries", dependencies = TRUE) :
installation of package 'quantmod' had non-zero exit status
5: In install.packages("tseries", dependencies = TRUE) :
installation of package 'tseries' had non-zero exit status
Then I tried installing quadprog using:
install.packages('https://cran.cnr.berkeley.edu/src/contrib/quadprog_1.5-5.tar.gz',dependencies = TRUE,repos = NULL,type ="source")
It gives error :
/usr/bin/ld: cannot find -lgfortran
collect2: error: ld returned 1 exit status
make: *** [quadprog.so] Error 1
ERROR: compilation failed for package 'quadprog'
* removing '/usr/lib64/R/library/quadprog'
Please help what should i do. I'm facing hard time in installing these packages.
I have installed R using :
sudo yum -y install R-core R-devel
I tried installing gfortran using : yum install gcc-gfortran
It says :Package gcc-gfortran-4.4.7-18.el6.x86_64 already installed and latest version Nothing to do