basse
basse

Reputation: 1339

R devtools package installation fails to find openssl

I'm trying to install the devtools package for R (v3.6.1) with install.package("devtools"). The install fails when openssl cannot be found, although openssl version -a indicates that LibreSSL 2.8.3 is installed. The OS is macOS 10.15.1.

Here is the console log:

* installing *source* package ‘openssl’ ...
** package ‘openssl’ successfully unpacked and MD5 sums checked
** using staged installation
Homebrew 2.2.0
Homebrew/homebrew-core (git revision 434f; last commit 2019-12-03)
Homebrew/homebrew-cask (git revision deedf; last commit 2019-12-03)
Using PKG_CFLAGS=-I/usr/local/opt/[email protected]/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: [email protected] (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

How do I exactly do that PATH stuff the error message suggests? Or is there any other remedy you could suggest? Both the r and macOS installations are fresh, so there shouldn't be anything out of the ordinary messing this up.

Upvotes: 1

Views: 2729

Answers (1)

dc37
dc37

Reputation: 16178

As LibreSSL is a fork of OpenSSL, I presume they are different enough to not be recognized by devtools package as Openssl. You should try to install [email protected] as suggested by the console log.

brew install openssl

Upvotes: 5

Related Questions