languageserver icon indicating copy to clipboard operation
languageserver copied to clipboard

Failed `openssl` installation on Mac

Open shirdekel opened this issue 3 years ago • 1 comments
trafficstars

When attempting to install languageserver, it installs most dependencies fine, but seems to gets stuck on openssl:

install.packages("languageserver")                                                                                                                                                                                                                                            
also installing the dependencies ‘openssl’, ‘httr’, ‘lintr’

trying URL 'https://cloud.r-project.org/src/contrib/openssl_1.4.5.tar.gz'
Content type 'application/x-gzip' length 1311351 bytes (1.3 MB)
==================================================
downloaded 1.3 MB

trying URL 'https://cloud.r-project.org/src/contrib/httr_1.4.2.tar.gz'
Content type 'application/x-gzip' length 159950 bytes (156 KB)
==================================================
downloaded 156 KB

trying URL 'https://cloud.r-project.org/src/contrib/lintr_2.0.1.tar.gz'
Content type 'application/x-gzip' length 219142 bytes (214 KB)
==================================================
downloaded 214 KB

trying URL 'https://cloud.r-project.org/src/contrib/languageserver_0.3.12.tar.gz'
Content type 'application/x-gzip' length 78124 bytes (76 KB)
==================================================
downloaded 76 KB

* installing *source* package ‘openssl’ ...
** package ‘openssl’ successfully unpacked and MD5 sums checked
** using staged installation
Homebrew 3.3.5
Homebrew/homebrew-core (git revision c334c367a6e; last commit 2021-11-25)
Homebrew/homebrew-cask (git revision ec6b161b16; last commit 2021-11-25)
Using PKG_CFLAGS=-I/opt/homebrew/opt/openssl/include
--------------------------- [ANTICONF] --------------------------------
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 MESSAGE] ---------------------------
tools/version.c:1:10: fatal error: 'openssl/opensslv.h' file not found
#include <openssl/opensslv.h>
         ^~~~~~~~~~~~~~~~~~~~
1 error generated.
--------------------------------------------------------------------
ERROR: configuration failed for package ‘openssl’
* removing ‘/opt/homebrew/Cellar/r/4.1.2/lib/R/library/openssl’
ERROR: dependency ‘openssl’ is not available for package ‘httr’
* removing ‘/opt/homebrew/Cellar/r/4.1.2/lib/R/library/httr’
ERROR: dependency ‘httr’ is not available for package ‘lintr’
* removing ‘/opt/homebrew/Cellar/r/4.1.2/lib/R/library/lintr’
ERROR: dependency ‘lintr’ is not available for package ‘languageserver’
* removing ‘/opt/homebrew/Cellar/r/4.1.2/lib/R/library/languageserver’

The downloaded source packages are in
        ‘/private/var/folders/61/90npj48j5k5g3wtr27vwl1yr0000gn/T/RtmpTRTMr1/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning messages:
1: In install.packages("languageserver") :
  installation of package ‘openssl’ had non-zero exit status
2: In install.packages("languageserver") :
  installation of package ‘httr’ had non-zero exit status
3: In install.packages("languageserver") :
  installation of package ‘lintr’ had non-zero exit status
4: In install.packages("languageserver") :
  installation of package ‘languageserver’ had non-zero exit status

I see there was some discussion on this here, so do you think I need to install openssl differently? Running which openssl in Terminal gets me /usr/bin/openssl. Also, running brew list shows that I already have [email protected] installed by homebrew. pkg-config should already be in my PATH because it's already installed through homebrew, but PKG_CONFIG_PATH does not contain an openssl.pc file.

sessionInfo()                                                                                                                                                                                                                                                                 
R version 4.1.2 (2021-11-01)
Platform: aarch64-apple-darwin20.6.0 (64-bit)
Running under: macOS Monterey 12.0.1

Matrix products: default
BLAS:   /opt/homebrew/Cellar/openblas/0.3.18/lib/libopenblasp-r0.3.18.dylib
LAPACK: /opt/homebrew/Cellar/r/4.1.2/lib/R/lib/libRlapack.dylib

locale:
[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_4.1.2 tools_4.1.2   

shirdekel avatar Nov 26 '21 00:11 shirdekel

It seems to be a duplicate of upstream issue https://github.com/jeroen/openssl/issues/91

eitsupi avatar Nov 26 '21 01:11 eitsupi