Mac OS Ventura で Ruby 2.7.5 のインストールが失敗する *** 次の拡張機能はコンパイルされていません: openssl: 設定できませんでした。インストールされません
概要
反応ネイティブ .70 を使用できるように、Ruby の古いバージョンをインストールしようとしています。 いくつかのエラーが発生しています。これを機能させるためにご協力いただければ幸いです。 openssl 1.1 が使用されるように、次のコマンドを発行しました。
CONFIG_PATH=/usr/local/opt/[email protected]/lib/pkgconfig rvm reinstall 2.7.5 --with-openssl-lib=/usr/local/opt/[email protected] --with-openssl-include=/usr/local/opt/[email protected]
Ruby のインストールが失敗します。ログには、タイトルで述べたエラーがリストされ、ext/openssl/mkmf.log が参照されます。 そのログにはいくつかのエラーがリストされています。
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>'
ご指導ありがとうございます。
次のステップをどうすべきかわかりません。
解決策
醸造インストール [email protected]
これを試してみましたか?