Unable to install packages

I am unable to install any packages after I downgraded my R version from 3.5.1 to 3.2.1 (uninstall 3.5.1 and re-install 3.2.1) on my mac. Any package that I try to install fails with the following error.

> install.packages("data.table")

  There is a binary version available but the source version is later:
           binary source needs_compilation
data.table  1.9.6 1.12.0              TRUE

Do you want to install from sources the package which needs compilation?
y/n: y
installing the source package ‘data.table’

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  3 3100 3233k  100 3233k    0     0   193k     0  3790k      0 --:--:-- --:--:-- --:--:-- 3786k
Warning in strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) :
  unknown timezone 'zone/tz/2018i.1.0/zoneinfo/America/Chicago'
* installing *source* package ‘data.table’ ...
** package ‘data.table’ successfully unpacked and MD5 sums checked
** libs
llvm-gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include    -fPIC  -mtune=core2 -g -O2  -c assign.c -o assign.o
make: llvm-gcc-4.2: No such file or directory
make: *** [assign.o] Error 1
ERROR: compilation failed for package ‘data.table’
* removing ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/data.table’
Warning in install.packages :
  installation of package ‘data.table’ had non-zero exit status

The downloaded source packages are in
	‘/private/var/folders/23/shy8fvwx0hq0s70yl16kqfd40000gn/T/Rtmp0oJdLF/downloaded_packages’

Much appreciate any help!!

There are no precompiled versions of this packages for your R version, and you are lacking the necessary libraries for compiling packages in your system (e.g llvm-gcc-4.2)

R3.2.1 is very old and recent packages will generally not be compatible with this version.

Is there any reason you need to run such an old version?

Our team is using this version of R on the grid. So I have to use this version for my local version as well for avoiding package compatibility issues.

I made some changes to the MakeConf file as per this stackoverflow thread - https://stackoverflow.com/questions/19533220/cannot-install-r-package-from-source-in-mac-osx-maverick). It seems to be working for now.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.