Installing old version of packages

Hello,

I am trying to install older version of few packages like randomForest (4.6.12), kernlab(0.9.24) and party(1.0.25). I used commands like install_version("packagename", version " ") and also incorporated URL.
How ever i get various warrings generated along with the message that non-zero exit status.
I am using R version 3.6.2 on macOs catalina 10.15.3

There is no single reason for an installation process to fail, we would need to see the specific error message to help you out.

This is what happens when Install the packages. Here I have installed using .tar.gz file.The same error continues in commands as well.
**install.packages("~/Downloads/randomForest_4.6-**12.tar.gz", repos = NULL, type = "source")
Warning in strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) :
unknown timezone 'zone/tz/2019c.1.0/zoneinfo/Asia/Kolkata'

  • installing source package ‘randomForest’ ...
    ** package ‘randomForest’ successfully unpacked and MD5 sums checked
    ** libs
    clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O2 -c classTree.c -o classTree.o
    clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O2 -c regTree.c -o regTree.o
    clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O2 -c regrf.c -o regrf.o
    clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O2 -c rf.c -o rf.o
    rf.c:454:1: warning: expression result unused [-Wunused-value]
  •                                                           nrightimp[cl[n] - 1]++;
    

^ ~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
gfortran -fPIC -g -O2 -c rfsub.f -o rfsub.o
make: gfortran: No such file or directory
make: *** [rfsub.o] Error 1
ERROR: compilation failed for package ‘randomForest’

  • removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/randomForest’
    Warning in install.packages :
    installation of package ‘/Users/apple/Downloads/randomForest_4.6-12.tar.gz’ had non-zero exit status

install.packages("~/Downloads/randomForest_4.6-12.tar.gz", repos = NULL, type = "source")

  • installing source package ‘randomForest’ ...
    ** package ‘randomForest’ successfully unpacked and MD5 sums checked
    ** libs
    clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O2 -c classTree.c -o classTree.o
    clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O2 -c regTree.c -o regTree.o
    clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O2 -c regrf.c -o regrf.o
    clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O2 -c rf.c -o rf.o
    rf.c:454:1: warning: expression result unused [-Wunused-value]
  •                                                           nrightimp[cl[n] - 1]++;
    

^ ~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
gfortran -fPIC -g -O2 -c rfsub.f -o rfsub.o
make: gfortran: No such file or directory
make: *** [rfsub.o] Error 1
ERROR: compilation failed for package ‘randomForest’

  • removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/randomForest’
    Warning in install.packages :
    installation of package ‘/Users/apple/Downloads/randomForest_4.6-12.tar.gz’ had non-zero exit status

Compilation from source is failing due to lack of a system utility called gfortran

How do I resolve it?

Install the development tools and libraries indicated on the official CRAN site.

https://cran.r-project.org/bin/macosx/tools/

1 Like

Okay. I will try that

I tried installing gfortan 4.2 and later installed 6.1. It shows the following error.

install.packages("~/Downloads/randomForest_4.6-12.tar.gz", repos = NULL, type = "source")

  • installing source package ‘randomForest’ ...
    ** package ‘randomForest’ successfully unpacked and MD5 sums checked
    ** libs
    clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O2 -c classTree.c -o classTree.o
    clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O2 -c regTree.c -o regTree.o
    clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O2 -c regrf.c -o regrf.o
    clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O2 -c rf.c -o rf.o
    rf.c:454:1: warning: expression result unused [-Wunused-value]
  •                                                           nrightimp[cl[n] - 1]++;
    

^ ~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
gfortran -fPIC -g -O2 -c rfsub.f -o rfsub.o
gfortran-4.2: error trying to exec '/usr/local/bin/i686-apple-darwin8-gfortran-4.2': execvp: Bad CPU type in executable
make: *** [rfsub.o] Error 255
ERROR: compilation failed for package ‘randomForest’

  • removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/randomForest’
    Warning in install.packages :
    installation of package ‘/Users/apple/Downloads/randomForest_4.6-12.tar.gz’ had non-zero exit status

It seems like you have installed a 32 bit version, do you have a 32 bit system? I suspect you should have installed a 64 bit version but, I can't give you any specific advice on the installation process of this tools since I'm not a Mac user, very likely someone else will help you with this.

I just tried Re-installing gfortan but it still shows the same error. Just for the instance is there a requirement of Xcode along with gfortan?

Hello all,
I tried a lot of alternatives but it still shows the same error.
Can anyone please help me?

install.packages("~/Downloads/randomForest_4.6-12.tar.gz", repos = NULL, type = "source")

  • installing source package ‘randomForest’ ...
    ** package ‘randomForest’ successfully unpacked and MD5 sums checked
    ** libs
    clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O2 -c classTree.c -o classTree.o
    clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O2 -c regTree.c -o regTree.o
    clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O2 -c regrf.c -o regrf.o
    clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O2 -c rf.c -o rf.o
    rf.c:454:1: warning: expression result unused [-Wunused-value]
  •                                                           nrightimp[cl[n] - 1]++;
    

^ ~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
gfortran -fPIC -g -O2 -c rfsub.f -o rfsub.o
make: gfortran: No such file or directory
make: *** [rfsub.o] Error 1
ERROR: compilation failed for package ‘randomForest’

  • removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/randomForest’
    Warning in install.packages :
    installation of package ‘/Users/apple/Downloads/randomForest_4.6-12.tar.gz’ had non-zero exit status

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