'R markdown-Successful knit to PDF on one PC, but failed knit to PDF on another
Firstly, to give you some background,the conversion to PDF was successful on my PC, and an error occurred when I checked the operation on another person's PC. So there is no flaw in the program, in my opinion. The following is about checking the operation on another PC.
The sample file generated from File→new file→r markdown successfully knits to PDF, so I think the environment is ready. The versions are the latest for both R and Rstudio, and I have tried the methods described in https://yihui.org/tinytex/r/#debugging.
I don't know what else to do. Please help me.
yaml header
---
title: ''
documentclass: bxjsarticle
mainfont: Meiryo UI
output:
pdf_document:
latex_engine: xelatex
number_sections: yes
monofont: Meiryo UI
classoption: xelatex,ja=standard
---
Even when running only the yaml header, the knit to PDF was successful.
Error Code:
> update.packages(ask = FALSE, checkBuilt = TRUE)
Warning: package 'Matrix' in library 'C:/Program Files/R/R-4.1.2/library' will not be updated
There is a binary version available, but the source version is the latter.:
binary source needs_compilation
Matrix 1.3-4 1.4-0 TRUE
Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/digest_0.6.29.zip'
Content type 'application/zip' length 266591 bytes (260 KB)
downloaded 260 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/Matrix_1.3-4.zip'
Content type 'application/zip' length 4653247 bytes (4.4 MB)
downloaded 4.4 MB
package ‘digest’ successfully unpacked and MD5 sums checked
Warning: cannot remove prior installation of package ‘digest’
Warning: restored ‘digest’
package ‘Matrix’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\81907\AppData\Local\Temp\RtmpIXi0jR\downloaded_packages
Warning message:
In file.copy(savedcopy, lib, recursive = TRUE) :
problem copying C:\Users\81907\Documents\R\win-library\4.1\00LOCK\digest\libs\x64\digest.dll to C:\Users\81907\Documents\R\win-library\4.1\digest\libs\x64\digest.dll: Permission denied
> tinytex::tlmgr_update()
tlmgr update --all --self
【After the knit button】
processing file: myfile.Rmd
|....................... | 33%
ordinary text without R code
|............................................... | 67%
label: unnamed-chunk-1 (with options)
List of 10
$ echo : logi FALSE
$ error : logi FALSE
$ fig.height: num 10
$ fig.width : num 8
$ message : logi FALSE
$ warning : logi FALSE
$ comment : chr ""
$ dpi : num 720
$ out.height: chr "150%"
$ out.width : chr "110%"
Add the following package: 'dplyr'
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
|......................................................................| 100%
ordinary text without R code
"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS myfile.knit.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output myfile.tex --lua-filter "C:\Users\81907\Documents\R\win-library\4.1\rmarkdown\rmarkdown\lua\pagebreak.lua" --lua-filter "C:\Users\81907\Documents\R\win-library\4.1\rmarkdown\rmarkdown\lua\latex-div.lua" --self-contained --number-sections --highlight-style tango --pdf-engine xelatex --variable graphics
output file: myfile.knit.md
error: LaTeX failed to compile myfile.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips.
Execution has been stopped.
postscript:
processing file: �����ʃ��|�[�g.Rmd
|....................... | 33%
ordinary text without R code
|............................................... | 67%
label: unnamed-chunk-1 (with options)
List of 10
$ echo : logi FALSE
$ error : logi FALSE
$ fig.height: num 10
$ fig.width : num 8
$ message : logi FALSE
$ warning : logi FALSE
$ comment : chr ""
$ dpi : num 720
$ out.height: chr "150%"
$ out.width : chr "110%"
���̃p�b�P�[�W��t�������܂�: 'dplyr'
�ȉ��̃I�u�W�F�N�g�� 'package:stats' ����}�X�N����Ă��܂�:
filter, lag
�ȉ��̃I�u�W�F�N�g�� 'package:base' ����}�X�N����Ă��܂�:
intersect, setdiff, setequal, union
|......................................................................| 100%
ordinary text without R code
output file: �����ʃ��|�[�g.knit.md
"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS �����ʃ��|�[�g.knit.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output �����ʃ��|�[�g.tex --lua-filter "C:\Users\81907\Documents\R\win-library\4.1\rmarkdown\rmarkdown\lua\pagebreak.lua" --lua-filter "C:\Users\81907\Documents\R\win-library\4.1\rmarkdown\rmarkdown\lua\latex-div.lua" --self-contained --number-sections --highlight-style tango --pdf-engine xelatex --variable graphics
�G���[: LaTeX failed to compile �����ʃ��|�[�g.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips.
���s����~����܂���
R version 4.1.2 (2021-11-01) -- "Bird Hippie"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
Error in normalizePath(path, winslash = winslash, mustWork = mustWork) :
invalid multibyte string at '<ef>ソ<bd><ef>ソス<ef>ソスN<ef>ソス}<ef>ソスl<ef>ソスW<ef>ソス<ef>ソス<ef>ソス<ef>ソス<ef>ソスg\6<ef>ソス[2<ef>ソスg<ef>ソスフ奇ソス<ef>ソス<ef>ソス<ef>ソスハ計<ef>ソスi<ef>ソス^<ef>ソス<ef>ソス<ef>ソスu<ef>ソスw<ef>ソス<ef>ソスj\<ef>ソス<ef>ソス<ef>ソス|<ef>ソス[<ef>ソスg<ef>ソス<ec>成\<ef>ソス<ef>ソスヘ前\<ef>ソス<ef>ソス<ef>ソス<ef>ソス<ef>ソスハ<83><ef>ソス<ef>ソス|<ef>ソス[<ef>ソスg.Rmd'
Error in normalizePath(path.expand(path), winslash, mustWork) : path[1]="C:/Users/81907/Desktop/folder A/myfile.Rmd": 謖・ョ壹&繧後◆繝代せ縺瑚ヲ九▽縺九j縺セ縺帙s縲・> library(digest)
> library(digest)
> library(Matrix)
Error in normalizePath(path, winslash = winslash, mustWork = mustWork) :
invalid multibyte string at '<ef>ソ<bd><ef>ソス<ef>ソスN<ef>ソス}<ef>ソスl<ef>ソスW<ef>ソス<ef>ソス<ef>ソス<ef>ソス<ef>ソスg\6<ef>ソス[2<ef>ソスg<ef>ソスフ奇ソス<ef>ソス<ef>ソス<ef>ソスハ計<ef>ソスi<ef>ソス^<ef>ソス<ef>ソス<ef>ソスu<ef>ソスw<ef>ソス<ef>ソスj\<ef>ソス<ef>ソス<ef>ソス|<ef>ソス[<ef>ソスg<ef>ソス<ec>成\<ef>ソス<ef>ソスヘ前\<ef>ソス<ef>ソス<ef>ソス<ef>ソス<ef>ソスハ<83><ef>ソス<ef>ソス|<ef>ソス[<ef>ソスg.Rmd'
Error in normalizePath(path.expand(path), winslash, mustWork) : path[1]="C:/Users/81907/Desktop/folder A/myfile.Rmd": 謖・ョ壹&繧後◆繝代せ縺瑚ヲ九▽縺九j縺セ縺帙s縲・
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
