R versions and package incompatibility

Hello all,

I am currently working on some spatial data, that requires me to use the package adehabitatLT. Since the package was incompatible with my previous version and online helplines suggested updating my R version, i updated to the most recent version (3.6.3; mac OS). This gave rise to a new set of problems — some of the other packages could not be accessed.

I have now switched to an older version (3.3) and many of the packages are now working. However, adehabitatLT and tidyverse (as examples) are giving me an error message. Below is the error that shown when i try to install tidyverse:

--> Do you want to install from sources the packages which need compilation?

If i say 'yes' and proceed, it runs a long list of codes before showing the following error:
ERROR: dependency ‘stringr’ is not available for package ‘broom’

  • removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/broom’
    Warning in install.packages :
    installation of package ‘broom’ had non-zero exit status
    ERROR: dependency ‘broom’ is not available for package ‘modelr’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/modelr’
    Warning in install.packages :
    installation of package ‘modelr’ had non-zero exit status
    ERROR: dependencies ‘broom’, ‘ggplot2’, ‘modelr’, ‘reprex’, ‘rvest’, ‘stringr’ are not available for package ‘tidyverse’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/tidyverse’
    Warning in install.packages :
    installation of package ‘tidyverse’ had non-zero exit status

Please let me know how i can fix this. My R knowledge is quite low.
Many thanks!

Can you specify what exactly are you trying to achieve? If your goal is to run both older packages that only work in R 3.3 and newer packages like tidyverse (the newest version of R is 4.0.2 not 3.6.3, by the way), then I would say it's pretty much impossible without some herculean efforts on your part.

One piece of advice is to try and find replacements for the older packages that have been updated recently.

Just to be sure, after updating your R version, Did you update your packages with checkBuilt option?

update.packages(checkBuilt = TRUE, ask = FALSE)

Thanks for the suggestions.
Having gone through older threads that addressed similar concerns, I downgraded to an older version of R (3.3). However, I still have issues with some of the packages such as sp, sf, which are compatible with R 3.3.

Below is the error message i receive when i try to install sf:
See `config.log' for more details
ERROR: configuration failed for package ‘units’

  • removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/units’
    Warning in install.packages :
    installation of package ‘units’ had non-zero exit status
  • installing source package ‘classInt’ ...
    ** package ‘classInt’ successfully unpacked and MD5 sums checked
    ** libs
    gfortran-4.8 -fPIC -g -O2 -c fish1.f -o fish1.o
    make: gfortran-4.8: No such file or directory
    make: *** [fish1.o] Error 1
    ERROR: compilation failed for package ‘classInt’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/classInt’
    Warning in install.packages :
    installation of package ‘classInt’ had non-zero exit status
    ERROR: dependencies ‘classInt’, ‘units’ are not available for package ‘sf’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/sf’
    Warning in install.packages :
    installation of package ‘sf’ had non-zero exit status

I'm not sure what i'm doing wrong. All packages are updated. When installing packages, i have tried specifying that it needs to be from the source, and with dependencies. Suggestions are much appreciated. Many thanks.

You are not sharing the complete error message, but from what you have posted It seems you are missing the compiler, try installing the recommended development tools for macOS systems.

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.