搬了新家,有了新电脑,发现装不上 TinyTeX ? 求助。
故障简述(完整详细信息附后)
tinytex::install_tinytex()
,主要的故障信息是:
'query_ctan_mirror: Programs not set up, trying wget
cannot contact mirror.ctan.org, returning a backbone server!
- 怀疑是网络问题,于是安装 prebuilt 版,
tinytex:::install_prebuilt()
,成功。
- 但是,在用bookdown 编译一份中文文档时,需要用到 ctexbook.cls,貌似
tlmgr search
查找这个文件时失败。很多 .exe 文件无法正常工作。编译失败。
! LaTeX Error: File `ctexbook.cls' not found.
- 无奈下,去 texlive 官网 下载 texlive 的安装包,但是安装居然失败:运行 'install-tl-windows.bat',死在了 perl.exe这一步:'perl.exe has stopped working'。安装失败。
- 于是重新操起旧工具:下载安装 CTeX。倒是安装成功了,但是编译中文文档仍然出错。我想起旧电脑是对所有宏包升了级的,于是去 MiKTeX 的升级管理器里升级,但是怪事发生了:每升级几个包,就会中断退出,错误信息是 'unsupported protocal'。
- 最后,我去 MiKTeX 官网下载了最新的 MiKTeX 并安装,然后安装了 xetex 相关的几个包,才算是解决了问题。
综上,TinyTeX、TeXLive、CTeX 三者的安装目前我都遇见了故障。注意力有点分散。虽然最后能用了,但是还是希望集中解决 TinyTeX 自身的安装问题,以及 TinyTeX 对缺失宏包的安装问题。哪位能帮忙看看?多谢啦!
完整详细信息
> devtools::session_info()
Session info --------------------------------------------------------------------------------------------------------
setting value
version R version 3.5.1 (2018-07-02)
system x86_64, mingw32
ui RStudio (1.1.456)
language (EN)
collate Chinese (Simplified)_People's Republic of China.936
tz Europe/Berlin
date 2018-09-10
Packages ------------------------------------------------------------------------------------------------------------
package * version date source
backports 1.1.2 2017-12-13 CRAN (R 3.5.0)
base * 3.5.1 2018-07-02 local
compiler 3.5.1 2018-07-02 local
datasets * 3.5.1 2018-07-02 local
devtools 1.13.6 2018-06-27 CRAN (R 3.5.1)
digest 0.6.16 2018-08-22 CRAN (R 3.5.1)
evaluate 0.11 2018-07-17 CRAN (R 3.5.1)
graphics * 3.5.1 2018-07-02 local
grDevices * 3.5.1 2018-07-02 local
htmltools 0.3.6 2017-04-28 CRAN (R 3.5.1)
knitr 1.20 2018-02-20 CRAN (R 3.5.1)
magrittr 1.5 2014-11-22 CRAN (R 3.5.1)
memoise 1.1.0 2017-04-21 CRAN (R 3.5.1)
methods * 3.5.1 2018-07-02 local
Rcpp 0.12.18 2018-07-23 CRAN (R 3.5.1)
rmarkdown 1.10 2018-06-11 CRAN (R 3.5.1)
rprojroot 1.3-2 2018-01-03 CRAN (R 3.5.1)
stats * 3.5.1 2018-07-02 local
stringi 1.1.7 2018-03-12 CRAN (R 3.5.0)
stringr 1.3.1 2018-05-10 CRAN (R 3.5.1)
tinytex 0.8.1 2018-09-09 Github (yihui/tinytex@e5c65c5)
tools 3.5.1 2018-07-02 local
utils * 3.5.1 2018-07-02 local
withr 2.1.2 2018-03-15 CRAN (R 3.5.1)
xfun 0.3 2018-07-06 CRAN (R 3.5.1)
yaml 2.2.0 2018-07-25 CRAN (R 3.5.1)
> tinytex::install_tinytex()
trying URL 'http://mirror.ctan.org/systems/texlive/tlnet/install-tl.zip'
Content length 355 bytes
trying URL 'https://github.com/yihui/tinytex/raw/master/tools/pkgs-custom.txt'
Content length 142 bytes
downloaded 275 bytes
trying URL 'https://github.com/yihui/tinytex/raw/master/tools/texlive.profile'
Content length 142 bytes
downloaded 295 bytes
Starting to install TinyTeX to C:\Users\PengZhao\AppData\Roaming/TinyTeX. It will take a few minutes.
PATH=C:\Users\PengZhao\AppData\Local\Temp\RtmpeYk32F\install-tl-20180909\tlpkg\tlperl\bin;d:\Program Files\R\bin\x64;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\System32\WindowsPowerShell\v1.0\;c:\Users\PengZhao\AppData\Local\GitHubDesktop\app-1.3.4\resources\app\git\cmd\;D:\Program Files\python364\Scripts\;D:\Program Files\python364\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Users\PengZhao\AppData\Local\GitHubDesktop\bin;D:\Program Files\CTEX\UserData\miktex/bin\;C:\Users\PengZhao\AppData\Roaming\TinyTeX\bin\win32;d:\Program Files\wget;C:\Windows\System32\WindowsPowerShell\v1.0\
"C:\Users\PengZhao\AppData\Local\Temp\RtmpeYk32F\install-tl-20180909\install-tl" -profile=../texlive.profile
Use of uninitialized value $ver in scalar chomp at C:/Users/PengZhao/AppData/Local/Temp/RtmpeYk32F/install-tl-20180909/tlpkg/TeXLive/TLWinGoo.pm line 204.
Use of uninitialized value $ver in substitution (s///) at C:/Users/PengZhao/AppData/Local/Temp/RtmpeYk32F/install-tl-20180909/tlpkg/TeXLive/TLWinGoo.pm line 205.
Use of uninitialized value $ver in substitution (s///) at C:/Users/PengZhao/AppData/Local/Temp/RtmpeYk32F/install-tl-20180909/tlpkg/TeXLive/TLWinGoo.pm line 205.
Automated TeX Live installation using profile: ../texlive.profile
Can't spawn "cmd.exe": No such file or directory at C:/Users/PengZhao/AppData/Local/Temp/RtmpeYk32F/install-tl-20180909/tlpkg/TeXLive/TLUtils.pm line 2481.
Setting up tar with C:/Users/PengZhao/AppData/Local/Temp/RtmpeYk32F/install-tl-20180909/tlpkg/installer/tar.exe as C:\Users\PengZhao\AppData\Local\Temp\RtmpeYk32F\install-tl-20180909\tlpkg\installer\tar.exe didn't work
GNU tar 1.11.8 + 2.2(WIN32)
Can't spawn "cmd.exe": No such file or directory at C:/Users/PengZhao/AppData/Local/Temp/RtmpeYk32F/install-tl-20180909/tlpkg/TeXLive/TLUtils.pm line 2464.
Can't spawn "cmd.exe": No such file or directory at C:/Users/PengZhao/AppData/Local/Temp/RtmpeYk32F/install-tl-20180909/tlpkg/TeXLive/TLUtils.pm line 2464.
Can't spawn "cmd.exe": No such file or directory at C:/Users/PengZhao/AppData/Local/Temp/RtmpeYk32F/install-tl-20180909/tlpkg/TeXLive/TLUtils.pm line 2464.
Can't spawn "cmd.exe": No such file or directory at C:/Users/PengZhao/AppData/Local/Temp/RtmpeYk32F/install-tl-20180909/tlpkg/TeXLive/TLUtils.pm line 2481.
Setting up wget with C:/Users/PengZhao/AppData/Local/Temp/RtmpeYk32F/install-tl-20180909/tlpkg/installer/wget/wget.exe as C:\Users\PengZhao\AppData\Local\Temp\RtmpeYk32F\install-tl-20180909\tlpkg\installer\wget\wget.exe didn't work
GNU Wget 1.19.1 built on mingw32.
-cares +digest -gpgme +https +ipv6 -iri +large-file -metalink -nls
-ntlm +opie -psl +ssl/gnutls
Wgetrc:
C:/usr/anothermsys/local/etc/wgetrc (system)
Compile:
gcc -DHAVE_CONFIG_H -DSYSTEM_WGETRC="/usr/local/etc/wgetrc"
-DLOCALEDIR="/usr/local/share/locale" -I. -I../lib -I../lib
-I/usr/local/include -DNDEBUG -static
Link:
gcc -DNDEBUG -static /usr/local/lib/libgnutls.a -lz -lws2_32
/usr/local/lib/libnettle.a /usr/local/lib/libhogweed.a
/usr/local/lib/libgmp.a -lcrypt32 -lz -lws2_32 ftp-opie.o
mswindows.o gnutls.o ../lib/libgnu.a -lws2_32 -lws2_32 -lws2_32
-lws2_32 /usr/local/lib/libiconv.a -lws2_32
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://www.gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Originally written by Hrvoje Niksic <hniksic@xemacs.org>.
Please send bug reports and questions to <bug-wget@gnu.org>.
Can't spawn "cmd.exe": No such file or directory at C:/Users/PengZhao/AppData/Local/Temp/RtmpeYk32F/install-tl-20180909/tlpkg/TeXLive/TLUtils.pm line 2464.
Can't spawn "cmd.exe": No such file or directory at C:/Users/PengZhao/AppData/Local/Temp/RtmpeYk32F/install-tl-20180909/tlpkg/TeXLive/TLUtils.pm line 2464.
Can't spawn "cmd.exe": No such file or directory at C:/Users/PengZhao/AppData/Local/Temp/RtmpeYk32F/install-tl-20180909/tlpkg/TeXLive/TLUtils.pm line 2464.
Can't spawn "cmd.exe": No such file or directory at C:/Users/PengZhao/AppData/Local/Temp/RtmpeYk32F/install-tl-20180909/tlpkg/TeXLive/TLUtils.pm line 2481.
Setting up xz with C:/Users/PengZhao/AppData/Local/Temp/RtmpeYk32F/install-tl-20180909/tlpkg/installer/xz/xz.exe as C:\Users\PengZhao\AppData\Local\Temp\RtmpeYk32F\install-tl-20180909\tlpkg\installer\xz\xz.exe didn't work
xz (XZ Utils) 5.2.3
liblzma 5.2.3
query_ctan_mirror: Programs not set up, trying wget
cannot contact mirror.ctan.org, returning a backbone server!
C:\Users\PengZhao\AppData\Local\Temp\RtmpeYk32F\install-tl-20180909\install-tl: TLPDB::from_file could not download http://www.tex.ac.uk/tex-archive/systems/texlive/tlnet/tlpkg/texlive.tlpdb;
C:\Users\PengZhao\AppData\Local\Temp\RtmpeYk32F\install-tl-20180909\install-tl: maybe the repository setting should be changed.
Loading http://www.tex.ac.uk/tex-archive/systems/texlive/tlnet/tlpkg/texlive.tlpdb
TinyTeX installed to C:\Users\PengZhao\AppData\Roaming/TinyTeX
Please restart your R session and IDE (if you are using one, such as RStudio or Emacs) and check if tinytex:::is_tinytex() is TRUE.
Warning message:
In file.remove("TinyTeX/install-tl.log") :
cannot remove file 'TinyTeX/install-tl.log', reason 'No such file or directory'
> tinytex:::install_prebuilt()
trying URL 'https://ci.appveyor.com/api/projects/yihui/tinytex/artifacts/TinyTeX.zip'
length 93989978 bytes (89.6 MB)
downloaded 89.6 MB
tlmgr path add
Use of uninitialized value $ver in scalar chomp at C:/Users/PengZhao/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLWinGoo.pm line 204.
Use of uninitialized value $ver in substitution (s///) at C:/Users/PengZhao/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLWinGoo.pm line 205.
Use of uninitialized value $ver in substitution (s///) at C:/Users/PengZhao/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLWinGoo.pm line 205.
Can't spawn "cmd.exe": No such file or directory at C:/Users/PengZhao/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2481.
Setting up tar with C:/Users/PengZhao/AppData/Roaming/TinyTeX/tlpkg/installer/tar.exe as C:\Users\PengZhao\AppData\Roaming\TinyTeX\tlpkg\installer\tar.exe didn't work
GNU tar 1.11.8 + 2.2(WIN32)
Can't spawn "cmd.exe": No such file or directory at C:/Users/PengZhao/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2464.
Can't spawn "cmd.exe": No such file or directory at C:/Users/PengZhao/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2464.
Can't spawn "cmd.exe": No such file or directory at C:/Users/PengZhao/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2464.
Can't spawn "cmd.exe": No such file or directory at C:/Users/PengZhao/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2481.
Setting up wget with C:/Users/PengZhao/AppData/Roaming/TinyTeX/tlpkg/installer/wget/wget.exe as C:\Users\PengZhao\AppData\Roaming\TinyTeX\tlpkg\installer\wget\wget.exe didn't work
GNU Wget 1.19.1 built on mingw32.
-cares +digest -gpgme +https +ipv6 -iri +large-file -metalink -nls
-ntlm +opie -psl +ssl/gnutls
Wgetrc:
C:/usr/anothermsys/local/etc/wgetrc (system)
Compile:
gcc -DHAVE_CONFIG_H -DSYSTEM_WGETRC="/usr/local/etc/wgetrc"
-DLOCALEDIR="/usr/local/share/locale" -I. -I../lib -I../lib
-I/usr/local/include -DNDEBUG -static
Link:
gcc -DNDEBUG -static /usr/local/lib/libgnutls.a -lz -lws2_32
/usr/local/lib/libnettle.a /usr/local/lib/libhogweed.a
/usr/local/lib/libgmp.a -lcrypt32 -lz -lws2_32 ftp-opie.o
mswindows.o gnutls.o ../lib/libgnu.a -lws2_32 -lws2_32 -lws2_32
-lws2_32 /usr/local/lib/libiconv.a -lws2_32
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://www.gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Originally written by Hrvoje Niksic <hniksic@xemacs.org>.
Please send bug reports and questions to <bug-wget@gnu.org>.
Can't spawn "cmd.exe": No such file or directory at C:/Users/PengZhao/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2464.
Can't spawn "cmd.exe": No such file or directory at C:/Users/PengZhao/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2481.
Setting up lz4 with C:/Users/PengZhao/AppData/Roaming/TinyTeX/tlpkg/installer/lz4/lz4.exe as C:\Users\PengZhao\AppData\Roaming\TinyTeX\tlpkg\installer\lz4\lz4.exe didn't work
*** LZ4 command line interface 32-bits v1.8.2, by Yann Collet ***
Can't spawn "cmd.exe": No such file or directory at C:/Users/PengZhao/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2464.
Can't spawn "cmd.exe": No such file or directory at C:/Users/PengZhao/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2464.
Can't spawn "cmd.exe": No such file or directory at C:/Users/PengZhao/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2481.
Setting up xz with C:/Users/PengZhao/AppData/Roaming/TinyTeX/tlpkg/installer/xz/xz.exe as C:\Users\PengZhao\AppData\Roaming\TinyTeX\tlpkg\installer\xz\xz.exe didn't work
xz (XZ Utils) 5.2.3
liblzma 5.2.3
Use of uninitialized value in bitwise or (|) at C:\Users\PengZhao\AppData\Roaming\TinyTeX\texmf-dist\scripts\texlive\tlmgr.pl line 1482.
texhash: Updating C:/Users/PengZhao/AppData/Roaming/TinyTeX/texmf-local/ls-R...
texhash: Updated C:/Users/PengZhao/AppData/Roaming/TinyTeX/texmf-local/ls-R.
texhash: Updating C:/Users/PengZhao/AppData/Roaming/TinyTeX/texmf-config/ls-R...
texhash: Updated C:/Users/PengZhao/AppData/Roaming/TinyTeX/texmf-config/ls-R.
texhash: Updating C:/Users/PengZhao/AppData/Roaming/TinyTeX/texmf-var/ls-R...
texhash: Updated C:/Users/PengZhao/AppData/Roaming/TinyTeX/texmf-var/ls-R.
texhash: Updating C:/Users/PengZhao/AppData/Roaming/TinyTeX/texmf-dist/ls-R...
texhash: Updated C:/Users/PengZhao/AppData/Roaming/TinyTeX/texmf-dist/ls-R.
texhash: Done.
...PengZhao\AppData\Roaming\TinyTeX\bin\win32\runscript.tlu:824: ...PengZhao\AppData\Roaming\TinyTeX\bin\win32\runscript.tlu:779: no appropriate script or program found: fmtuti~1
...PengZhao\AppData\Roaming\TinyTeX\bin\win32\runscript.tlu:824: ...PengZhao\AppData\Roaming\TinyTeX\bin\win32\runscript.tlu:779: no appropriate script or program found: updmap~1
Note that it needs some time to create caches,
especially if there are many large font files.
Wait with patience.
C:/windows/fonts: caching, new cache contents: 1063 fonts, 0 dirs
C:/Users/appveyor/AppData/Roaming/TinyTeX/texmf-dist/fonts/opentype: skipping, no such directory
C:/Users/appveyor/AppData/Roaming/TinyTeX/texmf-dist/fonts/truetype: skipping, no such directory
C:/Users/PengZhao/AppData/Roaming/TinyTeX/texmf-var/fonts/cache: cleaning cache directory
C:\Users\PengZhao\AppData\Roaming\TinyTeX\bin\win32\fc-cache.exe: succeeded
> tinytex::tlmgr_search('ctexbook.cls')
tlmgr search --file --global "ctexbook.cls"
Use of uninitialized value $ver in scalar chomp at C:/Users/PengZhao/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLWinGoo.pm line 204.
Use of uninitialized value $ver in substitution (s///) at C:/Users/PengZhao/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLWinGoo.pm line 205.
Use of uninitialized value $ver in substitution (s///) at C:/Users/PengZhao/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLWinGoo.pm line 205.
Can't spawn "cmd.exe": No such file or directory at C:/Users/PengZhao/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2481.
Setting up tar with C:/Users/PengZhao/AppData/Roaming/TinyTeX/tlpkg/installer/tar.exe as C:\Users\PengZhao\AppData\Roaming\TinyTeX\tlpkg\installer\tar.exe didn't work
GNU tar 1.11.8 + 2.2(WIN32)
Can't spawn "cmd.exe": No such file or directory at C:/Users/PengZhao/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2464.
Can't spawn "cmd.exe": No such file or directory at C:/Users/PengZhao/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2464.
Can't spawn "cmd.exe": No such file or directory at C:/Users/PengZhao/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2464.
Can't spawn "cmd.exe": No such file or directory at C:/Users/PengZhao/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2481.
Setting up wget with C:/Users/PengZhao/AppData/Roaming/TinyTeX/tlpkg/installer/wget/wget.exe as C:\Users\PengZhao\AppData\Roaming\TinyTeX\tlpkg\installer\wget\wget.exe didn't work
GNU Wget 1.19.1 built on mingw32.
-cares +digest -gpgme +https +ipv6 -iri +large-file -metalink -nls
-ntlm +opie -psl +ssl/gnutls
Wgetrc:
C:/usr/anothermsys/local/etc/wgetrc (system)
Compile:
gcc -DHAVE_CONFIG_H -DSYSTEM_WGETRC="/usr/local/etc/wgetrc"
-DLOCALEDIR="/usr/local/share/locale" -I. -I../lib -I../lib
-I/usr/local/include -DNDEBUG -static
Link:
gcc -DNDEBUG -static /usr/local/lib/libgnutls.a -lz -lws2_32
/usr/local/lib/libnettle.a /usr/local/lib/libhogweed.a
/usr/local/lib/libgmp.a -lcrypt32 -lz -lws2_32 ftp-opie.o
mswindows.o gnutls.o ../lib/libgnu.a -lws2_32 -lws2_32 -lws2_32
-lws2_32 /usr/local/lib/libiconv.a -lws2_32
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://www.gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Originally written by Hrvoje Niksic <hniksic@xemacs.org>.
Please send bug reports and questions to <bug-wget@gnu.org>.
Can't spawn "cmd.exe": No such file or directory at C:/Users/PengZhao/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2464.
Can't spawn "cmd.exe": No such file or directory at C:/Users/PengZhao/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2481.
Setting up lz4 with C:/Users/PengZhao/AppData/Roaming/TinyTeX/tlpkg/installer/lz4/lz4.exe as C:\Users\PengZhao\AppData\Roaming\TinyTeX\tlpkg\installer\lz4\lz4.exe didn't work
*** LZ4 command line interface 32-bits v1.8.2, by Yann Collet ***
Can't spawn "cmd.exe": No such file or directory at C:/Users/PengZhao/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2464.
Can't spawn "cmd.exe": No such file or directory at C:/Users/PengZhao/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2464.
Can't spawn "cmd.exe": No such file or directory at C:/Users/PengZhao/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2481.
Setting up xz with C:/Users/PengZhao/AppData/Roaming/TinyTeX/tlpkg/installer/xz/xz.exe as C:\Users\PengZhao\AppData\Roaming\TinyTeX\tlpkg\installer\xz\xz.exe didn't work
xz (XZ Utils) 5.2.3
liblzma 5.2.3
tlmgr.pl: package repository http://mirror.las.iastate.edu/tex-archive/systems/texlive/tlnet (not verified: gpg unavailable)
ctex:
texmf-dist/tex/latex/ctex/ctexbook.cls