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

SSL issues preventing installation #667

Open
zaid-ahmed1 opened this issue Jan 15, 2024 · 1 comment
Open

SSL issues preventing installation #667

zaid-ahmed1 opened this issue Jan 15, 2024 · 1 comment

Comments

@zaid-ahmed1
Copy link

zaid-ahmed1 commented Jan 15, 2024

Hello,

I'm working on a company device behind a corporate firewall that seems to be posing some SSL issues (as indicated through the terminal)
Using Ruby 3.2.2 and Rails 7.1.2. However, the installation of Rails doesn't seem to be working without Psych. I've displayed part of the message below, as well as mkmf.log

Getting this error:

ERROR:  SSL verification error at depth 3: self-signed certificate in certificate chain (19)
ERROR:  Root certificate is not trusted 
Installing psych 5.1.2 with native extensions
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libyaml-0.2.5-1-any.pkg.tar.zst' from mirror.msys2.org : SSL certificate problem: self-signed certificate in certificate chain
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libyaml-0.2.5-1-any.pkg.tar.zst' from repo.msys2.org : SSL certificate problem: self-signed certificate in certificate chain
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libyaml-0.2.5-1-any.pkg.tar.zst' from mirror.umd.edu : SSL certificate problem: self-signed certificate in certificate chain
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libyaml-0.2.5-1-any.pkg.tar.zst' from mirror.yandex.ru : Failed to connect to mirror.yandex.ru port 443 after 10011 ms: Timeout was reached
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libyaml-0.2.5-1-any.pkg.tar.zst' from download.nus.edu.sg : SSL certificate problem: self-signed certificate in certificate chain
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libyaml-0.2.5-1-any.pkg.tar.zst' from ftp.acc.umu.se : SSL certificate problem: self-signed certificate in certificate chain
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libyaml-0.2.5-1-any.pkg.tar.zst' from ftp.nluug.nl : SSL certificate problem: self-signed certificate in certificate chain
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libyaml-0.2.5-1-any.pkg.tar.zst' from ftp.osuosl.org : SSL certificate problem: self-signed certificate in certificate chain
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libyaml-0.2.5-1-any.pkg.tar.zst' from mirror.internet.asn.au : SSL certificate problem: self-signed certificate in certificate chain
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libyaml-0.2.5-1-any.pkg.tar.zst' from mirror.selfnet.de : SSL certificate problem: self-signed certificate in certificate chain
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libyaml-0.2.5-1-any.pkg.tar.zst' from mirror.ufro.cl : SSL certificate problem: self-signed certificate in certificate chain
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libyaml-0.2.5-1-any.pkg.tar.zst' from mirrors.dotsrc.org : SSL certificate problem: self-signed certificate in certificate chain
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libyaml-0.2.5-1-any.pkg.tar.zst' from mirrors.bfsu.edu.cn : SSL certificate problem: self-signed certificate in certificate chain
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libyaml-0.2.5-1-any.pkg.tar.zst' from mirrors.tuna.tsinghua.edu.cn : SSL certificate problem: self-signed certificate in certificate chain
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libyaml-0.2.5-1-any.pkg.tar.zst' from mirrors.ustc.edu.cn : SSL certificate problem: self-signed certificate in certificate chain
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libyaml-0.2.5-1-any.pkg.tar.zst' from mirror.nju.edu.cn : SSL certificate problem: self-signed certificate in certificate chain
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libyaml-0.2.5-1-any.pkg.tar.zst' from repo.extreme-ix.org : SSL certificate problem: self-signed certificate in certificate chain
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libyaml-0.2.5-1-any.pkg.tar.zst' from mirrors.hit.edu.cn : SSL certificate problem: self-signed certificate in certificate chain
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libyaml-0.2.5-1-any.pkg.tar.zst' from mirror.clarkson.edu : SSL certificate problem: self-signed certificate in certificate chain
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libyaml-0.2.5-1-any.pkg.tar.zst' from quantum-mirror.hu : SSL certificate problem: self-signed certificate in certificate chain
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libyaml-0.2.5-1-any.pkg.tar.zst' from mirror2.sandyriver.net : Could not resolve host: mirror2.sandyriver.net
warning: too many errors from mirror2.sandyriver.net, skipping for the remainder of this transaction
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libyaml-0.2.5-1-any.pkg.tar.zst' from mirror.archlinux.tw : SSL certificate problem: self-signed certificate in certificate chain
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libyaml-0.2.5-1-any.pkg.tar.zst' from fastmirror.pp.ua : Failed to connect to fastmirror.pp.ua port 443 after 10004 ms: Timeout was reached
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libyaml-0.2.5-1-any.pkg.tar.zst' from ftp.cc.uoc.gr : SSL certificate problem: self-signed certificate in certificate chain
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libyaml-0.2.5-1-any.pkg.tar.zst' from mirror.jmu.edu : SSL certificate problem: self-signed certificate in certificate chain
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libyaml-0.2.5-1-any.pkg.tar.zst' from mirrors.piconets.webwerks.in : SSL certificate problem: self-signed certificate in certificate chain
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libyaml-0.2.5-1-any.pkg.tar.zst' from www2.futureware.at : SSL certificate problem: self-signed certificate in certificate chain
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libyaml-0.2.5-1-any.pkg.tar.zst' from mirrors.sjtug.sjtu.edu.cn : SSL certificate problem: self-signed certificate in certificate chain
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libyaml-0.2.5-1-any.pkg.tar.zst' from mirrors.bit.edu.cn : SSL certificate problem: self-signed certificate in certificate chain
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libyaml-0.2.5-1-any.pkg.tar.zst' from repo.casualgamer.ca : Could not resolve host: repo.casualgamer.ca
warning: too many errors from repo.casualgamer.ca, skipping for the remainder of this transaction
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libyaml-0.2.5-1-any.pkg.tar.zst' from mirrors.aliyun.com : SSL certificate problem: self-signed certificate in certificate chain
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libyaml-0.2.5-1-any.pkg.tar.zst' from mirror.iscas.ac.cn : SSL certificate problem: self-signed certificate in certificate chain
error: failed retrieving file 'mingw-w64-ucrt-x86_64-libyaml-0.2.5-1-any.pkg.tar.zst' from mirrors.tencent.com : SSL certificate problem: self-signed certificate in certificate chain
warning: failed to retrieve some files
error: failed to commit transaction (download library error)
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/psych-5.1.2/ext/psych
C:/Ruby32-x64/bin/ruby.exe extconf.rb
checking for yaml.h... no
yaml.h not found
*** 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.

The issue is only on the Psych gem, and on Rails version 7.1.2. It doesn't show up for previous versions.

Thank you.

mkmf.log:

PATH=" "
package configuration for yaml-0.1 is not found
find_header: checking for yaml.h... -------------------- no

PATH=" "gcc -o conftest.exe -IC:/Ruby32-x64/include/ruby-3.2.0/x64-mingw-ucrt -IC:/Ruby32-x64/include/ruby-3.2.0/ruby/backward -IC:/Ruby32-x64/include/ruby-3.2.0 -I. -D__USE_MINGW_ANSI_STDIO=1 -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0600 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64  -DYAML_DECLARE_STATIC -O3 -fno-fast-math -fstack-protector-strong conftest.c  -L. -LC:/Ruby32-x64/lib -L. -pipe -s -fstack-protector-strong -Wl,--no-as-needed  -m64   -lx64-ucrt-ruby320  -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi -lbcrypt  "
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <winsock2.h>
4: #include <windows.h>
5: int main(int argc, char **argv)
6: {
7:   return !!argv[argc];
8: }
/* end */

PATH=""
conftest.c:5:10: fatal error: yaml.h: No such file or directory
    5 | #include <yaml.h>
      |          ^~~~~~~~
compilation terminated.
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <winsock2.h>
4: #include <windows.h>
5: #include <yaml.h>
/* end */

@deepracercve
Copy link

Setting environment variable SSL_CERT_FILE doesn't work either.

Confirmed; Version 5.x doesn't work. Version 4.0.6 works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants