9

I'm trying to install openssl inside R, using install.packages('openssl'), but I'm getting an error message:

* installing *source* package ‘openssl’ ...
** package ‘openssl’ successfully unpacked and MD5 sums checked
Found pkg-config cflags and libs!
Using PKG_CFLAGS= 
Using PKG_LIBS=-lssl -lcrypto -ldl -lz  
------------------------- 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 (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/lib64/R/library/openssl’

Openssl seems to be installed on the system:

$ openssl version -a
OpenSSL 1.0.2f  28 Jan 2016
built on: reproducible build, date unspecified
platform: linux-x86_64
options:  bn(64,64) rc4(16x,int) des(idx,cisc,16,int) idea(int) blowfish(idx)
compiler: gcc44 -I. -I.. -I../include  -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -Wa,--noexecstack -m64 -DL_ENDIAN -O3 -Wall -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM
OPENSSLDIR: "/usr/local/bin/miniconda2/ssl"

I have tried to set PKG_CONFIG_PATH to where openssl.pc is located but with no luck.

Some help would be much appreciated!

I'm running SUSE11 SP2

rlbc
  • 91
  • 1
  • 4
  • 2
    Is the `openssl-devel` package installed? This is a separate package from the one that provides the `openssl` command line program. – thrig Mar 18 '16 at 20:01
  • I have `libopenssl-devel` installed. Not sure if it's the same package on suse. I couldn't find `openssl-devel` in my repositories. – rlbc Mar 19 '16 at 01:22
  • Hmm, where *is* the `openssl.pc` file? Also the `OPENSSLDIR` under `/usr/local/bin/miniconda2` is a bit strange, as all the other linux I've seen put openssl directly under `/usr`. – thrig Mar 19 '16 at 15:28
  • I have found `openssl.pc` over `/usr/local/bin/miniconda2/pkgs/openssl-1.0.2d-0/lib/pkgconfig/`, `/usr/local/bin/miniconda2/lib/pkgconfig/` and `/usr/lib64/pkgconfig/`. They are all over the place. – rlbc Mar 20 '16 at 19:00
  • The `/usr/lib64` location would be typical, and whatever `miniconda2` is is probably messing things up, so getting it out of the search path might help in R. – thrig Mar 21 '16 at 14:44
  • 4
    `apt-get install libssl-dev` worked for me – geotheory May 07 '16 at 13:32

1 Answers1

1

I was trying to install swirl on R 3.1.3 and was stuck in the same problem - installing the openssl package. I resolved it by manually unpacking the downloaded openssl tarball in /tmp to the R packages folder (in my case R/x86_64-unknown-linux-gnu-library/3.1/) .

I was able to proceed and install swirl.

Equbay Kiflay

user177960
  • 11
  • 1