English 中文(简体)
鲁贝·2.7.5在MacOS Ventura失败 *** 延期后没有编辑:开放式: 不能混淆。 没有安装
原标题:Install of Ruby 2.7.5 fails on Mac OS Ventura *** Following extensions are not compiled: openssl: Could not be configured. It will not be installed

I am trying to install an older version of Ruby so that I can use react native .70 I am hitting a few errors. I would appreciate any help getting this to work. I issued this command so that openssl 1.1 would be used:

    CONFIG_PATH=/usr/local/opt/openssl@1.1/lib/pkgconfig rvm reinstall 2.7.5 --with-openssl-lib=/usr/local/opt/openssl@1.1 --with-openssl-include=/usr/local/opt/openssl@1.1

The Ruby install fails. The log lists the error I mention in the title then refers me to the ext/openssl/mkmf.log That log lists several errors:

    conftest.c:14:57: error: use of undeclared identifier  t_open 
     t(void) { void ((*volatile p)()); p = (void ((*)()))t_open; return !p; }
                                                            ^
    1 error generated.
    checked program was:
    /* begin */
     1: #include "ruby.h"
     2:
     3: /*top*/
     4: extern int t(void);
     5: int main(int argc, char **argv)
     6: {
     7:   if (argc > 1000000) {
     8:     int (* volatile tp)(void)=(int (*)(void))&t;
     9:     printf("%d", (*tp)());
    10:   }
    11:
    12:   return !!argv[argc];
    13: }
    14: int t(void) { void ((*volatile p)()); p = (void ((*)()))t_open; return !p; }

----------------





ld: library not found for -lnsl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
checked program was:
/* begin */
 1: #include "ruby.h"
 2:
 3: /*top*/
 4: extern int t(void);
 5: int main(int argc, char **argv)
 6: {
 7:   if (argc > 1000000) {
 8:     int (* volatile tp)(void)=(int (*)(void))&t;
 9:     printf("%d", (*tp)());
10:   }
11:
12:   return !!argv[argc];
13: }
14: extern void t_open();
15: int t(void) { t_open(); return 0; }
/* end */

------------------------
conftest.c:14:57: error: use of undeclared identifier  socket 
int t(void) { void ((*volatile p)()); p = (void ((*)()))socket; return !p; }
                                                        ^
1 error generated.
checked program was:
/* begin */
 1: #include "ruby.h"
 2:
 3: /*top*/
 4: extern int t(void);
 5: int main(int argc, char **argv)
 6: {
 7:   if (argc > 1000000) {
 8:     int (* volatile tp)(void)=(int (*)(void))&t;
 9:     printf("%d", (*tp)());
10:   }
11:
12:   return !!argv[argc];
13: }
14: int t(void) { void ((*volatile p)()); p = (void ((*)()))socket; return !p; }
/* end */

-----------------------------

ld: library not found for -lsocket
clang: error: linker command failed with exit code 1 (use -v to see invocation)
checked program was:
/* begin */
 1: #include "ruby.h"
 2:
 3: /*top*/
 4: extern int t(void);
 5: int main(int argc, char **argv)
 6: {
 7:   if (argc > 1000000) {
 8:     int (* volatile tp)(void)=(int (*)(void))&t;
 9:     printf("%d", (*tp)());
10:   }
11:
12:   return !!argv[argc];
13: }
14: extern void socket();
15: int t(void) { socket(); return 0; }
/* end */

--------------------
conftest.c:6:3: error:
# error
  ^
conftest.c:7:1: error: expected identifier or  ( 
|:/ === LIBRESSL_VERSION_NUMBER undefined === /:|
^
2 errors generated.
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <openssl/opensslv.h>
4: /*top*/
5: #ifndef LIBRESSL_VERSION_NUMBER
6: # error
7: |:/ === LIBRESSL_VERSION_NUMBER undefined === /:|
8: #endif
/* end */

---------------

 
/Users/dcent/.rvm/src/ruby-2.7.5/ext/openssl/extconf.rb:111: OpenSSL >= 1.0.1, < 3.0.0 or LibreSSL >= 2.5.0 is required
        /Users/dcent/.rvm/src/ruby-2.7.5/ext/openssl/extconf.rb:111:in `<top (required)> 
        ./ext/extmk.rb:214:in `load 
        ./ext/extmk.rb:214:in `block in extmake 
        /Users/dcent/.rvm/src/ruby-2.7.5/lib/mkmf.rb:331:in `open 
        ./ext/extmk.rb:210:in `extmake 
        ./ext/extmk.rb:572:in `block in <main> 
        ./ext/extmk.rb:568:in `each 
        ./ext/extmk.rb:568:in `<main> 

Thanks in advance for any guidance.

我不敢确定下一步应该是什么。

问题回答

<代码>brew 安装开放式sl@1.1

Did you try this?

追溯到标识上,真正的问题包括在我旗帜前处理开车3号。

"gcc -I../../.ext/include/x86_64-darwin22 -I../.././include -I../.././ext/openssl -I/usr/local/Cellar/openssl@3/3.1.2/include -I/usr/local/opt/openssl@1.1 .....

The fix that worked for me - some steps may not be needed. Cleanup my failed install rvm uninstall 2.7.5

Temp rename of that include dir per solution in another thread. mv /usr/local/Cellar/openssl@3 /usr/local/Cellar/hide_me

Reinstall Ruby 2.7.5

CONFIG_PATH=/usr/local/opt/openssl@1.1/lib/pkgconfig rvm install 2.7.5 --with-openssl-lib=/usr/local/opt/openssl@1.1 --with-openssl-include=/usr/local/opt/openssl@1.1

!

Restore openssl3 dir to original name mv /usr/local/Cellar/hide_me /usr/local/Cellar/openssl@3





相关问题
Ruby parser in Java

The project I m doing is written in Java and parsers source code files. (Java src up to now). Now I d like to enable parsing Ruby code as well. Therefore I am looking for a parser in Java that parses ...

rails collection_select vs. select

collection_select and select Rails helpers: Which one should I use? I can t see a difference in both ways. Both helpers take a collection and generates options tags inside a select tag. Is there a ...

RubyCAS-Client question: Rails

I ve installed RubyCAS-Client version 2.1.0 as a plugin within a rails app. It s working, but I d like to remove the ?ticket= in the url. Is this possible?

Ordering a hash to xml: Rails

I m building an xml document from a hash. The xml attributes need to be in order. How can this be accomplished? hash.to_xml

multiple ruby extension modules under one directory

Can sources for discrete ruby extension modules live in the same directory, controlled by the same extconf.rb script? Background: I ve a project with two extension modules, foo.so and bar.so which ...

Text Editor for Ruby-on-Rails

guys which text editor is good for Rubyonrails? i m using Windows and i was using E-Texteditor but its not free n its expired now can anyone plese tell me any free texteditor? n which one is best an ...

热门标签