Unable to Install Package

I am running R-Studio version 1.1.463 on Mac OS Yosemite Version 10.10.5. My laptop is from early 2015. Whenever I try to install any packages in R-Studio it gives me this error message:

Apologies for I am a complete n00b but I am not sure if this means the packages did get downloaded. If they did, where can I find them and what do I need to do to have them installed in R-Studio? I do not have a C compiler and am not sure I need one.

Thanks so much in advance. Also, I saw an earlier question that sounded similar where the recommendation was to look into firewalls, proxies or anything else that might be blocking access. I have disabled the firewall and have no proxies running.

========================================================

install.packages('reshape')
also installing the dependencies ‘Rcpp’, ‘plyr’

Warning in install.packages :
unable to access index for repository http://cran.utstat.utoronto.ca/bin/macosx/contrib/3.2
Packages which are only available in source form, and may need compilation
of C/C++/Fortran: ‘Rcpp’ ‘plyr’ ‘reshape’
Do you want to attempt to install these from sources?
y/n: y

[it accesses a bunch of http sites and downloaded individual gzip files of individual library functions from what I can tell. Since its my first post, I am unable to paste the message with all the download URLs]

The downloaded source packages are in
‘/private/var/folders/zp/18zxxbcs5cncbn98lr6zcptc0000gn/T/RtmpyaJOez/downloaded_packages’

Which R version are you using ? it seems a very old 3.2 version.
This message says that your cran mirror does not respond on this version. Try to go to the url.

Do you need this old version ?

You can't post the whole message as formatted code

When you are asked to install packages from source, that means compiling the code, so you do need a compiler. If you want to try to avoid this altogether, update your R version so you have access to precompiled binaries which are easy to install but only available for the latest R versions and are sometimes a little older than the source equivalents (but just for some days).

1 Like

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

Thank you so much! How do I upgrade just my R within R-Studio? I am sorry, am really new to this.

I only have a 32-bit macbook from early 2015 and was told this is the version of R-studio to use. Can i upgrade just the R version and not the R-studio and if yes, how do I do that?

Hi, go to the CRAN site and click on Download R for (Mac) OS X

If you are Catalina, download the package image called R-3.6.3.pkg because the alternative, called R-3.6.3.nn.pkg (regular) will not work properly.

If you are Sierra or higher, but not Catalina, select R-3.6.3.nn.pkg (regular).

You are right that you do not require a compiler, but beware of the following.

On macOS, packages sometimes fail to install, often with a non-zero exit status message. This is due to Apple's idiosyncratic compiler. The same packages will install on most Linux systems without trouble. Saint Simon Urbanek of the R Core Development Team takes on the brain damage required to recode the source to get around macOS's peculiar worldview for those in CRAN, but he can't bestow the same mercy on those still in development.

If you do not have the free Apple XCode App installed from the App Store` you will not be able to install any programs from source that require compilation.

Some packages will successfully install through compilation from source, but many won't.

When installing if you are offered the option to install from source, it makes sense to try it once. But, if at first it doesn't succeed, in all likelihood it never will. It's usually only 7-10 days until a macOS binary is available.

If you do want to install from source on the chance that a package may compile, in addition to the XCode app you need to enable command line tools from the terminal with

$ xcode-select --installxc
1 Like