Installation of package ‘devtools’ had non-zero exit status

Hello, after upgrading to R v.3.6, I can't seem to load ANY new packages. Packages seem to download fine, but they're not installed properly. I don't know if this is a user permission problem or downloads are being directed to wrong directories. To be honest, I don't have a clue after scouring R Studio Community. The error code below was generated after trying to install "devtools". Every time I try to install a package (e.g., devtools, ggalt) I get the following error: " installation of package ‘devtools’ had non-zero exit status". I'm a novice at best, especially troubleshooting. Any help would be appreciated. Thanks

Steve Aitken (R 3.6, RStudio 1.2.1335, macOS 10.14.5)

> install.packages("devtools")

Installing package into ‘/usr/local/lib/R/3.6/site-library’

(as ‘lib’ is unspecified)

also installing the dependencies ‘openssl’, ‘gh’, ‘httr’, ‘usethis’

trying URL 'https://cran.rstudio.com/src/contrib/openssl_1.4.tar.gz'

Content type 'application/x-gzip' length 1202838 bytes (1.1 MB)

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

downloaded 1.1 MB

trying URL 'https://cran.rstudio.com/src/contrib/gh_1.0.1.tar.gz'

Content type 'application/x-gzip' length 15513 bytes (15 KB)

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

downloaded 15 KB

trying URL 'https://cran.rstudio.com/src/contrib/httr_1.4.0.tar.gz'

Content type 'application/x-gzip' length 156356 bytes (152 KB)

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

downloaded 152 KB

trying URL 'https://cran.rstudio.com/src/contrib/usethis_1.5.1.tar.gz'

Content type 'application/x-gzip' length 620225 bytes (605 KB)

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

downloaded 605 KB

trying URL 'https://cran.rstudio.com/src/contrib/devtools_2.0.2.tar.gz'

Content type 'application/x-gzip' length 388141 bytes (379 KB)

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

downloaded 379 KB

  • installing source package ‘openssl’ ...

** package ‘openssl’ successfully unpacked and MD5 sums checked

** using staged installation

Homebrew 2.1.6

Homebrew/homebrew-core (git revision dfc96; last commit 2019-07-04)

Homebrew/homebrew-cask (git revision 74a7c0; last commit 2019-07-04)

Using PKG_CFLAGS=-I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/openssl/include

------------------------- ANTICONF ERROR ---------------------------

Configuration failed because openssl was not found. Try installing:

  • deb: libssl-dev (Debian, Ubuntu, etc)

  • rpm: openssl-devel (Fedora, CentOS, RHEL)

  • csw: libssl_dev (Solaris)

  • brew: openssl@1.1 (Mac OSX)

If openssl is already installed, check that 'pkg-config' is in your

PATH and PKG_CONFIG_PATH contains a openssl.pc file. If pkg-config

is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:

R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'


ERROR: configuration failed for package ‘openssl’

  • removing ‘/usr/local/lib/R/3.6/site-library/openssl’

Warning in install.packages :

installation of package ‘openssl’ had non-zero exit status

ERROR: dependency ‘openssl’ is not available for package ‘httr’

  • removing ‘/usr/local/lib/R/3.6/site-library/httr’

Warning in install.packages :

installation of package ‘httr’ had non-zero exit status

ERROR: dependency ‘httr’ is not available for package ‘gh’

  • removing ‘/usr/local/lib/R/3.6/site-library/gh’

Warning in install.packages :

installation of package ‘gh’ had non-zero exit status

ERROR: dependency ‘gh’ is not available for package ‘usethis’

  • removing ‘/usr/local/lib/R/3.6/site-library/usethis’

Warning in install.packages :

installation of package ‘usethis’ had non-zero exit status

ERROR: dependencies ‘httr’, ‘usethis’ are not available for package ‘devtools’

  • removing ‘/usr/local/lib/R/3.6/site-library/devtools’

Warning in install.packages :

installation of package ‘devtools’ had non-zero exit status

The downloaded source packages are in

‘/private/var/folders/gr/4hb6lcrn0zg8_1k9tcqkk6540000gn/T/Rtmp48UWLI/downloaded_packages’

This is the key part of the message, you are missing a system dependency, since su are in Mac OSX you have to install * brew: openssl@1.1 (Mac OSX) (in your system not in R)

1 Like

Thank you very much. Worked like a charm (brew: openssl@1.1)

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