2

I installed R on centos 6.5 gcc version 4.4.7 g++ version 4.4.7

when I run R and try to install packages

install.packages("fArma") 

It give the following error

gcc: /builddir/build/BUILD/R-3.3.0/zlib-1.2.8/target/usr/lib64/libz.a: No such file or directory
gcc: /builddir/build/BUILD/R-3.3.0/bzip2-1.0.6/target/usr/lib64/libbz2.a: No such file or directory gcc: /builddir/build/BUILD/R-3.3.0/xz-5.2.2/target/usr/lib64/liblzma.a: No such file or directory
gcc: /builddir/build/BUILD/R-3.3.0/pcre-8.38/target/usr/lib64/libpcre.a: No such file or directory
gcc: /builddir/build/BUILD/R-3.3.0/curl-7.48.0/target/usr/lib64/libcurl.a: No such file or directory
gcc: /builddir/build/BUILD/R-3.3.0/zlib-1.2.8/target/usr/lib64/libz.a: No such file or directory
gcc: /builddir/build/BUILD/R-3.3.0/bzip2-1.0.6/target/usr/lib64/libbz2.a: No such file or directory
gcc: /builddir/build/BUILD/R-3.3.0/xz-5.2.2/target/usr/lib64/liblzma.a: No such file or directory
gcc: /builddir/build/BUILD/R-3.3.0/pcre-8.38/target/usr/lib64/libpcre.a: No such file or directory
gcc: /builddir/build/BUILD/R-3.3.0/curl-7.48.0/target/usr/lib64/libcurl.a: No such file or directory

make: *** [gss.so] Error 1
ERROR: compilation failed for package âgssâ
* removing â/usr/lib64/R/library/gssâ
ERROR: dependency âgssâ is not available for package âfBasicsâ
* removing â/usr/lib64/R/library/fBasicsâ
ERROR: dependency âfBasicsâ is not available for package âfArmaâ
* removing â/usr/lib64/R/library/fArmaâ

I checked if these lib's exist in /usr/lib64/ and i found them but with the extension so

And it's not issue of missing libraries, I know because i checked the lib in /usr/lib64 with another working machine and it's the same.

Any idea what the problem could be?

Emad
  • 279
  • 5
  • 22
  • @nrussell can you help in this? – Emad Jun 14 '16 at 14:44
  • 1
    Not sure if [this](http://stackoverflow.com/questions/37432130/error-installing-hmisc-in-r-3-3-0-on-centos-6-7) is exactly the issue you're facing. However, they've provided a fix for something similar (Hmisc as opposed to fArma). Definitely worth a try if you've not done that already.. – rurtle Jun 14 '16 at 14:54
  • @rurtle thank you for you response but as i said i checked if i have the lib's and i found them so i think it's a different issue. – Emad Jun 14 '16 at 14:57
  • If you have only the so version of library you should use them. I mean your error refers to static linked lib, you have Shared Object (dynamic link) lib version. So you have to install the static version of libs. – LPs Jun 14 '16 at 14:58
  • @Emad: The text in your question states different: "i found them but with the extension so". `.a` are static archives. – too honest for this site Jun 14 '16 at 14:59

2 Answers2

1

The reason that your package is failing to build is because GCC is not able to compile the software and might need additional packages to do so.

I would suggest that you install the entire c development suite for yum.

You can do this with

You will first want to run:

sudo yum groupinstall 'Development Tools'
Josh Beauregard
  • 2,498
  • 2
  • 20
  • 37
0

Do note the version numbers in the pathnames: zlib-1.2.8, bzip2-1.0.6, xz-5.2.2 etc. CentOS has zlib-1.2.3-29, bzip2-1.0.5-7 and xz-4.999.9-0.5.beta.20091007git.

Your build script apparently tries to use libraries that should be present in your source package, but for some reason they aren't there. The build script does not seem to use system (CentOS) provided libraries.

This LINK should solve your problem hopefully.

Community
  • 1
  • 1
J_F
  • 9,956
  • 2
  • 31
  • 55
  • The reason for these more recent version numbers is that CentOS 6.x contains libraries that R 3.3.x now considers too old. The R developers decided to remove all pre-packaged support libraries (the ones indicated above) and have since modified their configure script to search for system libraries that have a minimum version requirement (e.g. zlib >= 1.2.5). Apparently, the person who successfully built this R installation did so by incorporating the hand-built updates of the libraries and then configured R to statically link to them. The build directory, now emptied, is missing these libs. – Robert Casey Jul 07 '16 at 19:08