Hi,
I’ve used RStudio last year on Leap 15.4 (or 15.3) and it has worked fine. Since, I’ve upgraded to TW and I just can’t get it to install packages in RStudio. I think I’ve narrowed the issue down and reached my technical prowess-ceiling…
So what I want to do is, say, install the package “devtools”. So, naturally I
install.packages("devtools")
.
What happens is immediately:
Installing package into ‘/home/jpv/R/x86_64-suse-linux-gnu-library/4.2’
(as ‘lib’ is unspecified)
also installing the dependencies ‘credentials’, ‘openssl’, ‘systemfonts’, ‘textshaping’, ‘curl’, ‘gert’, ‘gh’, ‘httr’, ‘ragg’, ‘xml2’, ‘usethis’, ‘pkgdown’, ‘rcmdcheck’, ‘roxygen2’, ‘rversions’, ‘urlchecker’
Which is already concerning. But what I think is the issue is the following:
* installing *source* package ‘openssl’ ...
** package ‘openssl’ successfully unpacked and MD5 sums checked
** using staged installation
Using PKG_CFLAGS=
--------------------------- [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: 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 MESSAGE] ---------------------------
tools/version.c:1:10: fatal error: openssl/opensslv.h: No such file or directory
1 | #include <openssl/opensslv.h>
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
Stressing the following:
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=...'
It seems like RStudio wants openssl which doesn’t seem too bad, but it can’t find it.
when I run
whereis openssl
I get
openssl: /usr/bin/openssl
and the man PATH, too.
So I’ve figured out that pkg-config is resolving/linking (here ends my prowes…) dependencies of libraries. I’ve made sure that pkg-config is in $PATH but I can’t figure out how to add all the dependencies for “devtools” (as in *.pc files) to PKG_CONFIG_PATH. It won’t show up when I
printenv | grep PKG_CONFIG_PATH
.
As pkg-config exists I didn’t want to resort to
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
because RStudio isn’t really explicit about the usage of that option. Currently I am setting up Leap on a VM to see if I’ve got the same issue there. I’ll be back when I know more.