RStudio, dependencies, and pkg-config

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.

Exact same issue on Leap as well. That is annoying. I gladly provide more info if that is helpful to resolve the issue. Or should I file a bugreport somewhere?

you need the devel rpms

System Info for good measure:
Tumbleweed install:
snapshot 20221119
KDE 5.26.3 on X11
Kernel-V: 6.0.8-1-default

RStudio:
RStudio 2022.02.2+485 “Prairie Trillium” Release (8acbd38b0d4ca3c86c570cf4112a8180c48cc6fb, 2022-05-21) for Unknown OS
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.15.11 Chrome/87.0.4280.144 Safari/537.36

LeapVM:
15.4
XFCE 4.16 also on X11
Kernel-V: 5.14.21-150400.24.33-default

Trying it on Ubuntu 22.04 LTS now…

Where do I get those from?
On the posit.co page there is only one version for suse 15 which I think is Leap 15.x.
I have r-base and r-base-devel if its that what you mean.
https://download1.rstudio.org/desktop/opensuse15/x86_64/rstudio-2022.07.2-576-x86_64.rpm
?

Where do I get those from?

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=…’

zypper?
Yast?

If you mean

  • r-base
  • r-base-devel

I have those installed. What should I be searching for?

I have added a quote in my last post…

Jesus, den Wald vor lauter Bäumen…

Hi
In the output that use Sauerland indicated, openSUSE is an rpm based distribution…

rpm: openssl-devel (Fedora, CentOS, RHEL)

Use zypper or YaST to search for openssl-devel…


zypper se openssl-devel


S | Name                  | Summary                                        | Type
--+-----------------------+------------------------------------------------+--------
  | libopenssl-devel      | Development files for OpenSSL                  | package
  | xmlsec1-openssl-devel | OpenSSL crypto plugin for XML Security Library | package

zypper in libopenssl-devel

Also since you have third party rpms installed, your really need to ask those packagers/maintainers how they built them as it may differ from the rstudio packages built/maintained by openSUSE folks.

Thank you two for your help!
I’ve managed to install the devtools package in RStudio by cascading down through the error prompts.
A whole bunch of other dependencies popped up. I guess this will bite me back at one point. I see how far I can use it until it breaks.

rstudio installed in Tumbleweed from your Link in Post #5 and also R:

localhost:/home/stephan # LANG=C zypper in -f https://download1.rstudio.org/desktop/opensuse15/x86_64/rstudio-2022.07.2-576-x86_64.rpm R-base
Loading repository data...
Reading installed packages...
Forcing installation of 'R-base-4.2.2-43.2.x86_64' from repository 'Haupt-Repository (OSS)'.
Forcing installation of 'rstudio-2022.07.2+576-1.x86_64' from repository 'Plain RPM files cache'.
Resolving package dependencies...

The following package is going to be reinstalled:
  rstudio

The following 42 NEW packages are going to be installed:
  R-KernSmooth R-MASS R-Matrix R-base R-base-devel R-boot R-class R-cluster R-codetools R-compiler R-core R-core-devel R-core-doc R-core-libs R-core-packages R-datasets R-foreign R-grDevices R-graphics R-grid
  R-lattice R-methods R-mgcv R-nlme R-nnet R-parallel R-recommended-packages R-rpart R-spatial R-splines R-stats R-stats4 R-survival R-tcltk R-tools R-utils libgfortran5 libicu72 libicu72-ledata libquadmath0 tk
  xhost

42 new packages to install, 1 to reinstall.
Overall download size: 204.0 MiB. Already cached: 0 B. After the operation, additional 127.1 MiB will be used.
Continue? [y/n/v/...? shows all options] (y): 
Retrieving package R-core-doc-4.2.2-43.2.x86_64                                                                                                                             (1/43),  17.1 MiB ( 23.0 MiB unpacked)
.
.
.                                                                                                                        (41/43), 239.6 KiB (108.9 KiB unpacked)
Retrieving: R-KernSmooth-2.23.20-43.2.x86_64.rpm ...........................................................................................................................................................[done]
Retrieving package R-recommended-packages-4.2.2-43.2.x86_64                                                                                                                (42/43), 148.7 KiB (    0   B unpacked)
Retrieving: R-recommended-packages-4.2.2-43.2.x86_64.rpm ...................................................................................................................................................[done]
Retrieving package rstudio-2022.07.2+576-1.x86_64                                                                                                                          (43/43), 127.9 MiB (581.9 MiB unpacked)
rstudio-2022.07.2-576-x86_64.rpm:
    Header V4 RSA/SHA256 Signature, key ID 3f32ee77e331692f: NOKEY
    V4 RSA/SHA256 Signature, key ID 3f32ee77e331692f: NOKEY

warning: /var/tmp/zypp.Z1xKn3/zypper/_tmpRPMcache_/%CLI%/rstudio-2022.07.2-576-x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID e331692f: NOKEY
Looking for gpg key ID E331692F in cache /var/cache/zypp/pubkeys.
Repository Plain RPM files cache does not define additional 'gpgkey=' URLs.
rstudio-2022.07.2+576-1.x86_64 (Plain RPM files cache): Signature verification failed [4-Signatures public key is not available]
Abort, retry, ignore? [a/r/i] (a): i

Checking for file conflicts: ...............................................................................................................................................................................[done]
( 1/43) Installing: R-core-doc-4.2.2-43.2.x86_64 ...........................................................................................................................................................[done]
( 2/43) Installing: libicu72-ledata-72.1-1.1.noarch ........................................................................................................................................................[done]
.
.
.
.
(40/43) Installing: R-MASS-7.3.58-43.2.x86_64 ..............................................................................................................................................................[done]
(41/43) Installing: R-KernSmooth-2.23.20-43.2.x86_64 .......................................................................................................................................................[done]
(42/43) Installing: R-recommended-packages-4.2.2-43.2.x86_64 ...............................................................................................................................................[done]
warning: /var/cache/zypper/RPMS/rstudio-2022.07.2-576-x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID e331692f: NOKEY
(43/43) Installing: rstudio-2022.07.2+576-1.x86_64 .........................................................................................................................................................[done]
Executing %posttrans scripts ...............................................................................................................................................................................[done]
localhost:/home/stephan # 


(shortened the output because of 15000 characters)
ignored the Signature Verification and after Installation rstudio is starting.

Hi
I doubt it will take too long as Tumbleweed rolls… Lucky the Leap version works…

If you want the latest openSUSE Development release, then suggest you use this repository https://build.opensuse.org/project/show/devel:languages:R:released and the Tumbleweed repository…