Bookdown with pandoc-citeproc - r

I have the latest version of bookdown package and Rstudio, and I'm on Arch Linux.
I updated pandoc-citeproc to its latest version and after that I started to receive the following error message:
pandoc: Error running filter /usr/lib/rstudio/bin/pandoc/pandoc-citeproc
fd:5: hClose: resource vanished (Broken pipe)
Error: pandoc document conversion failed with error 83
Execution halted
Exited with status 1.
Regardless of the output type and even without references in the document, I get this error and the Rstudio preview is not generated. To view the generated document I have to open the index file in the browser and go giving F5 as I'm updating the document.
If I insert references the document is neither generated.
I searched in the AUR repository for other packages, uninstalled and re-installed pandoc-citeproc, but nothing solved.
How can I fix this?

I run Arch as well, and I also encountered this issue after upgrading to pandoc-citeproc-0.10.4.1-39.
Temporarily solved by downgrading to pandoc-citeproc-0.10.4.1-37. Super easy to do, provided you still have the package cached on your system:
cd /var/cache/pacman/pkg
sudo pacman -U pandoc-citeproc-0.10.4.1-37-x86_64.pkg.tar.xz

Related

Cannot knit Rmd file since I changed the name of User directory

I am using R for windows on RStudio.
I recently changed the name of User directory for a reason, and it seems that the change is causing a problem in knitting Rmd file.
If I try to knit Rmd file, the following error massage appears:
Error: invalid
version specification 'find'
In addition: Warning message:
In system(paste(shQuote(path), "--version"), intern = TRUE) :
running command '"C:/PROGRA~3/CHOCOL~1/bin/pandoc.exe" --version' had status 65535
Execution halted
I entered '"C:/PROGRA~3/CHOCOL~1/bin/pandoc.exe" --version' in cmd, it says
Cannot find file at 'c:\users\MY OLD USER NAME\appdata\local\pandoc\pandoc.exe'
So, I guess that knitr or pandoc is trying to find the wrong path.
How can I fix the problem? How can I change the path?
Here is the list of what I have tried:
Uninstalled R and RStudio, and then installed them.
Then, I installed all the packages needed by install.packeges.
Thus, I am using the latest version of R, RStudio, and packages.
Searched 'pandoc' in registry editor, and tried to find the old path (but I couldn't)
It seems you installed Pandoc by yourself through Chocolatey, and the installation was broken after you changed the name of your User directory.
First, you do not have to install Pandoc separately if you are using RStudio, because RStudio has bundled Pandoc with it.
If you have to install Pandoc for some reason, you may need to reinstall it (perhaps you have to reinstall Chocolatey, too).
choco uninstall pandoc
choco install pandoc

Error in git checks when running devtools::release() in preparation for releasing package in R

I am trying to release a package to CRAN using devtools::release(). Whenever I get to the step for Running Git checks... I get an error.
── Running Git checks for fitzRoy ───────────────────────────────────────────────────────────────────────
Current branch: master
Checking uncommitted files... OK
Checking synchronisation with remote branch...
ERROR: Error in 'git2r_remote_fetch': unsupported URL protocol
I'm on a Mac. I've been using Git fine for the package and have no dramas committing, pushing and pulling.
I've tried updating devtools, git2r and also installing the latest version of Git but haven't had any luck.
Any suggestions?
Update - found an answer here.
Basically - you need to install libssh2. On a Mac I followed the instructions here.
I then had to re-install git2r package for R by running the following
install.packages("git2r", type = "source")
After doing that and restarting R, the error went away.

ERROR conda.core.link:_execute(700): An error occurred while installing package 'conda-forge::jupyter_nbextensions_configurator-0.4.1-py37_0'

I'm trying to install jupyter_nbextensions_configurator on windows10 for python3.7 using conda.
An error occurred while installing the package.
I have already tried to reinstall anaconda,but the problem still occurs.
ERROR conda.core.link:_execute(700): An error occurred while installing package 'conda-forge::jupyter_nbextensions_configurator-0.4.1-py37_0'.
Rolling back transaction: done
LinkError: post-link script failed for package conda-forge::jupyter_nbextensions_configurator-0.4.1-py37_0
location of failed script: C:\Users\Cesare\Anaconda3\Scripts\.jupyter_nbextensions_configurator-post-link.bat
I want to know how to install it successfully.
I too was facing the same problem. Here's the output when I tried cloning the base environment [Running as Administrator]:
(base) PS C:\WINDOWS\system32> conda create --name django --clone base
WARNING: A conda environment already exists at 'C:\Users\Tanishk\anaconda3\envs\django'
Remove existing environment (y/[n])? y
Source: C:\Users\Tanishk\anaconda3
Destination: C:\Users\Tanishk\anaconda3\envs\django
The following packages cannot be cloned out of the root environment:
- conda-forge/win-64::conda-4.9.2-py38haa244fe_0
- defaults/win-64::conda-build-3.20.5-py38_1
- defaults/win-64::conda-env-2.6.0-1
Packages: 305
Files: 2077
Preparing transaction: done
Executing transaction: done
ERROR conda.core.link:_execute(698): An error occurred while installing package 'defaults::openssl-1.1.1h-he774522_0'.
Rolling back transaction: done
CondaError: Cannot link a source that does not exist. C:\Users\Tanishk\anaconda3\pkgs\openssl-1.1.1h-he774522_0\Library\bin\openssl.exe
Running `conda clean --packages` may resolve your problem.
()
You will notice the package giving me problem is different than yours, but the ERROR remains the same (ERROR conda.core.link).
Here's how I solved it:
Google the package mentioned in the ERROR. In my case it was openssl-1.1.1h-he774522_0
Open the result from Anaconda Files (should likely be the first search result):
anaconda / packages / openssl 1 - Files :: Anaconda Cloud
Ctrl+F to find the package in the list.
Download the compressed package to your local Downloads folder.
Backup the contents of the installed erroneous package *C:\Users\Tanishk\anaconda3\pkgs\openssl-1.1.1h-he774522_0* somewhere.
Copy the contents of the de-compressed downloaded package into the *C:\Users\Tanishk\anaconda3\pkgs\openssl-1.1.1h-he774522_0* folder.
Re-try in Anaconda prompt with whatever you got stuck at.
Note:
After step 7, I got another same error but for a different package this time (vs2015_runtime-14.16.27012-hf0eaf9b_3). I performed the same steps for this package too --> Google -- Download -- Replace old content. And I was able to run things successfully after that.
I suggest to google the package because if you search for the package name on Anaconda itself, it will ask you to login first.

Rstudio-server won't start after updating to R 3.5.0: Error occured during transmission

I have recently moved from MRO 3.4.3 to R 3.5.0. I can start and use the new installation of R perfectly from the terminal, but when I stat Rstudio-server, an error panel appears with the message: "Error occured during transmission"
The log at /var/log/messages shows this:
Jun 6 11:28:51 slave1 rsession-victor[116037]: ERROR R SUICIDE: unable to initialize the JIT|||; LOGGED FROM: void<unnamed>::rSuicide(const std::string&) /root/rstudio/src/cpp/session/SessionMain.cpp:1023
I have tried to remove the files /etc/rstudio/rserver.conf and /etc/rstudio/rsession.conf that I had changed to use the previous MRO installation, but it didn't work. Also, I have tried to to remove completely the .rstudio folder in my home directory.
Any ideas about how to solve this?
Thanks!
I had the same problem after installing R 3.5.1 from sources.
The reason for the error is that libR.so is not build using the
simple installation procedure described in file INSTALL. RStudio
searches for this and finds an incompatible (old) one. Use this instead:
./configure --enable-R-shlib
make

R cmd check Latex error: FATAL pdflatex - GUI framework cannot be initialized

I am checking my package and this is actually the last remaining problem. The pdf file cannot be compiled and the logfile tells me
2015-10-15 14:17:47,430+0200 INFO pdflatex - running 'initexmf --quiet --update-fndb' to refresh the file name database
2015-10-15 14:17:50,276+0200 FATAL pdflatex - GUI framework cannot be initialized.
2015-10-15 14:17:50,276+0200 FATAL pdflatex - Info:
2015-10-15 14:17:50,276+0200 FATAL pdflatex - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2015-10-15 14:17:50,276+0200 FATAL pdflatex - Line: 50
Any idea where the problem could be?
This is known problem wit MikTex 2.9 when pdflatex encounters error
GUI framework cannot be initialized.
(found on my Windows 7 system in the file ~\AppData\Local\MiKTeX\2.9\miktex\log)
So far, I can offer following sequence of actions to remedy this:
In Windows Command prompt go to MiKTeX bin folder (e.g. C:\Program Files (x86)\MiKTeX 2.9\miktex\bin) and run utility mo.exe;
In General tab change 'Install missing packages on-the-fly:' option to No (this will disable GUI and error above won't be happening again);
Run R CMD that calls latex converter again (in my case
R CMD Rd2pdf man/
again to see new errors;
This time miktex won't complaint about GUI - instead it will be missing packages with error like this
! LaTeX Error: File `inconsolata.sty' not found.
Start MiKTeX package manager (again from mo.exe Packages tab) and install missing package one at the time by repeating steps 3.-5.
This might be not most effective way of fixing this so I appreciate corrections or alternative solutions.
I had this same issue, but for the newest versions of Miktex, mo.exe does not exist, and is replaced by the Miktex console. If you open it, go into settings and change the package on-the-fly setting from "Ask Me" to "Always", then the packages will install. If you do "Never" instead, then you'll have to do the individual package installation described by #topchef.
I ran into this problem just... A very easy solution for me that allowed me not to renege on the install on the fly option is to install TexStudio, open your .tex file in there, and compile it: you will be able to install all your MikTex packages on the fly as desired and retain control over what gets installed.
I had the same problem compiling Knit to PDF of a R markdown file in R studio. Once I changed from "Ask me" to "Always" in the MikTex console setting (see the screenshot posted above [Cara Wogsland]) it compiled without errors.

Resources