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.
我不敢确定下一步应该是什么。