MSYS2-packages icon indicating copy to clipboard operation
MSYS2-packages copied to clipboard

Setup fails on Windows 10

Open markus237 opened this issue 3 years ago • 7 comments

Hello, I have the following issue after installing msys2-x86_64-20210228 for the first time.

mkdir: cannot create directory ‘’: No such file or directory gpg: marginals needed: 3 completes needed: 1 trust model: pgp gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u chmod: cannot access '/trustdb.gpg': No such file or directory /usr/bin/pacman-key: line 216: ((: >= 0 : syntax error: operand expected (error token is ">= 0 ") ==> ERROR: You do not have sufficient permissions to read the pacman keyring. ==> Use 'pacman-key --init' to correct the keyring permissions. ==> ERROR: You do not have sufficient permissions to read the pacman keyring. ==> Use 'pacman-key --init' to correct the keyring permissions.

These errors occur directly after installation and everytime I open msys2 again. I tried multiple msys Version > 2018 and the errors are the same. On Windows 7 it works.

OS: Windows 10 Enterprise version 1909 64bit

Thanks for any help!

markus237 avatar Mar 08 '21 13:03 markus237

Is this a problem with permission? Does it also happen when you run msys2-x86_64-20210228.exe as Administrator? We have had similarly problems running as normal user.

pischky avatar Mar 27 '21 07:03 pischky

msys2 does not require administrator permission. Also I'd suggest not to run it as admin.

Biswa96 avatar Mar 27 '21 08:03 Biswa96

Yes. But we have a problem that on Win10 after installation with msys2-x86_64-20210228.exe (as Administrator) we where not able to execute pacman via shell started from normal user on a Win10 System. On Win7 this worked.

pischky avatar Mar 27 '21 08:03 pischky

Yeah but that doesn't help. I've reinstalled countless times and it's always this same error, preventing me from doing anything. I just run the installation as normal.

Novantric avatar Dec 05 '22 19:12 Novantric

Can you share the error output from the terminal window?

Biswa96 avatar Dec 05 '22 19:12 Biswa96

I have the same issue. Windows 10, installed msys2-x86_64-20230718.exe, the terminal gave this error immediately:

mkdir: cannot create directory ‘’: No such file or directory
gpg: marginals needed: 3  completes needed: 1  trust model: pgp
gpg: depth: 0  valid:   1  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 1u
chmod: cannot access '/trustdb.gpg': No such file or directory
/usr/bin/pacman-key: line 244: ((: >= 0 : syntax error: operand expected (error token is ">= 0 ")
==> ERROR: You do not have sufficient permissions to read the pacman keyring.
==> Use 'pacman-key --init' to correct the keyring permissions.
==> ERROR: You do not have sufficient permissions to read the pacman keyring.
==> Use 'pacman-key --init' to correct the keyring permissions.

I tried to follow its instruction but got basically the same error:

# pacman-key --init
mkdir: cannot create directory ‘’: No such file or directory
gpg: marginals needed: 3  completes needed: 1  trust model: pgp
gpg: depth: 0  valid:   1  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 1u
chmod: cannot access '/trustdb.gpg': No such file or directory
/usr/bin/pacman-key: line 244: ((: >= 0 : syntax error: operand expected (error token is ">= 0 ")

The file it's talking about, trustdb.gpg, exists under C:\msys64\home\fury\.gnupg\ but I'm not sure why it's trying to access it at the root.

ftab avatar Sep 26 '23 13:09 ftab