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

Error when using tinytex::install_tinytex - missing argument in paste0 #69

Closed
tbradley1013 opened this issue Aug 23, 2018 · 7 comments
Closed

Comments

@tbradley1013
Copy link

Hi,

I was trying to install TinyTex this morning via tinytex::install_tinytex and ran into a weird error. I got the same error from both the current CRAN release (0.7) and the current devel version. Here is the error:

> tinytex::install_tinytex()
trying URL 'http://mirror.ctan.org/systems/texlive/tlnet/install-tl.zip'
Content length 349 bytes
downloaded 18.9 MB

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\Tyler.Bradley\AppData\Roaming/TinyTeX. It will take a few minutes.
Error in paste0("Next you may see two error dialog boxes about the missing luatex.dll, ",  : 
  argument is missing, with no default
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.

As expected, given the error message, when I restarted my R and Rstudio session tinytex:::is_tinytex() returned FALSE. I looked through the source code and it looks like the issue is here. I am not entirely sure what is causing the issue, since I don't see any issues with the paste0 call. However, this was the only thing stopping the installing. I ran debug(tinytex::install_tinytex()) and ran everything but those few lines and it looks like TinyTex installed properly. After restarting my session, tinytex:::is_tinytex returned TRUE.

I thought it was worthwhile to report this, as I am not sure whether other people have run into this before.

Thanks for the great packages!

@tbradley1013
Copy link
Author

As a follow up, once I tried to knit a document after installing TinyTex, I get the following error:

Error: Failed to compile low-dbps-q2-2018-report.tex.
In addition: Warning message:
In system2(..., stdout = FALSE, stderr = FALSE) : '"pdflatex"' not found
Execution halted

No TeX installation detected (TeX is required to create PDF output). You should install a recommended TeX distribution for your platform:

  Windows: MiKTeX (Complete) - http://miktex.org/2.9/setup
  (NOTE: Be sure to download the Complete rather than Basic installation)

  Mac OS X: TexLive 2013 (Full) - http://tug.org/mactex/
  (NOTE: Download with Safari rather than Chrome _strongly_ recommended)

  Linux: Use system package manager

I thought it might be a PATH issue so I added the output of tinytex:::texlive_root() to my PATH and it still produced the same error.

I am not sure whether this has to do with how I did the installation or not. Any help would be greatly appreciated.

@yihui yihui closed this as completed in 8362e2e Aug 23, 2018
@yihui
Copy link
Member

yihui commented Aug 23, 2018

Sorry about that. There was an extra comma in paste0(). I just fixed it. You can use either the current development version or tinytex:::install_prebuilt().

The PATH issue should not exist if you restart RStudio after installing TinyTeX.

@tbradley1013
Copy link
Author

Thanks @yihui ! After reinstalling the development version and rerunning the function the installation works correctly. I guess the installation wasn't complete when I ran the function with debug.

Thanks for taking care of this so quickly!

@javedali99
Copy link

javedali99 commented May 14, 2020

Hi @yihui, I am also having the same problem while knitting to a PDF. I used all the debugging steps mentioned on your website. I am getting the following error. I tried to uninstall and reinstall it but I am getting the same error. I am using R4.0. Could you please tell me how can I fix it? Thanks.
23d39261ae570f8721222ce5948fd95feb92bbe4

When I am running tinytex::tlmgr_path() command I am getting following error:
Use of uninitialized value in bitwise or (|) at C:\Users\Javed\AppData\Roaming\TinyTeX\texmf-dist\scripts\texlive\tlmgr.pl line 1497.

@yihui
Copy link
Member

yihui commented May 14, 2020

@javedali99 #210

@virtiparekh
Copy link

Hi @yihui can you please help with my error I am getting similar error can you please look into that.

Error in aperm.default(map, c(2, 1, 3)) :
invalid first argument, must be an array
Calls: ... eval -> get_map -> get_googlemap -> aperm -> aperm.default
In addition: Warning message:
In has_crop_tools() :
Tool(s) not installed or not in PATH: pdfcrop, ghostcript
-> As a result, figure cropping will be disabled.
Execution halted

No LaTeX installation detected (LaTeX is required to create PDF output). You should install a LaTeX distribution for your platform: https://www.latex-project.org/get/

If you are not sure, you may install TinyTeX in R: tinytex::install_tinytex()

Otherwise consider MiKTeX on Windows - http://miktex.org

MacTeX on macOS - https://tug.org/mactex/
(NOTE: Download with Safari rather than Chrome strongly recommended)

Linux: Use system package manager

@yihui
Copy link
Member

yihui commented Apr 29, 2021

Error in aperm.default(map, c(2, 1, 3)) :
invalid first argument, must be an array
Calls: ... eval -> get_map -> get_googlemap -> aperm -> aperm.default

@virtiparekh That's the error. I don't see how this error is similar to the one in the original post above. It looks like a completely different error and is unlikely to be relevant to tinytex.

If you are not sure, you may install TinyTeX in R: tinytex::install_tinytex()

Have you done what the message suggested you do?

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

4 participants