Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows7 编译试验 #18

Open
bubifengyun opened this issue Oct 1, 2018 · 20 comments
Open

windows7 编译试验 #18

bubifengyun opened this issue Oct 1, 2018 · 20 comments
Assignees

Comments

@bubifengyun
Copy link
Owner

bubifengyun commented Oct 1, 2018

参考网页:https://mirrors.tuna.tsinghua.edu.cn/CRAN/

安装 R 包

官网跳转到Windows版本下载选择页面,先选择base版本,点击Download R 3.5.1 for Windows超链接下载。接下面双击安装,一路默认确定下来。

@bubifengyun
Copy link
Owner Author

添加到环境变量

为了方便调用R.exeRScript.exe,可以把安装文件目录放置到环境变量PATH中。按下 Windows键,弹出菜单中,在计算机右击,选择属性,在左侧栏,点高级系统设置。点击右下方附件的环境变量按钮。在下框系统变量中,找到Path,双击编辑,在变量值最后添加上面的目录*;C:\Program Files\R\R-3.5.1\bin*。一路确定回来即可。注意,目录前方需要添加分号;,这是Windows下的Path的拼接符号。

@bubifengyun
Copy link
Owner Author

安装 pandoc

下载地址,选择对应版本的 pandoc.msi 的文件。双击一路默认安装。这个自带特效,可以直接在 cmd 里面调用pandoc

@bubifengyun
Copy link
Owner Author

然后创建了 win.bat文件,内容

Rscript _render.R "bookdown::pdf_book" > log.txt 2> err.txt

一直出错,

Warning: 无法在貯藏處https://cran.rstudio.com/src/contrib中读写索引:
  无法打开URL'https://cran.rstudio.com/src/contrib/PACKAGES'
Warning: 无法在貯藏處https://cran.rstudio.com/bin/windows/contrib/3.5中读写索引:
  无法打开URL'https://cran.rstudio.com/bin/windows/contrib/3.5/PACKAGES'
Warning message:
package 'bookdown' is not available (for R version 3.5.1) 
Error in loadNamespace(name) : 不存在叫'bookdown'这个名字的程辑包
Calls: ::: ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
停止执行

经搜索,实验 https://stackoverflow.com/questions/32785284/error-in-loadnamespacename-there-is-no-package-called-evaluate

依旧无法联网下载。

@bubifengyun
Copy link
Owner Author

https://stackoverflow.com/questions/17998543/what-to-do-when-a-package-is-not-available-for-our-r-version

无法安装。这个头疼。是不是 R 版本太新。还是没有安装 RStudio 呢。

@bubifengyun
Copy link
Owner Author

https://blog.csdn.net/u013303361/article/details/85344742 此处说https改为http,不知如何。

@bubifengyun
Copy link
Owner Author

r-lib/remotes#130 (comment) 还要设置 intetnet 的 TLS,总算完成了下载。

@bubifengyun
Copy link
Owner Author

forestgeo/learn#102 这个是指引到上述网页的说明

@bubifengyun
Copy link
Owner Author

bubifengyun commented Mar 14, 2019

报错了,安装失败。

试开URL’https://github.com/yihui/tinytex/raw/master/tools/pkgs-custom.txt'
Content length 142 bytes
=============================================================================================================
downloaded 312 bytes

试开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\Administrator\AppData\Roaming/TinyTeX. It will take a few minutes.
Next you may see two error dialog boxes about the missing luatex.dll, and an error message like "Use of uninitialized value in bitwise or (|)..." in the end. These messages can be ignored.
TLUtils::check_file: removing C:\Users\ADMINI~1\AppData\Local\Temp\i3LXQRHnhg\6aGojx8OOR/tlgs.win32.tar.xz, checksums differ:
TLUtils::check_file:   TL=7207f301b8fea903350eb852bfbd193b21a290123ca6e5431f63c13270efa7dbafa93a677c17541312bf8164d968ba21f8b3e514771749191934917004dbf6e1, arg=4822efea41c5a0a866c2169acfcc3011b98caa46ae76d1a0699c0ce97503b9a274708aee6e7dea5ed7bc9b5ee80715c8ab57419215f9b4eff01aa7d9fc4c832f
TLPDB::_install_package: downloading did not succeed
Installation failed.
Rerunning the installer will try to restart the installation.
Or you can restart by running the installer with:
  install-tl-windows.bat --profile installation.profile [EXTRA-ARGS]
or
  install-tl-advanced.bat --profile installation.profile [EXTRA-ARGS]
系统找不到指定的路径。
系统找不到指定的路径。
系统找不到指定的路径。
TinyTeX installed to C:\Users\Administrator\AppData\Roaming/TinyTeX
Please quit and reopen your R session and IDE (if you are using one, such as RStudio or Emacs) and check if tinytex:::is_tinytex() is TRUE.
Warning messages:
1: Detected an existing tlmgr at C:\Users\ADMINI~1\AppData\Roaming\TinyTeX\bin\win32\tlmgr.bat. It seems TeX Live has been installed (check tinytex::tinytex_root()). You are recommended to uninstall it, although TinyTeX should work well alongside another LaTeX distribution if a LaTeX document is compiled through tinytex::latexmk(). 
2: In file.remove("TinyTeX/install-tl.log") :
  无法删除文件'TinyTeX/install-tl.log',原因是'No such file or directory'


processing file: deepin-bible.Rmd
output file: deepin-bible.knit.md

错误: Failed to compile deepin-bible.tex. See https://yihui.name/tinytex/r/#debugging for debugging tips.
此外: Warning message:
In system2(..., stdout = FALSE, stderr = FALSE) : '"xelatex"' not found
停止执行
错误: Failed to compile the book to bookdown::pdf_book
停止执行

@bubifengyun
Copy link
Owner Author

tlmgr_install()一些包,还是不行。https://yihui.name/tinytex/cn/

@bubifengyun
Copy link
Owner Author

前几天测试依旧失败。这个一步命令安装有问题。

@bubifengyun
Copy link
Owner Author

今天再试试,看如何

@bubifengyun
Copy link
Owner Author

问题依旧,还是

processing file: deepin-bible.Rmd
output file: deepin-bible.knit.md

tlmgr search --file --global "/gb7714-2015.dbx"
tlmgr search --file --global "/biblatex-dm.cfg"
tlmgr search --file --global "/deepin-bible.bbl"
tlmgr search --file --global "/tikzlibrarytopaths.code.tex"
tlmgr search --file --global "/tikzlibraryarrows.code.tex"
Trying to automatically install missing LaTeX packages...
tlmgr install pgf
tlmgr search --file --global "/gb7714-2015.dbx"
tlmgr search --file --global "/biblatex-dm.cfg"
tlmgr search --file --global "/deepin-bible.bbl"
tlmgr search --file --global "/tikzlibrarytopaths.code.tex"
tlmgr search --file --global "/tikzlibraryarrows.code.tex"
错误: Failed to build the bibliography via biber
此外: Warning messages:
1: In readLines(log) : 读'deepin-bible.log'时最后一行未遂
2: In parse_packages(logfile, quiet = c(TRUE, FALSE, FALSE)) :
  Failed to find a package that contains gb7714-2015.dbx
3: In parse_packages(logfile, quiet = c(TRUE, FALSE, FALSE)) :
  Failed to find a package that contains biblatex-dm.cfg
4: In parse_packages(logfile, quiet = c(TRUE, FALSE, FALSE)) :
  Failed to find a package that contains deepin-bible.bbl
5: In readLines(log) : 读'deepin-bible.log'时最后一行未遂
6: In parse_packages(logfile, quiet = c(TRUE, FALSE, FALSE)) :
  Failed to find a package that contains gb7714-2015.dbx
7: In parse_packages(logfile, quiet = c(TRUE, FALSE, FALSE)) :
  Failed to find a package that contains biblatex-dm.cfg
8: In parse_packages(logfile, quiet = c(TRUE, FALSE, FALSE)) :
  Failed to find a package that contains deepin-bible.bbl
停止执行
错误: Failed to compile the book to bookdown::pdf_book
停止执行

@bubifengyun
Copy link
Owner Author

牵扯到太多的包,我都不知道是哪个包的问题了。

@bubifengyun bubifengyun self-assigned this Jun 25, 2019
@bubifengyun
Copy link
Owner Author

https://stackoverflow.com/questions/31038636/package-stringi-does-not-work-after-updating-to-r3-2-1 参考这里,加上 install.packages("stringi",type="win.binary") 解决缺少 stringi 的问题。

@bubifengyun
Copy link
Owner Author

全部换成texlive2019,不再使用tinytex了。

@bubifengyun
Copy link
Owner Author

再次调试,发现不同版本结果不同。而且去掉smart,也就是-t latex-smart,会导致pandoc错误翻译。慢慢解决吧。

@bubifengyun
Copy link
Owner Author

应该重新安装一台电脑,再测试了

@bubifengyun
Copy link
Owner Author

手机坏了,无法登录。

@bubifengyun
Copy link
Owner Author

系统管理基础知识

Linux Deepin 深度操作系统是一个多用户多任务操作系统。人多嘴杂,权限滥用,很容易把操作系统给玩完。作为电脑负责人,管理员用户,要把好这个关,尤其是在处理一些文件系统、软件安装、账户管理、网络接入、服务软件和安全相关等事务时(注:深度的软件安装不需要最高权限)。而系统的最高权限归超级用户(superuser)也就是root用户所有。作为管理员需要及时申请超级(super)权限才能完成某些工作。申请方法如下。

  • su 命令,Switch User 切换用户的简写,默认打开新的shell终端。su命令默认切换到root用户,最后可以使用exit命令退出。有关su的详细介绍,可以百度或man su查看。
  • sudo命令,Super User DO 以超级用户的权限做事,用在其他命令前面,表示这些命令以超级用户的权限执行。

workrave

@lds1986
Copy link

lds1986 commented Nov 13, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants