naveen521kk / chocolatey-texlive

The chocolatey Package for TeXLive
GNU General Public License v3.0
3 stars 0 forks source link

ERROR: The running command stopped #5

Closed amine-aboufirass closed 2 years ago

amine-aboufirass commented 3 years ago

Hi,

I tried uninstalling texlive and reinstalling using some additional parameters as follows:

choco install texlive --params="'/collections:games /scheme:basic'"

Unfortunately, I'm getting an error now:

ERROR: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Cannot create a file when that file already exists.

When I try choco uninstall texlive I get the exact same error. When I run pdflatex on the command line it doesn't seem to recognize it as a valid command.

I also found another issue which points to this problem occuring in one of your CI/CD pipelines. Futhermore in the discussion section of the main community page a user has also reported a similar problem on their local machine.

How can I fix this to get texlive up and running again? Thank you.

amine-aboufirass commented 3 years ago

I had to delete the folder c:\tools\temp-install-tl. I think powershell was having a hard time overwriting it. Strange that this didn't get removed during the uninstall...

naveen521kk commented 3 years ago

Hi @awa5114, Can you send the logs at C:\ProgramData\chocolatey\logs\chocolatey.log? The message you gave is said when ever any command in powershell fails, so without sending logs it will be impossible to know what went wrong. https://github.com/naveen521kk/chocolatey-texlive/issues/2 isn't related to this issue. I haven't seen the Disqus chat in a while, so I missed it.

amine-aboufirass commented 3 years ago

I ran choco install texlive --params="'/collections:latex-recommended'". The complete log is a bit too long to paste on here but here are the last few lines which contain the error:

2021-09-19 11:33:37,887 10844 [INFO ] - VERBOSE: - install-tl-20210902\tlpkg\tlperl\site\lib\Test
2021-09-19 11:33:37,889 10844 [INFO ] - VERBOSE: Everything is Ok
2021-09-19 11:33:37,890 10844 [INFO ] - VERBOSE: Folders: 462
2021-09-19 11:33:37,890 10844 [INFO ] - VERBOSE: Size:       73503069
2021-09-19 11:33:37,891 10844 [INFO ] - VERBOSE: 
2021-09-19 11:33:37,892 10844 [INFO ] - VERBOSE: Files: 2816
2021-09-19 11:33:37,892 10844 [INFO ] - VERBOSE: Compressed: 25585301
2021-09-19 11:33:37,907 10844 [DEBUG] - $exitCode was passed null
2021-09-19 11:33:37,914 10844 [DEBUG] - Command ['C:\ProgramData\chocolatey\tools\7z.exe' x -aoa -bd -bb1 -o"C:\tools\temp-install-tl" -y "C:\ProgramData\chocolatey\lib\texlive\tools\install-tl.zip"] exited with '0'.
2021-09-19 11:33:37,922 10844 [DEBUG] - 7z exit code: 0
2021-09-19 11:33:37,924 10844 [INFO ] - C:\tools\temp-install-tl
2021-09-19 11:33:37,941 10844 [ERROR] - ERROR: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Cannot create a file when that file already exists.

2021-09-19 11:33:37,946 10844 [DEBUG] - Built-in PowerShell host called with ['[System.Threading.Thread]::CurrentThread.CurrentCulture = '';[System.Threading.Thread]::CurrentThread.CurrentUICulture = ''; & import-module -name 'C:\ProgramData\chocolatey\helpers\chocolateyInstaller.psm1'; & 'C:\ProgramData\chocolatey\helpers\chocolateyScriptRunner.ps1' -packageScript 'C:\ProgramData\chocolatey\lib\texlive\tools\chocolateyinstall.ps1' -installArguments '' -packageParameters '/collections:latex-recommended''] exited with '-1'.
2021-09-19 11:33:37,948 10844 [DEBUG] - Calling command ['"C:\Windows\System32\shutdown.exe" /a']
2021-09-19 11:33:38,006 10844 [DEBUG] - Command ['"C:\Windows\System32\shutdown.exe" /a'] exited with '1116'
2021-09-19 11:33:38,059 10844 [DEBUG] - Capturing package files in 'C:\ProgramData\chocolatey\lib\texlive'
2021-09-19 11:33:38,072 10844 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\texlive\install-tl.zip.txt'
  with checksum '9E0A56BAAB665736E8E0D26D70242C56'
2021-09-19 11:33:38,150 10844 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\texlive\texlive.nupkg'
  with checksum '1E5F4D463FEDCDDFC838B11FA6D70901'
2021-09-19 11:33:38,155 10844 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\texlive\texlive.nuspec'
  with checksum 'D21F9F75FE2B15791F75C53271084269'
2021-09-19 11:33:38,156 10844 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\texlive\tools\chocolateyinstall.ps1'
  with checksum '1B761BA08FFB89D036BEC86974F7ECB0'
2021-09-19 11:33:38,158 10844 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\texlive\tools\chocolateyuninstall.ps1'
  with checksum 'CA8C9D99D8772F2156AA030F541CB8A4'
2021-09-19 11:33:38,158 10844 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\texlive\tools\helper.ps1'
  with checksum 'DB0D826DD2FB89946C12D825742D2D50'
2021-09-19 11:33:38,222 10844 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\texlive\tools\install-tl.zip'
  with checksum '9C3B2B630DCA04FA6D4904B72C25FCC9'
2021-09-19 11:33:38,229 10844 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\texlive\tools\LICENSE.txt'
  with checksum '3C5D34596730DC045DA141F9D2A5C467'
2021-09-19 11:33:38,230 10844 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\texlive\tools\VERIFICATION.txt'
  with checksum '037E0A424351B13B6D79D6848C480CF6'
2021-09-19 11:33:38,248 10844 [DEBUG] - Attempting to replace "C:\ProgramData\chocolatey\.chocolatey\texlive.2021.20210902\.files"
 with "C:\ProgramData\chocolatey\.chocolatey\texlive.2021.20210902\.files.10844.update".
 Backup placed at "C:\ProgramData\chocolatey\.chocolatey\texlive.2021.20210902\.files.backup".
2021-09-19 11:33:38,250 10844 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\texlive.2021.20210902\.files.backup".
2021-09-19 11:33:38,252 10844 [DEBUG] - Attempting to copy "C:\ProgramData\chocolatey\.chocolatey\texlive.2021.20210902\.files.10844.update"
 to "C:\ProgramData\chocolatey\.chocolatey\texlive.2021.20210902\.files".
2021-09-19 11:33:38,255 10844 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\texlive.2021.20210902\.files.10844.update".
2021-09-19 11:33:38,256 10844 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\texlive.2021.20210902\.arguments".
2021-09-19 11:33:38,258 10844 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\texlive.2021.20210902\.extra".
2021-09-19 11:33:38,258 10844 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\texlive.2021.20210902\.version".
2021-09-19 11:33:38,259 10844 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\texlive.2021.20210902\.sxs".
2021-09-19 11:33:38,260 10844 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\texlive.2021.20210902\.pin".
2021-09-19 11:33:38,262 10844 [DEBUG] - Attempting to delete directory "C:\ProgramData\chocolatey\lib-bad\texlive".
2021-09-19 11:33:38,275 10844 [DEBUG] - Sending message 'HandlePackageResultCompletedMessage' out if there are subscribers...
2021-09-19 11:33:38,277 10844 [ERROR] - The install of texlive was NOT successful.
2021-09-19 11:33:38,279 10844 [ERROR] - Error while running 'C:\ProgramData\chocolatey\lib\texlive\tools\chocolateyinstall.ps1'.
 See log for details.
2021-09-19 11:33:38,282 10844 [DEBUG] - Moving 'C:\ProgramData\chocolatey\lib\texlive'
 to 'C:\ProgramData\chocolatey\lib-bad\texlive'
2021-09-19 11:33:40,289 10844 [DEBUG] - Attempting to delete file "C:\Users\921479\AppData\Local\NuGet\Cache\texlive.2021.20210902.nupkg".
2021-09-19 11:33:40,313 10844 [WARN ] - 
Chocolatey installed 0/1 packages. 1 packages failed.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
2021-09-19 11:33:40,320 10844 [INFO ] - 
2021-09-19 11:33:40,323 10844 [ERROR] - Failures
2021-09-19 11:33:40,327 10844 [ERROR] -  - texlive (exited -1) - Error while running 'C:\ProgramData\chocolatey\lib\texlive\tools\chocolateyinstall.ps1'.
 See log for details.
2021-09-19 11:33:40,330 10844 [WARN ] - 
Enjoy using Chocolatey? Explore more amazing features to take your
experience to the next level at
 https://chocolatey.org/compare
2021-09-19 11:33:40,333 10844 [DEBUG] - Sending message 'PostRunMessage' out if there are subscribers...
2021-09-19 11:33:40,357 10844 [DEBUG] - Exiting with -1

Any help would be most welcome.

amine-aboufirass commented 2 years ago

Hey there... Any luck with this? Is there any additional information that would be helpful?

naveen521kk commented 2 years ago

I am slightly busy for the week, probably I will look into this when I am free.

amine-aboufirass commented 2 years ago

@naveen521kk Fair enough. I'll also do what I can and let you know if I identify the problem.

amine-aboufirass commented 2 years ago

@naveen521kk as a matter of fact, I had pending updates in windows 10. When I restarted my machine and ran the updates, the choco install appeared to run more smoothly. So I guess I needed to update.

I do have a follow up question if you don't mind. Does it make sense to specify a collection if I set the install scheme to full? Is it correct to say that the scheme overrides the collections if they are both specified?

naveen521kk commented 2 years ago

Does it make sense to specify a collection if I set the install scheme to full?

I think if you set install scheme to full the collection you specify would be ignored. Essentially, AFAIK, the scheme-full contains all the collection listed see http://tug.org/svn/texlive/trunk/Master/tlpkg/tlpsrc/scheme-full.tlpsrc?revision=54074&view=markup

Is it correct to say that the scheme overrides the collections if they are both specified?

It depends, ig. Every scheme depends on a set of collections and collections in turn depends on individual packages.

amine-aboufirass commented 2 years ago

Allright thanks. It seems I am still not able to reinstall the package using choco install texlive --force unless I delete temp-install-tl directory:

remove-item C:\tools\temp-install-tl -recurse

I still think this is a bug right?

amine-aboufirass commented 2 years ago

I finally got the full install to work. Here's what I did:

Regarding the latter command, I discovered that the install was also sometimes failing because Chocolatey has a default timeout inferior to the time it took to install the full latex scheme on my machine. I believe this is also the case for many users. It would be useful to add this to the package documentation.

naveen521kk commented 2 years ago

I believe this is also the case for many users. It would be useful to add this to the package documentation.

I think I added about this to readme before.

deleted the C:\tools\temp-install-tl directory as explained above

I think the fix can be simple. I will check for it later this week.

amine-aboufirass commented 2 years ago

I'm getting some rather slow compile times with texlive-full. I posted a question on stackexchange related to this, and got a response from David Carlisle where he mentions the following:

a common reason for pdflatex being slow is having TEXINPUTS set in a way that means tex has to search the disk rather than use its pre-hashed ls-R files. Also if the directory being used is syncing with dropbox or google drive or whatever. I'm not familiar with choclately is that installing the standard windows texlive tex or is it (like the cygwin version that I use normally) installing a custom compilation using a posix layer over windows?

Would it be possible for you to confirm whether the chocolatey based install has TEXINPUTS set in a way that causes TeX to search the disk rather than use its pre-hashed ls-R files? Thanks in advance!

naveen521kk commented 2 years ago

Would it be possible for you to confirm whether the chocolatey based install has TEXINPUTS set in a way that causes TeX to search the disk rather than use its pre-hashed ls-R files?

Technically, under the hood chocolatey simply invokes the installer provided by TexLive http://tug.org/texlive/acquire-netinstall.html for Windows. So, I would say it should similar to manually running the gui version of this installer.

naveen521kk commented 2 years ago

https://github.com/naveen521kk/chocolatey-texlive/commit/3ee383cd37077156ba75f192177a85fe8ea8801f should have fixed this.