Issue with Installing 'forecast' package in R Studio

Error Information:

I'm trying to install the forecast package in R Studio but it won't work.

The first warning message I get is:
Warning in install.packages :
unable to access index for repository https://ftp.osuosl.org/pub/cran/bin/macosx/big-sur-arm64/contrib/4.1:
cannot open URL 'https://ftp.osuosl.org/pub/cran/bin/macosx/big-sur-arm64/contrib/4.1/PACKAGES'
Packages which are only available in source form, and may need compilation of C/C++/Fortran:
‘fracdiff’ ‘lmtest’ ‘tseries’ ‘urca’ ‘forecast’
Do you want to attempt to install these from sources? (Yes/no/cancel)

If I type Yes, a long message comes up and ends with:
Warning in install.packages :
installation of package ‘forecast’ had non-zero exit status.

I know this is not a general connectivity issue because I was able to install other packages like prophet.

Steps taken so far -

  1. I've tried turning off the 'Use secure download method for HTTP" under preferences
  2. I've tried using mirror servers
  3. I've tried updating my Mac OS from Big Sur to Ventura
  4. I've restarted R multiple times

System Information:

  • RStudio Edition: Desktop
  • RStudio Version: Build 492? "Prairie Trillium Release"? I'm not sure that's what it's showing me when I click on About R Studio
  • OS Version: OS Ventura 13.4
  • R Version: 4.1.2

Also:

  • RStudio diagnostics report:
  • Your sessionInfo():
  • RStudio crash report:
  • RStudio application log files:

Sometimes there is a hiccup in the internal organization of a repo’s files that can cause a not found on an otherwise good connection. You can try a different repo that hasn’t yet mirrored CRAN to duplicate the problem.

It could have been transient, however, and then offered the install from source option. When this fails with errors on macOS it is because the target machine doesn’t have the software required to compile from source or, if it does, there are some subtle deficiencies in header files or the like. Earlier this year, with RStudio Elspeth Geranium version, I had difficulties due to a change in default $PATHS.

Even if any of these problems are recognized and appreciated by a knowledgeable user, my advice is the same. Whenever there is an install from source failure, don’t try a second time unless you derive enjoyment from this sort of debugging more than actually doing applied statistics.

As an alternative try the successor {fpp3} package.

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.