MSYS2-packages
MSYS2-packages copied to clipboard
pacman -Syu Does Nothing
Hi Everybody,
I am trying to install Netbeans C++ on a new machine and I've done this several times in the past without issue however when I attempt to do it today "pacman -Syu" or "pacman -Su" do absolutely nothing. I have followed the instructions for installing MSYS2 (I've tried 32 and 64 bit versions) as specified on the following webpage (https://www.msys2.org/)
What's the problem?
Wayne
whamberg@USSA1LPJJF3CS1 MSYS ~ $ pacman -Syu :: Synchronizing package databases...
whamberg@USSA1LPJJF3CS1 MSYS ~ $ pacman -Su error: failed to init transaction (unable to lock database) error: could not lock database: File exists if you're sure a package manager is not already running, you can remove /var/lib/pacman/db.lck
whamberg@USSA1LPJJF3CS1 MSYS ~ $
pacman also locks the database regardless of what I do.
Make sure there is no pacman process running and then remove lockfile: rm -f /var/lib/pacman/db.lck
.
Done that and it still does nothing.
Wayne
From: Mateusz Mikuła [email protected] Sent: Thursday, June 14, 2018 4:07:16 PM To: Alexpux/MSYS2-packages Cc: waynehamberg; Author Subject: Re: [Alexpux/MSYS2-packages] pacman -Syu Does Nothing (#1298)
Make sure there is no pacman process running and then remove lockfile: rm -f /var/lib/pacman/db.lck.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Alexpux/MSYS2-packages/issues/1298#issuecomment-397453193, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AFvcC-cU42q4a-fh2lEwtWaViMZcFvw_ks5t8t6UgaJpZM4Umkfu.
Then it must external program interfering with pacman. Some of them are listed here: https://cygwin.com/faq/faq.html#faq.using.bloda
pt., 15 cze 2018 o 00:58 waynehamberg [email protected] napisał(a):
Done that and it still does nothing.
Wayne
From: Mateusz Mikuła [email protected] Sent: Thursday, June 14, 2018 4:07:16 PM To: Alexpux/MSYS2-packages Cc: waynehamberg; Author Subject: Re: [Alexpux/MSYS2-packages] pacman -Syu Does Nothing (#1298)
Make sure there is no pacman process running and then remove lockfile: rm -f /var/lib/pacman/db.lck.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub< https://github.com/Alexpux/MSYS2-packages/issues/1298#issuecomment-397453193>, or mute the thread< https://github.com/notifications/unsubscribe-auth/AFvcC-cU42q4a-fh2lEwtWaViMZcFvw_ks5t8t6UgaJpZM4Umkfu
.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Alexpux/MSYS2-packages/issues/1298#issuecomment-397463308, or mute the thread https://github.com/notifications/unsubscribe-auth/ABHsdqjRgxjm6xx4dW8SOTEqeMR9FR1vks5t8uqtgaJpZM4Umkfu .
I am seeing this same problem. pacman from msys2-x86_64-20161025.exe
works OK, but after upgrading to the latest (via pacman -Syu
), I see the same thing that @waynehamberg is reporting -- running pacman Syu
prints "Synchronizing package databases..." but then nothing else
I have the exact same problem on Windows 7 following a restart and a clean, accept-all-defaults install of msys2-x86_64-20180531.exe
from https://www.msys2.org/. An earlier version of MSYS2 used to work (cannot say what version, though). EDIT: I also have the same experience as @eminence with msys2-x86_64-20161025.exe
: once pacman
upgrades, it is broken.
The following seems to be a work-around to my problems:
- install
msys2-x86_64-20161025.exe
(from http://repo.msys2.org/distrib/x86_64/) rather thanmsys2-x86_64-20180531.exe
- use
pacman -Syu --ignore pacman
rather thanpacman -Syu
(givingwarning: pacman: ignoring package upgrade (5.0.1-1 => 5.1.0-4)
) - use
pacman -Su --ignore pacman --force
rather thanpacman -Su
The --force
option above appears to be required to avoid this error:
error: failed to commit transaction (conflicting files)
coreutils: /usr/lib/coreutils/libstdbuf.so exists in filesystem
Errors occurred, no packages were upgraded.
See #1024.
Yes, because of how pacman does version comparison.
But recently I did a clean install on another system using msys2-x86_64-20180531.exe
and did a pacman -Syyuu
(override database and full system upgrade), and it worked fine, no errors.
@StarWolf3000, on my Windows 7 machine, a clean install of msys2-x86_64-20180531.exe
followed by pacman -Syyuu
is no cure, because the version of pacman
that comes with it seems to be the one exhibiting the problem experienced by @waynehamberg and me.
I have literally have given up as I have tried everything suggested and many more variations without success. We even tried a clean install of Windows 7 on an unfiltered line free of interference of any virus scans or anything else and the problem still exists.
I am really surprised that this problem can't be solved by simply rolling back changes made to MSYS2 over the last year to the point where this doesn't recur.
Wayne
From: Mike Pilgrem [email protected] Sent: Friday, July 20, 2018 7:42:14 AM To: Alexpux/MSYS2-packages Cc: waynehamberg; Mention Subject: Re: [Alexpux/MSYS2-packages] pacman -Syu Does Nothing (#1298)
@StarWolf3000https://github.com/StarWolf3000, on my Windows 7 machine, a clean install of msys2-x86_64-20180531.exe followed by pacman -Syyuu is no cure, because the version of pacman that comes with it seems to be the one exhibiting the problem experienced by @waynehamberghttps://github.com/waynehamberg and me.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/Alexpux/MSYS2-packages/issues/1298#issuecomment-406604211, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AFvcC7lH6vlq8_oyUByegomquf0iSuXVks5uId42gaJpZM4Umkfu.
For completeness, on my Windows 10 machine, I have not had any problem with msys2-x86_64-20180531.exe
.
I did a reinstall on Windows 8.1 and 10, both successful. Maybe there really is something on Windows 7 that prevents pacman to do anything.
I have the same issue as in the first post as waynehamberg on Windows 7, but on Windows 10 in another machine all is fine (as mpilgrem reports).
I found a workaround for Windows 7 which worked for me, which is to edit /etc/pacman.conf and uncomment the following line: XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
I found the workaround above in this comment: https://github.com/Alexpux/MSYS2-packages/issues/1022#issuecomment-370482998
However then I ran into another problem when running "pacman -Syu" whereby updating gnupg fails because the gpg-agent cannot connect. The workaround for this other issue is to disable update of the gnupg package by modifying pacman.conf as follows:
IgnorePkg = gnupg
Of course the above is a temporary workaround!
Any working solution to this on Windows 7? I am struggling to get a working shell again. Installation of the msys2-x86_64-20161025.exe doesnt work either:
BTW often failed installations of msys2-x86_64-20180531.exe remove the installer from the directory and lock it. All very odd. After failing for almost a day I am desperate to get a working msys2 going again (note the old installation got completely corrupted up an update....).
A brief update, using Piscium work around actually worked for me too, so at least I have something to work with now. B
Some tools are targeted by antivirus or anti-malware software, gnupg for example.
Hi guys,
I've the same issue on Windows 10 with the following version of msys2 : msys2-x86_64-20180531.exe
Any update regarding a potential fix ?
Thanks Yves
Same problem here, pacman crashes trying to download anything leaving the lock file there. I'm running Windows 10. The workaround posted by @Piscium works. Just tell pacman to use wget instead of internal downloader.
I got same issue with msys2-base-x86_64-20181211.tar.xz. I install on Windows 10.
Actually it success the first time, from 2nd time it always fails:
:: Synchronising package databases... error: failed to update mingw32 (unable to lock database) error: failed to update mingw64 (unable to lock database) error: failed to update msys (unable to lock database) error: failed to synchronize all databases
I got same issue with msys2-base-x86_64-20181211.tar.xz. I install on Windows 10.
Actually it success the first time, from 2nd time it always fails:
:: Synchronising package databases... error: failed to update mingw32 (unable to lock database) error: failed to update mingw64 (unable to lock database) error: failed to update msys (unable to lock database) error: failed to synchronize all databases
Same issue. Did you got any solution? I used 20200522 installer.
Try using pacman -Sy --debug -vvv
. If that doesn't say anything interesting, try strace or procmon to find out what exactly is wrong with the locking.
These days with .Net Core do you really need pacman or NetBeans?
I found that this environment along with other things like QT difficult and time consuming to setup.
From: David Macek [email protected] Sent: Monday, May 25, 2020 2:59 PM To: msys2/MSYS2-packages [email protected] Cc: waynehamberg [email protected]; Mention [email protected] Subject: Re: [msys2/MSYS2-packages] pacman -Syu Does Nothing (#1298)
Try using pacman -Sy --debug -vvv. If that doesn't say anything interesting, try strace or procmon to find out what exactly is wrong with the locking.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/msys2/MSYS2-packages/issues/1298#issuecomment-633714665, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABN5YC2ZT7U5LI5BAP2NN7TRTLL3RANCNFSM4FE2I7XA.
Try using
pacman -Sy --debug -vvv
. If that doesn't say anything interesting, try strace or procmon to find out what exactly is wrong with the locking.
Sorry, but after hours of struggling with this issue I just installed Cygwin.
I have win 8.1, The problem is still occuring
Have you tried to run it as Admin? I got the same error, when I was running the command in a standard window, but when I started MSYS2 as admin, I didn't have any problems.
If you installed in the default location c:\msys64
the permissions are likely open. But if you installed under C:\Program Files
, write permissions are restricted to admins. Edit the file security on the folder and add your user account to enable Modify permissions. Or run as admin. Or reinstall into a different directory that doesn't restrict to admin access.
Garbage software
Try using
pacman -Sy --debug -vvv
. If that doesn't say anything interesting, try strace or procmon to find out what exactly is wrong with the locking.
It is not an issue with the locking. It appears as such on retry, because after first attempt pacman leaves the lock file on the disk, thus subsequent attempts refuse to lock.
$ rm -f /var/lib/pacman/db.lck && pacman -Syuu --debug -vvv
debug: pacman v5.2.2 - libalpm v12.0.2
debug: config: attempting to read file /etc/pacman.conf
debug: config: new section 'options'
debug: config: HoldPkg: pacman
debug: config: arch: x86_64
debug: config: SigLevel: Required
debug: config: SigLevel: DatabaseOptional
debug: config: LocalFileSigLevel: Optional
debug: config: new section 'mingw32'
debug: config file /etc/pacman.conf, line 72: including /etc/pacman.d/mirrorlist.mingw32
debug: config: new section 'mingw64'
debug: config file /etc/pacman.conf, line 75: including /etc/pacman.d/mirrorlist.mingw64
debug: config: new section 'msys'
debug: config file /etc/pacman.conf, line 78: including /etc/pacman.d/mirrorlist.msys
debug: config: finished parsing /etc/pacman.conf
debug: setup_libalpm called
debug: option 'logfile' = /var/log/pacman.log
debug: option 'gpgdir' = /etc/pacman.d/gnupg/
debug: option 'hookdir' = /etc/pacman.d/hooks/
debug: option 'cachedir' = /var/cache/pacman/pkg/
debug: registering sync database 'mingw32'
debug: database path for tree mingw32 set to /var/lib/pacman/sync/mingw32.db
debug: GPGME version: 1.14.0-unknown
debug: GPGME engine info: file=/usr/bin/gpg, home=/etc/pacman.d/gnupg/
debug: checking signature for /var/lib/pacman/sync/mingw32.db
debug: 1 signatures returned
debug: fingerprint: 4A6129F4E4B84AE46ED7F635628F528CF3053E04
debug: summary: valid
debug: summary: green
debug: status: Success
debug: timestamp: 1599152759
debug: exp_timestamp: 0
debug: validity: full; reason: Success
debug: key: 87771331B3F1FF5263856A6D974C8BE49078F532, David Macek <[email protected]>, owner_trust unknown, disabled 0
debug: signature is valid
debug: signature is fully trusted
debug: setting usage of 15 for mingw32 repository
debug: adding new server URL to database 'mingw32': http://repo.msys2.org/mingw/i686
debug: adding new server URL to database 'mingw32': https://sourceforge.net/projects/msys2/files/REPOS/MINGW/i686
debug: adding new server URL to database 'mingw32': https://www2.futureware.at/~nickoe/msys2-mirror/mingw/i686
debug: adding new server URL to database 'mingw32': https://mirror.yandex.ru/mirrors/msys2/mingw/i686
debug: adding new server URL to database 'mingw32': https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/i686
debug: adding new server URL to database 'mingw32': http://mirrors.ustc.edu.cn/msys2/mingw/i686
debug: adding new server URL to database 'mingw32': http://mirror.bit.edu.cn/msys2/mingw/i686
debug: adding new server URL to database 'mingw32': https://mirror.selfnet.de/msys2/mingw/i686
debug: registering sync database 'mingw64'
debug: database path for tree mingw64 set to /var/lib/pacman/sync/mingw64.db
debug: checking signature for /var/lib/pacman/sync/mingw64.db
debug: 1 signatures returned
debug: fingerprint: 4A6129F4E4B84AE46ED7F635628F528CF3053E04
debug: summary: valid
debug: summary: green
debug: status: Success
debug: timestamp: 1599152750
debug: exp_timestamp: 0
debug: validity: full; reason: Success
debug: key: 87771331B3F1FF5263856A6D974C8BE49078F532, David Macek <[email protected]>, owner_trust unknown, disabled 0
debug: signature is valid
debug: signature is fully trusted
debug: setting usage of 15 for mingw64 repository
debug: adding new server URL to database 'mingw64': http://repo.msys2.org/mingw/x86_64
debug: adding new server URL to database 'mingw64': https://sourceforge.net/projects/msys2/files/REPOS/MINGW/x86_64
debug: adding new server URL to database 'mingw64': https://www2.futureware.at/~nickoe/msys2-mirror/mingw/x86_64
debug: adding new server URL to database 'mingw64': https://mirror.yandex.ru/mirrors/msys2/mingw/x86_64
debug: adding new server URL to database 'mingw64': https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/x86_64
debug: adding new server URL to database 'mingw64': http://mirrors.ustc.edu.cn/msys2/mingw/x86_64
debug: adding new server URL to database 'mingw64': http://mirror.bit.edu.cn/msys2/mingw/x86_64
debug: adding new server URL to database 'mingw64': https://mirror.selfnet.de/msys2/mingw/x86_64
debug: registering sync database 'msys'
debug: database path for tree msys set to /var/lib/pacman/sync/msys.db
debug: checking signature for /var/lib/pacman/sync/msys.db
debug: 1 signatures returned
debug: fingerprint: 4A6129F4E4B84AE46ED7F635628F528CF3053E04
debug: summary: valid
debug: summary: green
debug: status: Success
debug: timestamp: 1599152769
debug: exp_timestamp: 0
debug: validity: full; reason: Success
debug: key: 87771331B3F1FF5263856A6D974C8BE49078F532, David Macek <[email protected]>, owner_trust unknown, disabled 0
debug: signature is valid
debug: signature is fully trusted
debug: setting usage of 15 for msys repository
debug: adding new server URL to database 'msys': http://repo.msys2.org/msys/x86_64
debug: adding new server URL to database 'msys': https://sourceforge.net/projects/msys2/files/REPOS/MSYS2/x86_64
debug: adding new server URL to database 'msys': https://www2.futureware.at/~nickoe/msys2-mirror/msys/x86_64
debug: adding new server URL to database 'msys': https://mirror.yandex.ru/mirrors/msys2/msys/x86_64
debug: adding new server URL to database 'msys': https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/x86_64
debug: adding new server URL to database 'msys': http://mirrors.ustc.edu.cn/msys2/msys/x86_64
debug: adding new server URL to database 'msys': http://mirror.bit.edu.cn/msys2/msys/x86_64
debug: adding new server URL to database 'msys': https://mirror.selfnet.de/msys2/msys/x86_64
Root : /
Conf File : /etc/pacman.conf
DB Path : /var/lib/pacman/
Cache Dirs: /var/cache/pacman/pkg/
Hook Dirs : /usr/share/libalpm/hooks/ /etc/pacman.d/hooks/
Lock File : /var/lib/pacman/db.lck
Log File : /var/log/pacman.log
GPG Dir : /etc/pacman.d/gnupg/
Targets : None
:: Synchronising package databases...
debug: url: http://repo.msys2.org/mingw/i686/mingw32.db
debug: maxsize: 134217728
debug: using time condition: 1599152757
debug: opened tempfile for download: /var/lib/pacman/sync/mingw32.db.part (wb)
Pacman exits immediately after opening mingw32.db.part
, this file is left on the disk at 0 bytes. db.lck
is also left on the disk.
Above is from fresh install using msys2-x86_64-20200903.exe
on win10.
If you installed in the default location
c:\msys64
the permissions are likely open. But if you installed underC:\Program Files
, write permissions are restricted to admins. Edit the file security on the folder and add your user account to enable Modify permissions. Or run as admin. Or reinstall into a different directory that doesn't restrict to admin access.
This was exactly my case. Thanks!