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

Unable to install MSYS2: CreateProcessW failed #2620

Closed
hyrious opened this issue Aug 28, 2021 · 3 comments
Closed

Unable to install MSYS2: CreateProcessW failed #2620

hyrious opened this issue Aug 28, 2021 · 3 comments

Comments

@hyrious
Copy link

hyrious commented Aug 28, 2021

Describe the issue

A fresh install is broken with permission issue.

Steps to Reproduce the Problem

  1. Download the latest msys2.exe from https://www.msys2.org
    (at the time of writing, it is x64_20210725)
  2. Install it to C:\Users\hyrious\AppData\Local\MSYS2, Run MSYS2 now.
  3. Run pacman -S
      0 [main] pacman 275 dofork: child -1 - CreateProcessW failed for 'C:\Users\hyrious\AppData\Local\MSYS2\usr\bin\pacman.exe', errno 13
error: GPGME error: System error w/o errno
error: mingw64: missing required signature
      0 [main] pacman 281 dofork: child -1 - CreateProcessW failed for 'C:\Users\hyrious\AppData\Local\MSYS2\usr\bin\pacman.exe', errno 13
error: GPGME error: System error w/o errno
error: database 'mingw64' is not valid (invalid or corrupted database (PGP signature))
error: database 'ucrt64' is not valid (invalid or corrupted database (PGP signature))

I used to think %localappdata% does not need permissions, but why did this happen?

Note: install msys2 to C:\msys64 does not work (same issue) too.

Additional Context: Operating System, Screenshots

  • OS: Windows 10 Pro version 21H1 64bit (19043.1165)
  • Maybe related: GPGME error: Invalid crypto engine #393.
  • I ran pacman -S several times, it seems the dofork: child -1 - CreateProcessW failed does not always print, it sometimes print none, or print twice.
  • If having SigLevel = Never in pacman.conf (which means do not integrate gpg), the pacman -S will able to work at the first time. However, if I try to install a package, say pacman -S make, another permission error will be shown \
    call to execv (/usr/bin/bash /usr/bin/bash -c . /tmp/alpm_5jjF2s/.INSTALL; post_install 4.3-1 ) failed (Permission denied)
    error: command (/usr/bin/bash /usr/bin/bash -c . /tmp/alpm_5jjF2s/.INSTALL; post_install 4.3-1 ) failed to execute correctly
    
@hyrious
Copy link
Author

hyrious commented Aug 28, 2021

Remember that random error?

I ran pacman -S several times, it seems the dofork: child -1 - CreateProcessW failed does not always print, it sometimes print none, or print twice.

I did further tests, simply run sh -lc true can result in randomly permission error:


hyrious@KUER-PC MSYS ~
$ sh -lc true

hyrious@KUER-PC MSYS ~
$ sh -lc true

hyrious@KUER-PC MSYS ~
$ sh -lc true
/etc/profile: line 124: /usr/bin/which: Permission denied

hyrious@KUER-PC MSYS ~
$ sh -lc true

hyrious@KUER-PC MSYS ~
$ sh -lc true
/etc/post-install/05-home-dir.post: line 4: /usr/bin/id: Permission denied
/etc/post-install/05-home-dir.post: line 4: /usr/bin/id: No error

hyrious@KUER-PC MSYS ~
$ sh -lc true

hyrious@KUER-PC MSYS ~
$ sh -lc true
/etc/post-install/06-windows-files.post: line 4: /usr/bin/cygpath: Permission denied
/etc/post-install/06-windows-files.post: line 4: /usr/bin/cygpath: No error
Directory \drivers\etc does not exist; exiting
If directory name is garbage you need to update your msys package

hyrious@KUER-PC MSYS ~
$ sh -lc true

Hope the info above helps you investigating.

@hyrious
Copy link
Author

hyrious commented Aug 28, 2021

Simply restarted MacType and this issue is gone... So this issue is actually a BLODA. I will close it.

However there actually exists gpg.exe and pacman.exe in [UnloadDll]. 🤔 I didn't change anything in my mactype config file. It's weird.

@hyrious hyrious closed this as completed Aug 28, 2021
@hyrious
Copy link
Author

hyrious commented Aug 29, 2021

Simply restarted MacType and this issue is gone...

Edit: not that simple, it seems I must click Disabled then Enabled to get it work (only Restart is not enough). I guess there's some process been hooked at system boot up, then it can only be unhooked by disable mactype once.

Anyway, I'll file an issue to MacType to see what's going on.

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

1 participant