Home > front end >  Unable to mysql2 gem on windows 11 due to SSL issues - all other gems work
Unable to mysql2 gem on windows 11 due to SSL issues - all other gems work

Time:09-19

I'm trying to install the mysql2 gem using RoR 8.16.0, and I keep on getting SSL errors. I've made sure all my certs are installed correctly. I have no issues with any other gems, and I can't seem to find the problem. Pretty frustrating, as I can't get any work done without my DB.

I ran:

gem install mysql2

here is the result:

Temporarily enhancing PATH for MSYS/MINGW...
Installing required msys2 packages: mingw-w64-ucrt-x86_64-libmariadbclient
error: failed retrieving file 'mingw-w64-ucrt-x86_64-openssl-1.1.1.n-1-any.pkg.tar.zst' from mirror.msys2.org : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libxml2-2.9.13-1-any.pkg.tar.zst' from mirror.msys2.org : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-curl-7.82.0-1-any.pkg.tar.zst' from mirror.msys2.org : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from mirror.msys2.org, skipping for the remainder of this transaction
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libunistring-0.9.10-4-any.pkg.tar.zst' from mirror.msys2.org : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-brotli-1.0.9-4-any.pkg.tar.zst' from mirror.msys2.org : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-openssl-1.1.1.n-1-any.pkg.tar.zst' from repo.msys2.org : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libxml2-2.9.13-1-any.pkg.tar.zst' from repo.msys2.org : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-curl-7.82.0-1-any.pkg.tar.zst' from repo.msys2.org : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from repo.msys2.org, skipping for the remainder of this transaction
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libunistring-0.9.10-4-any.pkg.tar.zst' from download.nus.edu.sg : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-brotli-1.0.9-4-any.pkg.tar.zst' from download.nus.edu.sg : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-openssl-1.1.1.n-1-any.pkg.tar.zst' from ftp.acc.umu.se : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libxml2-2.9.13-1-any.pkg.tar.zst' from ftp.acc.umu.se : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-curl-7.82.0-1-any.pkg.tar.zst' from ftp.acc.umu.se : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from ftp.acc.umu.se, skipping for the remainder of this transaction
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libunistring-0.9.10-4-any.pkg.tar.zst' from ftp.acc.umu.se : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-brotli-1.0.9-4-any.pkg.tar.zst' from ftp.acc.umu.se : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-openssl-1.1.1.n-1-any.pkg.tar.zst' from ftp.nluug.nl : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libxml2-2.9.13-1-any.pkg.tar.zst' from ftp.nluug.nl : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-curl-7.82.0-1-any.pkg.tar.zst' from ftp.nluug.nl : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from ftp.nluug.nl, skipping for the remainder of this transaction
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libunistring-0.9.10-4-any.pkg.tar.zst' from ftp.nluug.nl : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-brotli-1.0.9-4-any.pkg.tar.zst' from ftp.nluug.nl : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-openssl-1.1.1.n-1-any.pkg.tar.zst' from ftp.osuosl.org : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libxml2-2.9.13-1-any.pkg.tar.zst' from ftp.osuosl.org : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-curl-7.82.0-1-any.pkg.tar.zst' from ftp.osuosl.org : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from ftp.osuosl.org, skipping for the remainder of this transaction
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libunistring-0.9.10-4-any.pkg.tar.zst' from ftp.osuosl.org : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-brotli-1.0.9-4-any.pkg.tar.zst' from ftp.osuosl.org : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-openssl-1.1.1.n-1-any.pkg.tar.zst' from mirror.internet.asn.au : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libxml2-2.9.13-1-any.pkg.tar.zst' from mirror.internet.asn.au : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-curl-7.82.0-1-any.pkg.tar.zst' from mirror.internet.asn.au : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from mirror.internet.asn.au, skipping for the remainder of this transaction
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libunistring-0.9.10-4-any.pkg.tar.zst' from mirror.internet.asn.au : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-brotli-1.0.9-4-any.pkg.tar.zst' from mirror.internet.asn.au : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-openssl-1.1.1.n-1-any.pkg.tar.zst' from mirror.selfnet.de : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libxml2-2.9.13-1-any.pkg.tar.zst' from mirror.selfnet.de : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-curl-7.82.0-1-any.pkg.tar.zst' from mirror.selfnet.de : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from mirror.selfnet.de, skipping for the remainder of this transaction
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libunistring-0.9.10-4-any.pkg.tar.zst' from mirror.selfnet.de : SSL certificate problem: unable to get local issuer certificate
from mirrors.dotsrc.org : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-curl-7.82.0-1-any.pkg.tar.zst' from mirrors.dotsrc.org : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from mirrors.dotsrc.org, skipping for the remainder of this transaction
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libunistring-0.9.10-4-any.pkg.tar.zst' from mirrors.dotsrc.org : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-brotli-1.0.9-4-any.pkg.tar.zst' from mirrors.dotsrc.org : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-openssl-1.1.1.n-1-any.pkg.tar.zst' from mirrors.bfsu.edu.cn : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libxml2-2.9.13-1-any.pkg.tar.zst' from mirrors.bfsu.edu.cn : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-curl-7.82.0-1-any.pkg.tar.zst' from mirrors.bfsu.edu.cn : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from mirrors.bfsu.edu.cn, skipping for the remainder of this transaction
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libunistring-0.9.10-4-any.pkg.tar.zst' from mirrors.bfsu.edu.cn : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-brotli-1.0.9-4-any.pkg.tar.zst' from mirrors.bfsu.edu.cn : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-openssl-1.1.1.n-1-any.pkg.tar.zst' from mirrors.tuna.tsinghua.edu.cn : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libxml2-2.9.13-1-any.pkg.tar.zst' from mirrors.tuna.tsinghua.edu.cn : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-curl-7.82.0-1-any.pkg.tar.zst' from mirrors.tuna.tsinghua.edu.cn : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from mirrors.tuna.tsinghua.edu.cn, skipping for the remainder of this transaction
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libunistring-0.9.10-4-any.pkg.tar.zst' from mirrors.tuna.tsinghua.edu.cn : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-brotli-1.0.9-4-any.pkg.tar.zst' from mirrors.tuna.tsinghua.edu.cn : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-openssl-1.1.1.n-1-any.pkg.tar.zst' from mirrors.ustc.edu.cn : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libxml2-2.9.13-1-any.pkg.tar.zst' from mirrors.ustc.edu.cn : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-curl-7.82.0-1-any.pkg.tar.zst' from mirrors.ustc.edu.cn : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from mirrors.ustc.edu.cn, skipping for the remainder of this transaction
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libunistring-0.9.10-4-any.pkg.tar.zst' from mirrors.ustc.edu.cn : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-brotli-1.0.9-4-any.pkg.tar.zst' from mirrors.ustc.edu.cn : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-openssl-1.1.1.n-1-any.pkg.tar.zst' from mirror.nju.edu.cn : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libxml2-2.9.13-1-any.pkg.tar.zst' from mirror.nju.edu.cn : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-curl-7.82.0-1-any.pkg.tar.zst' from mirror.nju.edu.cn : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from mirror.nju.edu.cn, skipping for the remainder of this transaction
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libunistring-0.9.10-4-any.pkg.tar.zst' from mirror.nju.edu.cn : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-brotli-1.0.9-4-any.pkg.tar.zst' from mirror.nju.edu.cn : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-openssl-1.1.1.n-1-any.pkg.tar.zst' from repo.extreme-ix.org : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libxml2-2.9.13-1-any.pkg.tar.zst' from repo.extreme-ix.org : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-curl-7.82.0-1-any.pkg.tar.zst' from repo.extreme-ix.org : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from repo.extreme-ix.org, skipping for the remainder of this transaction
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libunistring-0.9.10-4-any.pkg.tar.zst' from repo.extreme-ix.org : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-brotli-1.0.9-4-any.pkg.tar.zst' from repo.extreme-ix.org : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-openssl-1.1.1.n-1-any.pkg.tar.zst' from mirrors.hit.edu.cn : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libxml2-2.9.13-1-any.pkg.tar.zst' from mirrors.hit.edu.cn : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-curl-7.82.0-1-any.pkg.tar.zst' from mirrors.hit.edu.cn : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from mirrors.hit.edu.cn, skipping for the remainder of this transaction
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libunistring-0.9.10-4-any.pkg.tar.zst' from mirrors.hit.edu.cn : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-brotli-1.0.9-4-any.pkg.tar.zst' from mirrors.hit.edu.cn : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-openssl-1.1.1.n-1-any.pkg.tar.zst' from mirror.clarkson.edu : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libxml2-2.9.13-1-any.pkg.tar.zst' from mirror.clarkson.edu : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-curl-7.82.0-1-any.pkg.tar.zst' from mirror.clarkson.edu : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from mirror.clarkson.edu, skipping for the remainder of this transaction
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libunistring-0.9.10-4-any.pkg.tar.zst' from mirror.clarkson.edu : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-brotli-1.0.9-4-any.pkg.tar.zst' from mirror.clarkson.edu : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-openssl-1.1.1.n-1-any.pkg.tar.zst' from fastmirror.pp.ua : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libxml2-2.9.13-1-any.pkg.tar.zst' from fastmirror.pp.ua : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-curl-7.82.0-1-any.pkg.tar.zst' from fastmirror.pp.ua : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from fastmirror.pp.ua, skipping for the remainder of this transaction
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libunistring-0.9.10-4-any.pkg.tar.zst' from fastmirror.pp.ua : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-brotli-1.0.9-4-any.pkg.tar.zst' from fastmirror.pp.ua : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-openssl-1.1.1.n-1-any.pkg.tar.zst' from ftp.cc.uoc.gr : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libxml2-2.9.13-1-any.pkg.tar.zst' from ftp.cc.uoc.gr : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-curl-7.82.0-1-any.pkg.tar.zst' from ftp.cc.uoc.gr : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from ftp.cc.uoc.gr, skipping for the remainder of this transaction
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libunistring-0.9.10-4-any.pkg.tar.zst' from ftp.cc.uoc.gr : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-brotli-1.0.9-4-any.pkg.tar.zst' from ftp.cc.uoc.gr : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-openssl-1.1.1.n-1-any.pkg.tar.zst' from mirror.jmu.edu : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libxml2-2.9.13-1-any.pkg.tar.zst' from mirror.jmu.edu : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-curl-7.82.0-1-any.pkg.tar.zst' from mirror.jmu.edu : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from mirror.jmu.edu, skipping for the remainder of this transaction
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libunistring-0.9.10-4-any.pkg.tar.zst' from mirror.jmu.edu : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-brotli-1.0.9-4-any.pkg.tar.zst' from mirror.jmu.edu : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-openssl-1.1.1.n-1-any.pkg.tar.zst' from mirrors.piconets.webwerks.in : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libxml2-2.9.13-1-any.pkg.tar.zst' from mirrors.piconets.webwerks.in : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-curl-7.82.0-1-any.pkg.tar.zst' from mirrors.piconets.webwerks.in : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from mirrors.piconets.webwerks.in, skipping for the remainder of this transaction
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libunistring-0.9.10-4-any.pkg.tar.zst' from mirrors.piconets.webwerks.in : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-brotli-1.0.9-4-any.pkg.tar.zst' from mirrors.piconets.webwerks.in : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-openssl-1.1.1.n-1-any.pkg.tar.zst' from quantum-mirror.hu : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libxml2-2.9.13-1-any.pkg.tar.zst' from quantum-mirror.hu : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-curl-7.82.0-1-any.pkg.tar.zst' from quantum-mirror.hu : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from quantum-mirror.hu, skipping for the remainder of this transaction
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libunistring-0.9.10-4-any.pkg.tar.zst' from quantum-mirror.hu : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-brotli-1.0.9-4-any.pkg.tar.zst' from quantum-mirror.hu : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-openssl-1.1.1.n-1-any.pkg.tar.zst' from www2.futureware.at : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libxml2-2.9.13-1-any.pkg.tar.zst' from www2.futureware.at : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-curl-7.82.0-1-any.pkg.tar.zst' from www2.futureware.at : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from www2.futureware.at, skipping for the remainder of this transaction
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libunistring-0.9.10-4-any.pkg.tar.zst' from www2.futureware.at : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-brotli-1.0.9-4-any.pkg.tar.zst' from www2.futureware.at : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-openssl-1.1.1.n-1-any.pkg.tar.zst' from mirrors.sjtug.sjtu.edu.cn : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libxml2-2.9.13-1-any.pkg.tar.zst' from mirrors.sjtug.sjtu.edu.cn : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-curl-7.82.0-1-any.pkg.tar.zst' from mirrors.sjtug.sjtu.edu.cn : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from mirrors.sjtug.sjtu.edu.cn, skipping for the remainder of this transaction
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libunistring-0.9.10-4-any.pkg.tar.zst' from mirrors.sjtug.sjtu.edu.cn : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-brotli-1.0.9-4-any.pkg.tar.zst' from mirrors.sjtug.sjtu.edu.cn : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-openssl-1.1.1.n-1-any.pkg.tar.zst' from mirrors.bit.edu.cn : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libxml2-2.9.13-1-any.pkg.tar.zst' from mirrors.bit.edu.cn : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-curl-7.82.0-1-any.pkg.tar.zst' from mirrors.bit.edu.cn : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from mirrors.bit.edu.cn, skipping for the remainder of this transaction
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libunistring-0.9.10-4-any.pkg.tar.zst' from mirrors.bit.edu.cn : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-brotli-1.0.9-4-any.pkg.tar.zst' from mirrors.bit.edu.cn : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-openssl-1.1.1.n-1-any.pkg.tar.zst' from repo.casualgamer.ca : SSL certificate problem: self signed certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libxml2-2.9.13-1-any.pkg.tar.zst' from repo.casualgamer.ca : SSL certificate problem: self signed certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-brotli-1.0.9-4-any.pkg.tar.zst' from mirrors.aliyun.com : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-openssl-1.1.1.n-1-any.pkg.tar.zst' from mirror.iscas.ac.cn : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libxml2-2.9.13-1-any.pkg.tar.zst' from mirror.iscas.ac.cn : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-curl-7.82.0-1-any.pkg.tar.zst' from mirror.iscas.ac.cn : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from mirror.iscas.ac.cn, skipping for the remainder of this transaction
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libunistring-0.9.10-4-any.pkg.tar.zst' from mirror.iscas.ac.cn : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'mingw-w64-ucrt-x86_64-brotli-1.0.9-4-any.pkg.tar.zst' from mirror.iscas.ac.cn : SSL certificate problem: unable to get local issuer certificate
warning: failed to retrieve some files
error: failed to commit transaction (download library error)
pacman failed with the following output:
resolving dependencies...
looking for conflicting packages...

Packages (18) mingw-w64-ucrt-x86_64-brotli-1.0.9-4  mingw-w64-ucrt-x86_64-c-ares-1.18.1-1  mingw-w64-ucrt-x86_64-ca-certificates-20210119-1  mingw-w64-ucrt-x86_64-curl-7.82.0-1  mingw-w64-ucrt-x86_64-jansson-2.14-2  mingw-w64-ucrt-x86_64-jemalloc-5.2.1-2  mingw-w64-ucrt-x86_64-libffi-3.3-4  mingw-w64-ucrt-x86_64-libidn2-2.3.2-1  mingw-w64-ucrt-x86_64-libpsl-0.21.1-4  mingw-w64-ucrt-x86_64-libssh2-1.10.0-1  mingw-w64-ucrt-x86_64-libtasn1-4.18.0-1  mingw-w64-ucrt-x86_64-libunistring-0.9.10-4  mingw-w64-ucrt-x86_64-libxml2-2.9.13-1  mingw-w64-ucrt-x86_64-nghttp2-1.47.0-1  mingw-w64-ucrt-x86_64-openssl-1.1.1.n-1  mingw-w64-ucrt-x86_64-p11-kit-0.24.1-2  mingw-w64-ucrt-x86_64-xz-5.2.5-2  mingw-w64-ucrt-x86_64-libmariadbclient-3.1.13-1

Total Download Size:    11.23 MiB
Total Installed Size:  105.74 MiB

:: Proceed with installation? [Y/n]
:: Retrieving packages...
 mingw-w64-ucrt-x86_64-openssl-1.1.1.n-1-any downloading...
 mingw-w64-ucrt-x86_64-libxml2-2.9.13-1-any downloading...
 mingw-w64-ucrt-x86_64-curl-7.82.0-1-any downloading...
 mingw-w64-ucrt-x86_64-libunistring-0.9.10-4-any downloading...
 mingw-w64-ucrt-x86_64-brotli-1.0.9-4-any downloading...
Errors occurred, no packages were upgraded.
Building native extensions. This could take a while...
ERROR:  Error installing mysql2:
        ERROR: Failed to build gem native extension.

    current directory: C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mysql2-0.5.4/ext/mysql2
C:/Ruby31-x64/bin/ruby.exe -I C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0 extconf.rb
checking for rb_absint_size()... yes
checking for rb_absint_singlebit_p()... yes
checking for rb_wait_for_single_fd()... yes
checking for rb_enc_interned_str() in ruby.h... yes
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=C:/Ruby31-x64/bin/$(RUBY_BASE_NAME)
        --with-mysql-dir
        --without-mysql-dir
        --with-mysql-include
        --without-mysql-include=${mysql-dir}/include
        --with-mysql-lib
        --without-mysql-lib=${mysql-dir}/lib
        --with-mysql-config
        --without-mysql-config
        --with-mysqlclient-dir
        --without-mysqlclient-dir
        --with-mysqlclient-include
        --without-mysqlclient-include=${mysqlclient-dir}/include
        --with-mysqlclient-lib
        --without-mysqlclient-lib=${mysqlclient-dir}/lib
        --with-mysqlclientlib
        --without-mysqlclientlib
C:/Ruby31-x64/lib/ruby/3.1.0/mkmf.rb:1086:in `block in find_library': undefined method `split' for nil:NilClass (NoMethodError)

    paths = paths.flat_map {|path| path.split(File::PATH_SEPARATOR)}
                                       ^^^^^^
        from C:/Ruby31-x64/lib/ruby/3.1.0/mkmf.rb:1086:in `each'
        from C:/Ruby31-x64/lib/ruby/3.1.0/mkmf.rb:1086:in `flat_map'
        from C:/Ruby31-x64/lib/ruby/3.1.0/mkmf.rb:1086:in `find_library'
        from extconf.rb:103:in `<main>'

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  C:/Ruby31-x64/lib/ruby/gems/3.1.0/extensions/x64-mingw-ucrt/3.1.0/mysql2-0.5.4/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mysql2-0.5.4 for inspection.
Results logged to C:/Ruby31-x64/lib/ruby/gems/3.1.0/extensions/x64-mingw-ucrt/3.1.0/mysql2-0.5.4/gem_make.out

I would really appreciate some help! Thanks in Advance!

CodePudding user response:

I finally figured it out. There were 2 issues:

  1. I'm using a company certificate that I originally installed in ruby & rubygems dir. Apparently, that was enough for all the other gems I installed. As per this post, I also needed to install the cert in the mingw cert dir, by copying the cert to C:\Ruby-x64\msys64\usr\ssl\certs\ca-bundle.crt. For some reason, this affected the mysql2 gem.

  2. As per the mysql2 gem, according to this answer, (the part that discusses mysql2 gem specifically), running gem install mysql2 was not enough. I had to run

    gem install mysql2 -- '--with-mysql-lib="c:\Program Files\MySQL\MySQL Server 8.0\lib" --with-mysql-include="c:\Program Files\MySQL\MySQL Server 8.0\include"'

Whew!

  • Related