0

I need to install the package devtools in R on my mac. The R version is 3.2.3. It gives an error saying

Warning in install.packages :
download had nonzero exit status
Warning in install.packages :
download of package ‘curl’ failed

Other posts addressing similar issues provide solutions to Linux (with the apt-get command, etc) but doesn't seem to have a Mac solution. Highly appreciate if someone with insight can offer some guide here.

Konrad
  • 17,740
  • 16
  • 106
  • 167
Camuslu
  • 123
  • 1
  • 3
  • 13

1 Answers1

0

The problem pertains to the download, have a look at this discussion. You can consider downloading the package first and installing a package from a local zip file.

install.packages("local_package_file", repos = NULL)

or more specifically:

install.packages("devtools.zip", repos = NULL, type = "source")

as shown on the devtools @ GitHub.


You didn't mentioned, but I understand that you have the Xcode installed as well. Alternatively, it could be informative to check if your R compiler has no problems with connecting to the Internet, you can use the code: is.character(getURL("www.google.com")).

Community
  • 1
  • 1
Konrad
  • 17,740
  • 16
  • 106
  • 167