pacman -Syuu : error: failed retrieving file ("Operation too slow" and "SSL certificate problem")
Asked Answered
P

4

13

I am having troubles when trying to upgrade my Portable Msys2 under Win 10 with pacman -Syuu, as detailed below. I did this before with no problem.

What could the problem and solution be?

$ pacman -Syuu
:: Synchronizing package databases...
 mingw32 is up to date
 mingw64 is up to date
 msys is up to date
:: Starting core system upgrade...
 there is nothing to do
:: Starting full system upgrade...
warning: grep: downgrading from version 3.1-1 to version 3.0-2
warning: libgc: downgrading from version 8.0.0-1 to version 7.6.8-1
warning: mingw-w64-x86_64-binutils: downgrading from version 2.31.1-2 to version 2.30-5
:: Replace mingw-w64-x86_64-minizip with mingw64/mingw-w64-x86_64-zlib? [Y/n] y
:: Replace mingw-w64-x86_64-vulkan with mingw64/mingw-w64-x86_64-vulkan-loader? [Y/n] y
resolving dependencies...
looking for conflicting packages...

Packages (217) autogen-5.18.16-1  bison-3.3.2-1  brotli-1.0.7-1  ca-certificates-20180409-1  cmake-3.13.2-1  curl-7.64.0-2  diffutils-3.7-1  doxygen-1.8.15-1
...

Total Download Size:   1400.65 MiB
Total Installed Size:  9648.15 MiB
Net Upgrade Size:       261.06 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
error: failed retrieving file 'mingw-w64-x86_64-qt5-5.12.1-5-any.pkg.tar.xz' from repo.msys2.org : Operation too slow. Less than 1 bytes/sec transferred the last 10 seconds
error: failed retrieving file 'mingw-w64-x86_64-qt5-5.12.1-5-any.pkg.tar.xz' from sourceforge.net : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-x86_64-qt5-5.12.1-5-any.pkg.tar.xz' from www2.futureware.at : Operation too slow. Less than 1 bytes/sec transferred the last 10 seconds
error: failed retrieving file 'mingw-w64-x86_64-qt5-5.12.1-5-any.pkg.tar.xz' from mirror.yandex.ru : SSL certificate problem: unable to get local issuer certificate
warning: failed to retrieve some files
error: failed to commit transaction (download library error)
Errors occurred, no packages were upgraded.

As per this, my repo configuration seems to be ok:

$ pacman-conf.exe
[options]
RootDir = /
DBPath = /var/lib/pacman/
CacheDir = /var/cache/pacman/pkg/
HookDir = /etc/pacman.d/hooks/
GPGDir = /etc/pacman.d/gnupg/
LogFile = /var/log/pacman.log
HoldPkg = pacman
Architecture = i686
CheckSpace
UseDelta = 0.000000
CleanMethod = KeepInstalled
SigLevel = PackageRequired
SigLevel = PackageTrustedOnly
SigLevel = DatabaseOptional
SigLevel = DatabaseTrustedOnly
LocalFileSigLevel = PackageOptional
LocalFileSigLevel = PackageTrustedOnly
[mingw32]
Usage = All
Server = http://repo.msys2.org/mingw/i686/
Server = https://sourceforge.net/projects/msys2/files/REPOS/MINGW/i686/
Server = http://www2.futureware.at/~nickoe/msys2-mirror/mingw/i686/
Server = https://mirror.yandex.ru/mirrors/msys2/mingw/i686/
[mingw64]
Usage = All
Server = http://repo.msys2.org/mingw/x86_64/
Server = https://sourceforge.net/projects/msys2/files/REPOS/MINGW/x86_64/
Server = http://www2.futureware.at/~nickoe/msys2-mirror/mingw/x86_64/
Server = https://mirror.yandex.ru/mirrors/msys2/mingw/x86_64/
[msys]
Usage = All
Server = http://repo.msys2.org/msys/i686/
Server = https://sourceforge.net/projects/msys2/files/REPOS/MSYS2/i686/
Server = http://www2.futureware.at/~nickoe/msys2-mirror/msys/i686/
Server = https://mirror.yandex.ru/mirrors/msys2/msys/i686/

Related:

https://github.com/msys2/MINGW-packages/issues/1887

https://bbs.archlinux.org/viewtopic.php?id=199693

https://sourceforge.net/p/msys2/discussion/general/thread/8427aab0/


EDIT It was suggested in a comment that I execute pacman-mirrors ... There seems to be no such executable in my system (either script, alias, etc.) On the other hand, it seems I already have pacman-mirrors, and that it does not provide any executable (at least in msys2). Is this correct?
$ updatedb
$ locate pacman-mirrors
/var/cache/pacman/pkg/pacman-mirrors-20180604-2-any.pkg.tar.xz
/var/lib/pacman/local/pacman-mirrors-20180604-2
/var/lib/pacman/local/pacman-mirrors-20180604-2/desc
/var/lib/pacman/local/pacman-mirrors-20180604-2/files
/var/lib/pacman/local/pacman-mirrors-20180604-2/mtree
$ pacman -Ql pacman-mirrors
pacman-mirrors /etc/
pacman-mirrors /etc/pacman.d/
pacman-mirrors /etc/pacman.d/mirrorlist.mingw32
pacman-mirrors /etc/pacman.d/mirrorlist.mingw64
pacman-mirrors /etc/pacman.d/mirrorlist.msys
$ pacman --needed -S bash pacman pacman-mirrors msys2-runtime
warning: bash-4.4.023-1 is up to date -- skipping
warning: pacman-5.1.2-2 is up to date -- skipping
warning: pacman-mirrors-20180604-2 is up to date -- skipping
warning: msys2-runtime-2.11.2-1 is up to date -- skipping
Preamble answered 13/3, 2019 at 12:37 Comment(6)
Have you tried loading the certificates again - sudo pacman -U /var/cache/pacman/pkg/ca-certificates*Shaunteshave
Could also be an issue with the mirror? you could change the mirror - sudo pacman-mirrors -f5 && sudo pacman -SyyuShaunteshave
Some commands may help. 1. pacman-key --init 2. pacman-key --populate.Benildas
@Shaunteshave - pacman -U ... did not help.Preamble
@Benildas - I tried both commands, I get the same result.Preamble
@Shaunteshave - I seem to have pacman-mirrors installed, but with no executable, script, etc.Preamble
U
18

You can disable the timeout of pacman with the parameter --disable-download-timeout. Then you should be able to download

http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-qt5-5.12.1-5-any.pkg.tar.xz

It's described on the man-page for pacman.

Also --gpgdir to Specify a directory of files used by GnuPG to verify package signatures might be useful.

Additional you can consider using the parameter --noconfirm to bypass any and all “Are you sure?” messages.

About the certificates I'm not sure, perhaps the local paths are not configured correctly. Nevertheless you've two domains, that still serve by http.


In browser the download works btw. it just has finished, the screenshot is still showing the download in progress:

enter image description here

Ulcerative answered 13/4, 2019 at 13:49 Comment(1)
Adding --disable-download-timeout was enough to have it working.Preamble
W
1

I've also faced this problem but I got the solution: Open Add or Remove Softwares and go to Preferences and then change your official repositories to Canada then Refresh mirror lists

It may work now

Wellestablished answered 16/2, 2021 at 16:47 Comment(0)
I
1

The MinGW FAQ covers the case when your company MitMs TLS/SSL certificates:

  1. extract the certificate of https://repo.msys2.org from your browser
  2. place it in /etc/pki/ca-trust/source/anchors
  3. run update-ca-trust

However, this may not be enough. A MSYS issue states you must also copy files as such:

cp -f /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem /usr/ssl/certs/ca-bundle.crt
cp -f /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem /usr/ssl/cert.pem
cp -f /etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt /usr/ssl/certs/ca-bundle.trust.crt
Innes answered 5/4, 2023 at 11:25 Comment(0)
M
-1

The following were the steps I used to solve the problem;

  1. sudo nano /etc/pacman.d/mirrorlist (to open the mirror list on manjaro or any arch based distro)

  2. In the mirror list, all the source servers will be active. Put a hash at the beginning of each line of a selected active server to prevent the server from being contacted during the download process. You don't need all of the servers to be active, so only allow countries close to you and place a hash in front of all other servers that aren't.

## Generated on 2022-08-16 12:13
##
## Please use 'pacman-mirrors -f [NUMBER] [NUMBER]' to modify mirrorlist
## (Use 0 for all mirrors)
##
## Country : Poland
#   Server = https://mirror.tuchola-dc.pl/manjaro/stable/$repo/$arch

## Country : Hungary
#  Serve<p>r = http://mirror.infotronik.hu/mirrors/pub/manjaro/stable/$repo/$arch

## Country : Germany
Server = http://ftp.tu-chemnitz.de/pub/linux/manjaro/stable/$repo/$arch

## Country : Brazil
#   Server = http://linorg.usp.br/manjaro/stable/$repo/$arch

## Country : Costa_Rica
#   Server = https://mirrors.ucr.ac.cr/manjaro/stable/$repo/$arch

## Country : Australia
Server = http://mirror.ventraip.net.au/Manjaro/stable/$repo/$arch
## Country : Australia
Server = http://mirror.ventraip.net.au/Manjaro/stable/$repo/$arch

## Country : Germany
Server = http://ftp.rz.tu-bs.de/pub/mirror/manjaro.org/repos/stable/$repo/$arch

## Country : Germany
Server = https://repo.rhindon.net/manjaro/stable/$repo/$arch

## Country : Brazil
#Server = https://manjaro.c3sl.ufpr.br/stable/$repo/$arch

## Country : United_States
Server = https://mirror.math.princeton.edu/pub/manjaro/stable/$repo/$arch

## Country : Poland
#Server = http://mirror.chmuri.net/manjaro/stable/$repo/$arch

## Country : China
#Server = https://mirrors.sjtug.sjtu.edu.cn/manjarostable/$repo/$arch

## Country : China</p>
#Server = https://mirrors.ustc.edu.cn/manjaro/stable/$repo/$arch

## Country : Germany
Server =https://mirror.netzspielplatz.de/manjaro/packages/stable/$repo/$arch```

Miracle answered 21/11, 2022 at 19:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.