问题
I’m using R, RStudio but new to r-markdown and want to produce document in pdf/latex. I was a little rebutted by the installing the complete version of MiKTeX and was relief reading the solution proposed by Yihui Xie with TinyTeX and think this is exactly the solution for (people like) me. Unfortunately, I failed to install the package and don’t understand what am I doing wrong. I carefully read the instructions on TinyTeX vignette for a “R USER” (I tried to install through R Studio). Help will be greatly appreciated. Thank you. More info below
Commands I ran in RStudio:
install.packages(c('tinytex', 'rmarkdown'))
tinytex::install_tinytex().
I see downloading action and some of the package but it is incomplete. I have the following message:
Starting to install TinyTeX to C:\Users\XXX\Documents\R\R\R->UserLibrairies. It will take a few minutes.
PATH=C:\Users\XXX~1\AppData\Local\Temp\RtmpyKB2Ys\install-tl-20180525\tlpkg\tlperl\bin;C:\Rtools\bin;C:\Program Files\R\R-3.4.3\bin\x64;C:\Program Files (x86)\Intel\iCLS Client\;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Intel\iCLS Client\;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Acronis\CommandLineTool\;C:\Program Files (x86)\Common Files\Acronis\FileProtector\;C:\Program Files (x86)\Common Files\Acronis\FileProtector64\;C:\Program Files\Acronis\PyShell\bin\;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;c:\unknownDDEPath;c:\unknownDDEPath\DDE;C:\blp\DAPI;C:\blp\DAPI\DDE.
"C:\Users\XXX~1\AppData\Local\Temp\RtmpyKB2Ys\install-tl-20180525\install-tl" -profile=../texlive.profile
Automated TeX Live installation using profile: ../texlive.profile
Loading http://ctan.math.illinois.edu/systems/texlive/tlnet/tlpkg/texlive.tlpdb
**'wget' is not recognized as an internal or external command,
operable program or batch file.**
**'wget' is not recognized as an internal or external command,operable program or batch file.**
C:\Users\XXX~1\AppData\Local\Temp\RtmpyKB2Ys\install-tl-20180525\install-tl: TLPDB::from_file could not download http://ctan.math.illinois.edu/systems/texlive/tlnet/tlpkg/texlive.tlpdb;
C:\Users\XXX~1\AppData\Local\Temp\RtmpyKB2Ys\install-tl-20180525\install-tl: maybe the repository setting should be changed.
TinyTeX installed to C:\Users\XXX\Documents\R\R\R-UserLibrairies
Restart your R session and check if tinytex:::is_tinytex() is TRUE.
When I restart and test with > tinytex:::is_tinytex() I got
Warning messages:
1: In file.remove("TinyTeX/install-tl.log") :
cannot remove file 'TinyTeX/install-tl.log', reason 'No such file or directory'
2: running command '"bin/win32/tlmgr" install latex-bin xetex amscls amsfonts amsmath bibtex booktabs caption dvipdfmx ec etoolbox fancyvrb fontspec framed geometry graphics graphics-def gsftopk hyperref ifluatex ifxetex lm luaotfload makeindex mathspec metafont mfware natbib oberdiek titling tools upquote url xkeyval zapfding' had status 127.
3: running command '"bin/win32/tlmgr" path add' had status 127
4: running command '"bin/win32/tlmgr" conf auxtrees add "C:/PROGRA~1/R/R-34~1.3/share/texmf"' had status 127
version info
R version 3.4.3 (2017-11-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default locale:
[1] LC_COLLATE=English_United States.1252
LC_CTYPE=English_United States.1252
LC_MONETARY=English_United States.1252
LC_NUMERIC=C
LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.4.3 tools_3.4.3
来源:https://stackoverflow.com/questions/50569020/cannot-install-tinytex-package