MiKTeX / miktex

the MiKTeX source code
https://miktex.org
Other
780 stars 93 forks source link

Following "miktex-qt5-bin-x64" should be repaired made MiKTeX Console to stop #1486

Closed SicaoCent closed 4 months ago

SicaoCent commented 4 months ago

Today I faced with an unpleasant issue: on Win 11, after updating the April 20 MiKTeX version I got the message that "miktex-qt5-bin-x64" should be repaired. After doing this MiKTeX console stopped working, and I uninstall and reinstall MiKTeX (with net installer) as administrator. Then, I got the same warning to repair this file, and the same happened as above.

Third time installation, I doesn't updated (i.e. repair "miktex-qt5-bin-x64") and all compilations works, excepting the fact that each time I open MiKTeX console it warn me to update (repair) this file; of course, to have a functional MiKTeX I didn't do it. Please advise me what I could do to remove this unpleasant warning or to make some changes in the MiKTeX setup. It's will be possible to the next updates to omitt updating only this file? It's a possible bug of the curent release?

I am using MiKTeX for more than 22-25 years and till today I was very satisfied.

Thanks, Ted.

edocevoli commented 4 months ago

I was not able to reproduce this issue. What I did:

No issues with package miktex-qt5-bin-x64. If it still doesn't work for you, then I would recommend that you attach log files.

edocevoli commented 4 months ago

Also, you are installing from an outdated package repository. Please sync the local package repository before installing MiKTeX.

SicaoCent commented 4 months ago

Thanks, the next days I will follow your instructions: I will download again MiKTeX, I will install it from the new package repository, and if the same will happen I will send the log files.

But the MiKTeX Iocal package repository I downloaded today using the NetInstaller, then I installed it as administrator. The before last update I used till today was those of April 20 (approx.) and it worked flawlessly.

Anyway, I will send my new feedback after that.

SicaoCent commented 4 months ago

The same bad issue happened after: I downloaded the Net Installer from "https://miktex.org/download", I installed MiKTeX and then I made the update (repair was asked) for "miktex-qt5-bin-x64". I attached the log files and the screenshot in the archive.

Fortunately, the Basic Installer (it seems is a new one comparing with the Net Installer) works fine. Maybe thre is an issue to the Net Installer - you are the expert :-) . Thanks, Ted. Logs and Screenshot.zip

u-fischer commented 4 months ago

I can confirm that there is a problem. After todays update I got a behaviour similar to https://github.com/MiKTeX/miktex/issues/1437: there was an incomplete qt5-package and when checking for updates miktex claimed it must be repaired.

After I accepted the update, miktex console was closed and when trying to reopen it, it errored:

image

I could repair that by checking for updates on the command line:

C:\Users\Nililand2020\Documents\Tests>miktex packages check-update
miktex-qt6-bin-x64

C:\Users\Nililand2020\Documents\Tests>miktex packages update
Installing package miktex-qt6-bin-x64...

After that the console opens again, but agains claims that there is something to repair:

image

SicaoCent commented 4 months ago

MiKTeX basic installer worked well for me after the installation. But after I added all the packages, MiKTeX console asked me to update these two files. After that the console crashed as it happened before. Therefore, I am using only the basics installation without adding any additional packages: in this case all works fine, and compilations and console run well.

assjock commented 4 months ago

takrl shared his method to solve this problem, see https://tex.stackexchange.com/a/716743/293081 This works on W10 well. You don't need to reinstall all the files.

teeSngRovn commented 4 months ago

takrl shared his method to solve this problem, see https://tex.stackexchange.com/a/716743/293081 This works on W10 well. You don't need to reinstall all the files.

I solve this issue accord to takrl's method, you don't have to reinstall the miktex. Here is my way:

  1. By the link provided by takrl, you can download the package named `miktex-qt6-bin-x64.tar.lzma'.
  2. Unzipped the package until you find it's a folder, than go into this folder until you reach the files in \texmf\miktex\bin\x64
  3. Find your MikTeX installing folder like D:\YourFolder\MikTex, go into D:\YourFolder\MikTex\miktex\bin\x64 .
  4. Now copy all the files in the step2's x64 folder into the step3's x64 folder(Choosing substitute all).
  5. For me, after all this steps, the MikTeX works again.

NOTE: One thing have to add is, after these steps, you might find (as I find) MiKTeX ask you to update again to delete qt5 package. And after you update the package, MiKTeX will collapse again. So now what you need to do is also not reinstalling MiKTeX but walk through the step mentioned above again. After this time, the MiKTeX will no longer have updates and behave normally.

SicaoCent commented 4 months ago

Thanks @assjock and @teeSngRovn for the suggestions. Now I am using the basic installed MiKTeX that works well (maybe it doesn't contains this package), and I will wait for a while till @edocevoli will find a global solution (maybe a new update). If not, then I will try these two combined methods to fix the inconvenience.

u-fischer commented 4 months ago

Today there were a number of updates, and miktex-qt5 was marked as "removed". After I processed these updates the console was closed. Trying to open it again, gave again the error that qt-platform could not be found. I then called again on the command line miktex packages update. That reinstalled miktex-qt6-bin-x64 and now everything is fine. No miktex-qt5 anymore and qt6 works.

Note (from a comment below)

User with a multi-user miktex will perhaps need the --admin switch, so miktex --admin packages update

pddzaic commented 4 months ago

I can confirm, that the workaround provided by u-fischer worked for me. The code

miktex packages verify

gives you the packages which needs to be reinstalled.

SicaoCent commented 4 months ago

Thanks @u-fischer and @pddzaic. I tried the explained method and now MiKTeX works fine with all the new insatlled packages: qt5 was removed and qt6 was updated.

alleluia20 commented 4 months ago

Hello,

I would beg @edocevoli or @SicaoCent to reopen the bug. As you can see, it is affecting many people and, in my case, the workaround posted by @u-fischer is not working, nor can I reinstall the package miktex-qt6-bin-x64. I am now sharing all the details:

  1. I have Miktex installed in Windows 11 for all users, "as an administrator" (I know this is not recommended, but I did so because I am the only user of the computer).
  2. If I try to open the Miktex console, either as a user or as an admin, I get the famous window "[...] no Qt platform plugin could be initialized".
  3. I open a Windows PowerShell as an admin, and I try the following commands:

Is there anything else I can try? I am exasperating! Or, do you maybe need to give an update of miktex-qt6-bin-x64 that fixes the bug?

Thank you in advance.

SicaoCent commented 4 months ago

For @alleluia20 : I am not a Computer Science specialist, but now my MiKTeX instalation works perfectly, and I write below what I made (maybe you could reproduce it, if you want).

  1. First, I uninstall the old MiKTeX using the instructions from https://miktex.org/faq and running as administrator from the Command line the uninstall code of this link;
  2. I installed the Basis MiKTeX to the recommended option (not as administartor). It installed a functional (basical) MiKTeX that I could use well till yesterday: I say that it doesn't installed the two packages we discussed about and where something was unappropriate;
  3. Yesterday, after the last update appeared I added all the packages (the -qt5 doesn't appears in this list), I updated the package database, I checked for updates, etc. and now I have a complete MiKTeX installation fully functional as before.

Thanks to @u-fischer and @pddzaic for your help.

u-fischer commented 4 months ago

@alleluia20 try with miktex --admin packages update

alleluia20 commented 4 months ago

@alleluia20 try with miktex --admin packages update

Thank you very much, @u-fischer! This worked!

So the --admin flag must be appended when Miktex is managed by the admin. I did not know that.

cdriveraus commented 4 months ago

This issue just occurred for me, seems clear that there is still an issue. fixed using the console update approach.

mkkinyon commented 4 months ago

(Win11) I can run MiKTeX Console just fine but am getting the same "application failed to start..." error when attempting to (La)TeX any document. I have reinstalled MiKTeX twice this morning, but nothing. All the qt6 dll's are up to date. Attempting to update from a command line per what @u-fischer suggested does nothing. I get all the same responses as @alleluia20 in their command line attempts above. My installation is not multi-user so the --admin flag is not available. I am completely at a loss.

alleluia20 commented 4 months ago

Michael, if I have correctly understood, your issue is not related to this thread, as you can correctly run the console, and it is latex which fails to start.

You can try opening a new bug, asking at a forum, etc., pasting the full output.

Regards.

El jue, 9 may 2024 a las 19:05, Michael Kinyon @.***>) escribió:

(Win11) I can run MiKTeX Console just fine but am getting the same "application failed to start..." error when attempting to (La)TeX any document. I have reinstalled MiKTeX twice this morning, but nothing. All the qt6 dll's are up to date. Attempting to update from a command line per what @u-fischer https://github.com/u-fischer suggested does nothing. I get all the same responses as @alleluia20 https://github.com/alleluia20 in their command line attempts above. My installation is not multi-user so the --admin flag is not available. I am completely at a loss.

— Reply to this email directly, view it on GitHub https://github.com/MiKTeX/miktex/issues/1486#issuecomment-2103060148, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHQXFTIC5TBQWDS2FXOUEDTZBOUE5AVCNFSM6AAAAABG4537ASVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBTGA3DAMJUHA . You are receiving this because you were mentioned.Message ID: @.***>

marcoxa commented 4 months ago

Hi

I confirm that for a "all users" installation of Windows 11, the

miktex --admin packages update

worked for me (in a cmd with administrator privileges).

Turns out there were a few packages to update, some that looked pretty basic.

msk-nightly commented 4 months ago

I faced a very similar issue today on MikTeX console 4.12 (OS: Win 10 x64). The qt5 plugin was removed upon updating and that resulted in an unusable MikTeX console. I'll share the solution I discovered just as an addition. Perhaps it might provide some insight or help someone in some way.

Upon facing this alarming issue, I turned to a search engine online. In the top 5 results, I found this page where an answer instructs one to copy the qwindows.dll file from one directory to another. I could not find that file but I found a qwindows.dll.old file in C:\Users\<USERNAME>\AppData\Local\Programs\MiKTeX\miktex\bin\x64\platforms\ which I renamed to qwindows.dll and Voilà! MikTeX console was up and running again.

I then checked for updates again and it showed a pending repair for qt6. Upon applying that update and reopening the console, things returned to normal. Now, I've found this thread and am posting my story.

I hope that the process is streamlined somehow. Thank you.

192933488S commented 3 months ago

Enormous simplicity by @u-fischer ! It works in my case, i.e., MiKTeX GUI is launching again. The --admin was removed, as it was not needed.

miktex --admin packages update

venkatachalapathy commented 3 months ago

Like others in this thread, I've had issues with MikTex after an update 2 weeks ago. I have a 64bit Windows 10 installation.

  1. I am unable to uninstall old install. So I've been working with a new renamed installation of MikTeX
  2. I've been unable to resolve plugin error, even after following the qt6 update.

pandoc test.md -o test.pdf qt.qpa.plugin: Could not find the Qt platform plugin "windows" in "" This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

I've tried all versions of tips provided

msk-nightly commented 3 months ago

@venkatachalapathy Have you tried this one?

I faced a very similar issue today on MikTeX console 4.12 (OS: Win 10 x64). The qt5 plugin was removed upon updating and that resulted in an unusable MikTeX console. I'll share the solution I discovered just as an addition. Perhaps it might provide some insight or help someone in some way.

Upon facing this alarming issue, I turned to a search engine online. In the top 5 results, I found this page where an answer instructs one to copy the qwindows.dll file from one directory to another. I could not find that file but I found a qwindows.dll.old file in C:\Users\<USERNAME>\AppData\Local\Programs\MiKTeX\miktex\bin\x64\platforms\ which I renamed to qwindows.dll and Voilà! MikTeX console was up and running again.

I then checked for updates again and it showed a pending repair for qt6. Upon applying that update and reopening the console, things returned to normal. Now, I've found this thread and am posting my story.

I hope that the process is streamlined somehow. Thank you.

venkatachalapathy commented 3 months ago

C: ...\AppData\Local\Programs\MiKTeX2\miktex\bin\x64\platforms>ls qwindows.dll

So it looks like the correct file is already present. I have not tried the this trick yet---I will now.

Qt, in this case, is the Qt library used by MikTeX (https://www.qt.io/). I can't reproduce your Windows 7 error, however, I know how to fix the Windows 8 one.

You can fix this error by copying the file qwindows.dll from /miktex/bin/platforms/ to /AppData/Roaming/MikTex//miktex/bin/platforms/.

You might have to create the platforms folder.

venkatachalapathy commented 3 months ago

C:\...\AppData\Local\Programs\MiKTeX2\miktex\bin\x64\platforms>copy qwindows.dll C:\Users\Rajesh\AppData\Roaming\MiKTeX\2.9\miktex\bin\platforms 1 file(s) copied.

C:\...\Documents\folder_for_github\socialOS>pandoc test.md -o test.pdf qt.qpa.plugin: Could not find the Qt platform plugin "windows" in "" This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

It did not work.

PhotoVisionProject commented 3 months ago

Problem Solved! Here’s what worked for me:

Run the command miktex packages verify.

It should return miktex-qt6-bin-x64, indicating that this package needs to be reinstalled.

Without using admin rights (since I have a local, non-shared version of MiKTeX on my PC), execute:

miktex packages update

This command will reinstall the miktex-qt6-bin-x64 package.

These steps were successful for me when performed in a command prompt with administrator privileges.

aphalo commented 1 week ago

@alleluia20 try with miktex --admin packages update

Thank you very much, @u-fischer! This worked!

So the --admin flag must be appended when Miktex is managed by the admin. I did not know that.

For miktex --admin packages update to work under Windows 11, I had to run this command at a command prompt openned itself with run as administrator.