0

I just installed the latest R version (4.1.1 (2021-08-10)) on my Ubuntu 18.04.6 LTS. I tried to install some packages. I started with stringi and I have the following error:

Error: package or namespace load failed for ‘stringi’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/home/user/R/x86_64-pc-linux-gnu-library/4.1/stringi/libs/stringi.so':
  /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /home/user/R/x86_64-pc-linux-gnu-library/4.1/stringi/libs/stringi.so)
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/user/R/x86_64-pc-linux-gnu-library/4.1/stringi’

The downloaded source packages are in
        ‘/tmp/RtmpXRZprI/downloaded_packages’
Warning message:
In install.packages("stringi") :
  installation of package ‘stringi’ had non-zero exit status

I tried to install libraries as described here

sudo apt-get install libcurl4-openssl-dev libssl-dev

however it didn't help. I'm total newbie in such installations and ubuntu libraries. Could you give me a hint how to solve this problem I also want to install devtools (same problem).

Adamm
  • 2,150
  • 22
  • 30
  • I do not use Ubuntu, but Fedora instead. On Fedora, there is a repository from which to install the R binaries packages (no compilation needed) -- this approach is much more practical and convenient. I guess the corresponding repository for Ubuntu can be found here: https://cran.r-project.org/bin/linux/ubuntu/ – PaulS Oct 05 '21 at 11:06

1 Answers1

0

I've found the sollution.

First, I reinstalled R (however I think it's optional). Then other error occured, namely something like this. Commenting particular line in sources.list finally allowed to instal R. After this I got the same error as above. I was unable to install particular packages. I decided to take closer look to /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version GLIBCXX_3.4.29 not found. I found the solution here. I typed the commands provided in top voted answers anfter days of struggle it finally worked and all packages have been installed!

Adamm
  • 2,150
  • 22
  • 30