This is similar to this issue, but the solutions mentioned didn't work for me. I tried to install TinyTeX via different methods:
tinytex::install_tinytex()
download TinyTeX-0.zip, and use tinytex:::install_prebuilt() on it
manually extract TinyTeX-0.zip (unzip() works) and run install-tl-windows (Batch file)
In the first two cases, I have this error:
Error in system2("tlmgr", args, ...) : '"tlmgr"' not found
In addition: Warning message:
In extract(pkg, exdir = path.expand(target)) :
error 1 in extracting from zip file
In the third case, the Windows console looks like this:
'\\crc\users\etienne\Desktop\TinyTeX-0\TinyTeX'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
and then closes without doing anything.
In every case, tinytex::is_tinytex() returns FALSE and tinytex::tlmgr_path() returns nothing.
I am working on Windows Server 2019 Standard (1809). What should I do?
> sessionInfo()
R version 4.1.0 (2021-05-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows Server x64 (build 17763)
Matrix products: default
locale:
[1] LC_COLLATE=French_France.1252 LC_CTYPE=French_France.1252
[3] LC_MONETARY=French_France.1252 LC_NUMERIC=C
[5] LC_TIME=French_France.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.1.0 tools_4.1.0 tinytex_0.33.1 xfun_0.25
Solved in this GitHub issue
In summary:
run tinytex::install_tinytex(dir = "<path>") where <path> is a local folder on the server, e.g in my case "C:/Users/etienne/TinyTeX"
put options(tinytex.tlmgr.path = tinytex:::find_tlmgr("<path>")) in your .Rprofile (you can easily do that with usethis::edit_r_profile("user"))
restart R
check that tinytex::is_tinytex() is TRUE (you can also try to install a package with tinytex::tlmgr_install("booktabs") for instance)
Related
When I install new version of Rstudio (the latest version: 2022.02.3-492),
many packages that were previously installed do not work.
enter image description here
Also, install.packages does not work due to "cannot open URL 'http://cran.rstudio.com/bin/windows/contrib/4.2/PACKAGES'"
First, I checked getOption("repos") and it prints
CRAN
"http://cran.rstudio.com/"
attr(,"RStudio")
[1] TRUE
Next, checked sessionInfo(), and it prints
R version 4.2.0 (2022-04-22 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19043)
Matrix products: default
locale:
[1] LC_COLLATE=Korean_Korea.utf8 LC_CTYPE=Korean_Korea.utf8
[3] LC_MONETARY=Korean_Korea.utf8 LC_NUMERIC=C
[5] LC_TIME=Korean_Korea.utf8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.2.0 tools_4.2.0
Finally, checked my firewall blocker and allowed an application of RStudio R session.
However, none of them works.
It is making me crasy. How can I fix the problem?
In RStudio Go to Tools -> Global Options and in the Packages tab uncheck the box "use secure download method for HTTP".
Packages menu screenshot
I just started with Rstudio programming and I have some issues with XLConnect.
I was able to install "XLConnect" package, then tried to load the "XLConnect" library and got an error as below.
library(XLConnect)
ERROR: package or namespace load failed for'XLconnect':
.onload failed in loadNamespace() for XLConnect, details:
Call. System2("cat",c("/etc/*-release"), stdout =TRUE, stderr = TRUE) error: ' "cat" not found.
sessionInfo()
R version 4.1.0 (2021-05-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)
Matrix products: default
locale:
[1] LC_COLLATE=Italian_Switzerland.1252 LC_CTYPE=Italian_Switzerland.1252 LC_MONETARY=Italian_Switzerland.1252 LC_NUMERIC=C
[5] LC_TIME=Italian_Switzerland.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.1.0 tools_4.1.0 rJava_1.0-4
Any help would be really appreciated!
Thanks
This is a bug in XLConnect 1.0.3, where it requires cat to be installed on Windows. We fixed it in 1.0.4, so upgrading is the easiest way to fix the problem.
If for some reason you can't upgrade, you may try to install cat on Windows, e.g. using MINGW-w64.
See https://github.com/miraisolutions/xlconnect/issues/132 for the discussion.
I have been using R for a while without problems. Just a sudden, i have several issues with Rjava errors. I searched online for clues, but found none.
The error is: Warning in install.packages :
package ‘rJava’ is in use and will not be installed
and now every time i run install.packages, i get a pop box that says uploading loaded packages.....
sessionInfo()
R version 3.5.2 (2018-12-20)
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
[4] LC_NUMERIC=C LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] miniUI_0.1.1.1 tabulizer_0.2.2 rJava_0.9-10
Every time i start RStudio, i get this error:
Loading required package: rJava
Error: package or namespace load failed for ‘rJava’ in exists(what, mode = "function", envir = ns):
reached elapsed time limit
I made sure that i had java versions for 64 bit and the environment was set correctly.
install.packages("rJava");library(rJava)
I want to have a solution so that rjava loads correctly when i start RStudio or install rjava
This looks like you are loading tabulizer on startup, which also loads rJava. I suspect the reason is that you have a file called .RDATA saved in your default working environment. That makes RStudio open and load it on starting. In that file, I suspect there is an object which needs tabulizer. This is why it is loaded on default and why you have these problems.
The solution is to delete or rename the .RDATA file. Use getwd() to find out your current working directory. You might need to make hidden files visible.
If I try to run blogdown::new_site() I get an error message I suspect being a linux/windows conversion problem of slashes maybe?
blogdown::new_site()
Congratulations! Your new Hugo site is created in D:\Documents\Blog.
Just a few more steps and you're ready to go:
1. Download a theme into the same-named folder.
Choose a theme from https://themes.gohugo.io/, or
create your own with the "hugo new theme <THEMENAME>" command.
2. Perhaps you want to add some content. You can add single files
with "hugo new <SECTIONNAME>\<FILENAME>.<FORMAT>".
3. Start the built-in live server via "hugo server".
Visit https://gohugo.io/ for quickstart guide and full documentation.
trying URL 'https://github.com/yihui/hugo-lithium-theme/archive/master.zip'
Content length 119078 bytes (116 KB)
downloaded 116 KB
Error in gsub(tmpdir, ".", zipdir) :
invalid regular expression '.\3aec55bc496d', reason 'Invalid back reference'
Don't quite get what's going on there... I the command on an empty directory and tied it via Rstudio also trying a different template gcushen/hugo-academic which caused the same error message...
I'm running R on a windows machine an all packages are up to date I believe...
sessionInfo()
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 Kingdom.1252 LC_CTYPE=English_United Kingdom.1252
[3] LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C
[5] LC_TIME=English_United Kingdom.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] blogdown_0.5.9
loaded via a namespace (and not attached):
[1] compiler_3.4.3 bookdown_0.7 tools_3.4.3 yaml_2.1.18 knitr_1.20 xfun_0.1
As mentioned in my comment, this was indeed a bug in blogdown tracing back to differences in how Windows and Unix handle slashes in path names (or more specifically, differences in how tempfile() and utils::unzip() handle slashes in their output on Windows).
The issue should now be fixed as of version 0.5.10 of blogdown, which you can install using devtools::install_github("rstudio/blogdown").
After successfully loading blogdown and installing Hugo, I have trouble creating a new site with new_site(dir = 'test') in an empty 'test' folder. First, I get the following positive message:
Congratulations! Your new Hugo site is created in C:....\Dropbox\test.
Just a few more steps and you're ready to go:
Download a theme into the same-named folder.
or create your own with the "hugo new theme " command.
Perhaps you want to add some content. You can add single files
with "hugo new \.".
Start the built-in live server via "hugo server".
trying URL 'https://github.com/yihui/hugo-lithium-theme/archive/master.zip'
Content type 'application/zip' length 119666 bytes (116 KB)
downloaded 116 KB
Now comes the error msg.
Error in list.files(dir) : invalid 'path' argument
The current R session info gives this:
R version 3.3.2 (2016-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
locale:
[1] LC_COLLATE=German_Germany.1252 LC_CTYPE=German_Germany.1252 LC_MONETARY=German_Germany.1252
[4] LC_NUMERIC=C LC_TIME=German_Germany.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] blogdown_0.0.35
loaded via a namespace (and not attached):
[1] bookdown_0.3.19 tools_3.3.2 rstudioapi_0.6 knitr_1.15.20
Any idea what I am doing wrong?
This should be a temporary bug that existed for a couple of hours. Please reinstall blogdown from Github:
devtools::install_github('rstudio/blogdown')