[R-SIG-Finance] Trouble Installing Quantmod

Joshua Ulrich josh.m.ulrich at gmail.com
Fri Jul 25 15:24:41 CEST 2014


 Fri, Jul 25, 2014 at 8:18 AM, Peter Caya <petercaya at gmail.com> wrote:
> Hi everyone,
>
> I recently migrated to Linux from Windows and have R installed on my
> computer with no problems with one exception: I can't install quantmod or
> TTR.
>
> When I use the command:
>
> install.packages("TTR")
>
> I get the below message:
>
> *Installing package into ‘/home/peter/R/x86_64-pc-linux-gnu-library/3.0’
> (as ‘lib’ is unspecified)
> trying URL 'http://cran.rstudio.com/src/contrib/TTR_0.22-0.tar.gz
> <http://cran.rstudio.com/src/contrib/TTR_0.22-0.tar.gz>'
> Content type 'application/x-gzip' length 302852 bytes (295 Kb)
> opened URL
> ==================================================
> downloaded 295 Kb
>
> * installing *source* package ‘TTR’ ...
> ** package ‘TTR’ successfully unpacked and MD5 sums checked
> ** libs
> gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG
> -I"/usr/lib/R/site-library/xts/include"   -fpic  -O3 -pipe  -g  -c
> adjRatios.c -o adjRatios.o
> gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG
> -I"/usr/lib/R/site-library/xts/include"   -fpic  -O3 -pipe  -g  -c
> aroon.c -o aroon.o
> gfortran   -fpic  -O3 -pipe  -g  -c movingAverages.f -o movingAverages.o
> /bin/bash: gfortran: command not found
> make: *** [movingAverages.o] Error 127
> ERROR: compilation failed for package ‘TTR’
> * removing ‘/home/peter/R/x86_64-pc-linux-gnu-library/3.0/TTR’
> Warning in install.packages :
>   installation of package ‘TTR’ had non-zero exit status
>
> The downloaded source packages are in
>         ‘/tmp/RtmpjtCmgS/downloaded_packages’*
>
>
>
> The problem is that this doesn't show up in the packages listing in R
> Studio and when I attempt to load it with the library() command I get the
> below response:
>
> *Error in library(TTR) : ‘TTR’ is not a valid installed package*
>
As you should expect, since "installation of package ‘TTR’ had
non-zero exit status".

>
>
> This continues even though I have used the lib.loc command to try to
> install these directly to the directory where the other packages are.
> Additionally, I have also manually moved them to said directory but
> with no luck.
>
That won't help. The package didn't build.

>
> Any help would be greatly appreciated!
>
Look at the output carefully, and notice "gfortran: command not
found".  You need C/Fortran compilers to build from source.  See:
http://cran.r-project.org/doc/manuals/r-release/R-admin.html#Essential-and-useful-other-programs-under-a-Unix_002dalike

>
> Thank you,
>
>
> --
> Peter Caya
>
>         [[alternative HTML version deleted]]
>
>

Best,
--
Joshua Ulrich  |  about.me/joshuaulrich
FOSS Trading  |  www.fosstrading.com



More information about the R-SIG-Finance mailing list