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

MSYS2 on Windows 10 - cannot update the package database using pacman #2589

Open
Sprinkles44 opened this issue Jul 28, 2021 · 7 comments
Open

Comments

@Sprinkles44
Copy link

I tried to update my MSYS2 on Windows 10 (as per the instructions on https://www.msys2.org/) and I got this error:

OscarAlvarez@Lambda-Station-OA MINGW64 ~
$ pacman -Syu
error: config file /etc/pacman.d/mirrorlist.mingw could not be read: No such file or directory

So I did a fresh install of MSYS2 on Windows 10. I got the binaries from the MSYS2 website and installed it successfully. Now, I am getting the same error.

I went into the /etc/pacman.d/ directory and this is what was inside:

OscarAlvarez@Lambda-Station-OA MINGW64 /etc/pacman.d
$ ls
gnupg  mirrorlist.clang64  mirrorlist.mingw32  mirrorlist.mingw64  mirrorlist.msys  mirrorlist.ucrt64

I didn't find the file so I created an empty file with the name "mirrorlist.mingw" and ran the update but to no avail. So I just deleted the empty file I created. No other flags like -S, -Su, or -Syy, etc. work and produce the same error.

Thank you.

  • OS: Windows 10 Education
@Biswa96
Copy link
Member

Biswa96 commented Jul 28, 2021

There is something wrong in your pc setup. Antivirus software may delete files without any reason. To workaround this situation

@Sprinkles44
Copy link
Author

I only have the Windows 10 antivirus that comes with the OS. I do not have any other antivirus software.

I downloaded the file then opened MSYS2 and ran the command. I get the same error:

OscarAlvarez@Lambda-Station-OA MSYS ~
# pacman -U --overwrite=* pacman-mirrors-20210706-1-any.pkg.tar.zst
error: config file /etc/pacman.d/mirrorlist.mingw could not be read: No such file or directory

It seems to me that I can't run any pacman command.

You say to run that command but where do I run it, in MSYS2? If I run it with MSYS2, do I move the downloaded file to a specific directory or will the downloaded file just be detected automatically anywhere on my system? It's in my download folder right now.

Thank you.

@Biswa96
Copy link
Member

Biswa96 commented Jul 28, 2021

error: config file /etc/pacman.d/mirrorlist.mingw could not be read: No such file or directory

Create that empty file as you have said in original post. Then run the pacman -U command.

You say to run that command but where do I run it, in MSYS2?

Any msys2/mingw window.

will the downloaded file just be detected automatically anywhere on my system?

You need to specify the full path of that .pkg.tar.zst file in that pacman -U command. Or drag and drop the .pkg.tar.zst file in msys2 window, it will automatically show the full path.

@HolyBlackCat
Copy link

Another user had the same problem: https://stackoverflow.com/q/68562503

@Sprinkles44
Copy link
Author

error: config file /etc/pacman.d/mirrorlist.mingw could not be read: No such file or directory

Create that empty file as you have said in original post. Then run the pacman -U command.

You say to run that command but where do I run it, in MSYS2?

Any msys2/mingw window.

will the downloaded file just be detected automatically anywhere on my system?

You need to specify the full path of that .pkg.tar.zst file in that pacman -U command. Or drag and drop the .pkg.tar.zst file in msys2 window, it will automatically show the full path.

Thank you that seems to have worked (sort of). Now I only get this error:

OscarAlvarez@Lambda-Station-OA MSYS ~
$ pacman -Syu
:: Synchronizing package databases...
error: failed to synchronize all databases (no servers configured for repository)

I think I have to add to the repository or something like that but I am not too sure. Thank you again for helping.

@jeremyd2019
Copy link
Member

mv /etc/pacman.d/mirrorlist.mingw.pacnew /etc/pacman.d/mirrorlist.mingw ?

@Sprinkles44
Copy link
Author

Thank you so much, it works perfectly now.

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