1

Updated Ubuntu and I reinstall R and now if I tried to run R on my terminal I am getting below error, I am getting what will be the issue

/usr/local/lib/R/bin/exec/R: error while loading shared libraries: libreadline.so.7: cannot open shared object file: No such file or directory

I tried some threads still not able to resolve

libreadline.so.6 issue in ubuntu 18.04

$ which R
/usr/local/bin/R

$ R --version
/usr/local/lib/R/bin/exec/R: error while loading shared libraries: libreadline.so.7: cannot open shared object file: No such file or directory

$ dpkg -l "libreadline*"
dpkg-query: no packages found matching .
dpkg-query: no packages found matching –
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                  Version      Architecture Description
+++-=====================-============-============-======================================================
un  libreadline-common    <none>       <none>       (no description available)
ii  libreadline-dev:amd64 8.0-4        amd64        GNU readline and history libraries, development files
un  libreadline-gplv2-dev <none>       <none>       (no description available)
un  libreadline4          <none>       <none>       (no description available)
un  libreadline5          <none>       <none>       (no description available)
un  libreadline5-dev      <none>       <none>       (no description available)
un  libreadline6-dev      <none>       <none>       (no description available)
ii  libreadline8:amd64    8.0-4        amd64        GNU readline and history libraries, run-time libraries
N0rbert
  • 97,162
  • 34
  • 239
  • 423
hemant c naik
  • 13
  • 1
  • 4
  • For me it seems that you chose wrong method of R installation. Please show the outputs of the following commands: `which R`, `R --version`, `dpkg -l "r-*"` , `dpkg -l "libreadline*"` . – N0rbert Mar 03 '21 at 15:35
  • @N0rbert Thank you for the reply – hemant c naik Mar 03 '21 at 15:55

1 Answers1

0

To get more reproducible results I would recommend to remove locally installed R with

sudo rm /usr/local/bin/R

and then install version from the official repositories by

sudo apt-add-repository universe
sudo apt-get update
sudo apt-get install r-base-dev

then test the installation by running R --version.

N0rbert
  • 97,162
  • 34
  • 239
  • 423