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
  • 99,918
  • Why do you think you need Anaconda on top of mature APT deb-packaging system? Normal RStudio is packaged, R can install packages to ~/R in your home folder. Which winning point do you get by using Anaconda? See this answer for possible solution. – N0rbert Aug 20 '21 at 07:18
  • I use Spyder to Python programming, Then I saw that Anaconda also has RStudio. RStudio runing into Anaconda is the main problem here? – Chacho Fuva Aug 21 '21 at 14:10

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
  • 99,918
  • Thanks for your answer, but it does not work, the output was couldn't be accessed by user '_apt'. - pkAcquire::Run (13: Permission denied) – Chacho Fuva Aug 21 '21 at 16:40
  • It is just a warning. Retry package installation and then check existence of original problem. – N0rbert Aug 21 '21 at 19:51