1

I tried to complile a markdown document into RStudio, but when I knit it I get the following output:

/home/argus/anaconda3/envs/R-lab/bin/pandoc/pandoc: error while loading shared libraries: libgmp.so.3: cannot open shared object file: No such file or directory
Error in system(paste(shQuote(path), "--version"), intern = TRUE) : 
  error in running command
Calls: <Anonymous> ... get_pandoc_version -> with_pandoc_safe_environment -> force -> system
Execution halted

I've read some post and I tried installing sudo apt-get install libgmp-dev and does not work, but I don't know if the error is related with pandoc or with libgmp.

N0rbert
  • 103,263

1 Answers1

0

You can get libgmp.so.3 library from previous Ubuntu version by using commands below:

cd ~/Downloads
wget -c http://old-releases.ubuntu.com/ubuntu/pool/universe/g/gmp4/libgmp3c2_4.3.2+dfsg-2ubuntu1_amd64.deb
sudo apt install ./libgmp3c2_4.3.2+dfsg-2ubuntu1_amd64.deb

As you already see, using R and RStudio from Anaconda creates a mess instead of useful configuration.

More reproducible way is to remove Anaconda fully (or at least from $PATH) and then install complete R with RStudio using deb-packages as simple as:

sudo apt-get update
sudo apt-get install r-base-dev

cd ~/Downloads wget -c https://download1.rstudio.org/desktop/bionic/amd64/rstudio-1.4.1717-amd64.deb sudo apt-get install ./rstudio-1.4.1717-amd64.deb

and then retry.

N0rbert
  • 103,263