Rserve : ld: library not found for -lssl
Asked Answered
T

2

6

I am getting an error while trying to install Rserve 1.8.6. I can successfully install 1.7.3 from CRAN. This is on Mac OS High Sierra.

 ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [forward] Error 1
make: *** [all] Error 2
ERROR: compilation failed for package ‘Rserve’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rserve’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rserve’

The downloaded source packages are in
    ‘/private/var/folders/v7/hyxrfmk94p1_03gdrm27fnxncy3vq1/T/RtmpFHKNMe/downloaded_packages’
Tiber answered 16/1, 2019 at 20:30 Comment(2)
same problem here, xcode + command line tools are installed. I am curious how to solve that problem (why is Rserve 1.8 not available as binary anymore?)Zigmund
same problem: joxi.ru/n2Y4D4UbdQJEm6Baste
B
0

This worked for me (MacOS):

In terminal:

brew install openssl

export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/openssl/lib/
Baste answered 1/7, 2019 at 16:22 Comment(0)
C
0

I'm running Mac OS 10.15 Catalina, I've spent 2 days trying to fix this same problem, scouring the internet for help. I finally managed it by cobbling together solutions from a few different sources.

The key thing I was missing was that Mac OS ships with its own version of openssl which it thinks is superior to anything else you can find. It is wrong. What you need to do is go and download the latest version of openssl, install that, then export THAT library to your library path variable. Here are the steps I took with openssl 1.1.1:

Get the version number for the latest version of openssl from the source (https://www.openssl.org/source/) and then manually install it directly where it's supposed to go:

cd /usr/local/src  
  • If you're getting "No such file or directory", make it:

    cd /usr/local && mkdir src && cd src

Download openssl using curl (shown) or using the link above to the source code (make sure you put the file in the directory you just made in the previous step):

curl --remote-name https://www.openssl.org/source/openssl-1.1.1f.tar.gz

Extract and cd in:

tar -xzvf openssl-1.1.1f.tar.gz
cd openssl-1.1.1f

Compile and install (these are the 64 bit Mac OS instructions. Refer to the openssl documentation for 32 bit and other OS instructions):

./Configure darwin64-x86_64-cc shared enable-ec_nistp_64_gcc_128 no-ssl2 no-ssl3 no-comp --openssldir=/usr/local/ssl/macos-x86_64
make depend
sudo make install

This created a new openssl folder so when you export the library path you have to feed it the right openssl folder:

export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/[email protected]/lib/

Hope that helps you if you haven't figured it out yet, and anyone else in the future who is ready to chuck their computer across the room, like I was.

Circumambulate answered 8/4, 2020 at 18:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.