brms not installed

I’m unable to install brms

checking for R packages…
rPkgsInstall -pkgs ALL -check : FAILURE

    oo Warning: 
       These packages are not installed on the computer: brms!

Using ubuntu 18.04 LTS. Openssl is installed, however the error I get when attempted rPkgsInstall -pkgs brms is

checking openssl/ssl.h usability… no
checking openssl/ssl.h presence… no
checking for openssl/ssl.h… no
checking openssl/rsa.h usability… no
checking openssl/rsa.h presence… no
checking for openssl/rsa.h… no
configure: error: Failed to find usable crypto library. Please install openssl-dev or equivalent and/or set PKG_LIBS if not in default location.
ERROR: configuration failed for package ‘PKI’

  • removing ‘/home/niko/R/PKI’
    ERROR: dependency ‘PKI’ is not available for package ‘rsconnect’
  • removing ‘/home/niko/R/rsconnect’
    ERROR: dependency ‘rsconnect’ is not available for package ‘shinystan’
  • removing ‘/home/niko/R/shinystan’
    ERROR: dependency ‘shinystan’ is not available for package ‘brms’
  • removing ‘/home/niko/R/brms’

Any advice, gurus?


I’m going to try to take a stab at it.

Try installing libcurl4-openssl-dev by doing the following

sudo apt-get install libcurl4-openssl-dev

Then once that is installed rerun the rPkgsInstall -pkgs ALL

You may have the OpenSSL library installed but you’re clearly missing the openssl-dev package

sudo apt-get install  openssl-dev

and then try tin install brms again.

Jumping in here because I noticed that if I try and install openssl-dev on ubuntu using apt, I receive the error “Unable to locate package openssl-dev”. Some googling led me to this, which suggest that the equivilent package for ubuntu would be libssl-dev instead of openssl-dev. I have not had a chance to test this, however…


I got the same advice from elsewhere, and
sudo apt-get install libssl-dev
followed by another
rPkgsInstall -pkgs ALL
solved the brms installation problem

(or at least AFNI check did not complain about anything anymore)

That didn’t solve it for me but this did (just in case this works for someone else)

sudo add-apt-repository -y “ppa:marutter/rrutter”
sudo add-apt-repository -y “ppa:marutter/c2d4u”
sudo apt-get update
sudo apt-get install r-cran-rstan
sudo apt-get install r-cran-shinystan
sudo apt-get install r-cran-brms