質問編集履歴
3
PATHのエラー内容を更新
test
CHANGED
File without changes
|
test
CHANGED
@@ -63,6 +63,32 @@
|
|
63
63
|
installでき、一歩前進できたもののまた詰まっており、
|
64
64
|
このポイントも見た方が良いなどあればご教示いただけますと幸いです。
|
65
65
|
|
66
|
+
# さらに追記
|
67
|
+
|
68
|
+
以下のエラーメッセージからPATHがおかしそうなので、以下を試してみました。
|
69
|
+
```
|
70
|
+
Library not loaded: /Users/Name/.rbenv/versions/2.7.5/lib/libruby.2.7.dylib
|
71
|
+
```
|
72
|
+
- /Users/Name/.rbenv/versions/の中身を見てみる
|
73
|
+
```
|
74
|
+
% ls [~/.rbenv/versions]
|
75
|
+
2.5.9/
|
76
|
+
```
|
77
|
+
|
78
|
+
2.5.9の元々入れていた古いものしか存在していません。
|
79
|
+
しかし、rbenv install 2.7.5でinstallはできています。
|
80
|
+
|
81
|
+
```
|
82
|
+
% rbenv versions
|
83
|
+
system
|
84
|
+
* 2.7.5 (set by /Users/Name/.ruby-version)
|
85
|
+
|
86
|
+
% ruby -v
|
87
|
+
ruby 2.7.5p203 (2021-11-24 revision f69aeb8314) [arm64-darwin21]
|
88
|
+
```
|
89
|
+
|
90
|
+
PATHを変更しないといけないことはわかったのですが
|
91
|
+
どこの設定を変えれば良いのかいまいち分からず手が止まっている状況です。。
|
66
92
|
|
67
93
|
|
68
94
|
|
@@ -83,4 +109,3 @@
|
|
83
109
|
|
84
110
|
|
85
111
|
|
86
|
-
|
2
エラー内容を最新に修正
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
[M1 mac]rbenv install 2.7系
|
1
|
+
[M1 mac]rbenv install 2.7系installすると、エラーが発生する
|
test
CHANGED
@@ -1,9 +1,7 @@
|
|
1
1
|
表題の件で困っており、投稿いたしました。
|
2
2
|
|
3
3
|
## 詰まっていること
|
4
|
-
rbenv install 2.7.5を
|
4
|
+
rbenv install 2.7.5をinstallする際に以下のようなエラーが表示されてしまっていました。
|
5
|
-
同じように詰まった方、解消された方、何かアドバイスなどあればご教示いただけますと幸いです。
|
6
|
-
よろしくお願い致します。
|
7
5
|
|
8
6
|
```
|
9
7
|
% rbenv install 2.7.5
|
@@ -29,73 +27,41 @@
|
|
29
27
|
See `config.log' for more details
|
30
28
|
make: *** No targets specified and no makefile found. Stop.
|
31
29
|
```
|
30
|
+
以下の記事を参考に、
|
32
|
-
|
31
|
+
https://github.com/rbenv/ruby-build/issues/1691
|
32
|
+
設定内容を以下のように書き換えました。
|
33
|
+
|
33
34
|
```
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
checking for ruby... /Users/Name/.rbenv/shims/ruby
|
38
|
-
tool/config.guess already exists
|
39
|
-
tool/config.sub already exists
|
40
|
-
checking build system type... aarch64-apple-darwin21.3.0
|
41
|
-
checking host system type... aarch64-apple-darwin21.3.0
|
42
|
-
checking target system type... aarch64-apple-darwin21.3.0
|
43
|
-
checking whether the C compiler works... no
|
44
|
-
configure: error: in `/var/folders/vc/187y8gb56xg50jr7ntbpd3cw0000gn/T/ruby-build.20220514102216.36117.rchhIk/ruby-2.7.5':
|
45
|
-
configure: error: C compiler cannot create executables
|
46
|
-
See `config.log' for more details
|
47
|
-
make: *** No targets specified and no makefile found. Stop.
|
48
|
-
```
|
49
|
-
- 以下の記事を参照し、RUBY_CFLAGS=-DUSE_FFI_CLOSURE_ALLOC rbenv install 2.7.5としてみましたが同様のエラーとなってしまいました。
|
50
|
-
https://secret-garden.hatenablog.com/entry/2021/01/02/220713
|
35
|
+
// Homebrew
|
36
|
+
export PATH=/opt/homebrew/bin:$PATH
|
37
|
+
export PATH="/opt/homebrew/sbin:$PATH"
|
51
38
|
|
52
|
-
|
53
|
-
当時の諸々の設定は以下のようになっております。
|
54
|
-
- zshrc
|
55
|
-
```
|
56
|
-
|
39
|
+
// rbenv
|
57
|
-
export
|
40
|
+
export RBENV_ROOT=/opt/homebrew/opt/rbenv
|
41
|
+
export PATH=$RBENV_ROOT/bin:$PATH
|
58
42
|
eval "$(rbenv init -)"
|
59
43
|
|
60
|
-
|
44
|
+
// openssl
|
61
|
-
export PATH="/opt/homebrew/opt/openssl@
|
45
|
+
export PATH="/opt/homebrew/opt/openssl@1.1/bin:$PATH"
|
46
|
+
export LDFLAGS="-L/opt/homebrew/opt/openssl@1.1/lib"
|
47
|
+
export CPPFLAGS="-I/opt/homebrew/opt/openssl@1.1/include"
|
48
|
+
export PKG_CONFIG_PATH="/opt/homebrew/opt/openssl@1.1/lib/pkgconfig"
|
49
|
+
export RUBY_CONFIGURE_OPTS="--with-openssl-dir=/opt/homebrew/opt/openssl@1.1"
|
62
50
|
```
|
51
|
+
|
52
|
+
すると、rbenv install 2.7.5でinstallできたのですが
|
53
|
+
rails cを使用しようと以下のようにコマンドを押下すると
|
63
|
-
|
54
|
+
次にまた別のエラーが....
|
55
|
+
|
64
56
|
```
|
65
|
-
%
|
66
|
-
system
|
67
|
-
|
57
|
+
% bundle exec rails c
|
58
|
+
/Users/Name/develop/project/api/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.4/lib/active_support/dependencies.rb:332:in `require': dlopen(/Users/Name/develop/project/api/vendor/bundle/ruby/2.7.0/gems/puma-5.6.1/lib/puma/puma_http11.bundle, 0x0009): Library not loaded: /Users/Name/.rbenv/versions/2.7.5/lib/libruby.2.7.dylib (LoadError)
|
59
|
+
Referenced from: /Users/Name/develop/project/api/vendor/bundle/ruby/2.7.0/gems/puma-5.6.1/lib/puma/puma_http11.bundle
|
60
|
+
Reason: tried: '/Users/Name/.rbenv/versions/2.7.5/lib/libruby.2.7.dylib' (no such file), '/usr/local/lib/libruby.2.7.dylib' (no such file), '/usr/lib/libruby.2.7.dylib' (no such file) - /Users/Name/develop/project/api/vendor/bundle/ruby/2.7.0/gems/puma-5.6.1/lib/puma/puma_http11.bundle
|
68
61
|
```
|
69
|
-
- ruby 確認
|
70
|
-
```
|
71
|
-
% ruby -v
|
72
|
-
ruby 2.5.9p229 (2021-04-05 revision 67939) [-darwin20]
|
73
62
|
|
74
|
-
|
75
|
-
|
76
|
-
```
|
77
|
-
- openssl 確認
|
78
|
-
```
|
79
|
-
% openssl version
|
80
|
-
OpenSSL 3.0.3 3 May 2022 (Library: OpenSSL 3.0.3 3 May 2022)
|
81
|
-
|
82
|
-
% which openssl
|
83
|
-
/opt/homebrew/opt/openssl@3/bin/openssl
|
84
|
-
|
85
|
-
% brew list openssl
|
86
|
-
/opt/homebrew/Cellar/openssl@3/3.0.3/.bottle/etc/ (7 files)
|
87
|
-
/opt/homebrew/Cellar/openssl@3/3.0.3/bin/c_rehash
|
88
|
-
/opt/homebrew/Cellar/openssl@3/3.0.3/bin/openssl
|
89
|
-
/opt/homebrew/Cellar/openssl@3/3.0.3/include/openssl/ (135 files)
|
90
|
-
/opt/homebrew/Cellar/openssl@3/3.0.3/lib/libcrypto.3.dylib
|
91
|
-
/opt/homebrew/Cellar/openssl@3/3.0.3/lib/libssl.3.dylib
|
92
|
-
/opt/homebrew/Cellar/openssl@3/3.0.3/lib/engines-3/ (3 files)
|
93
|
-
/opt/homebrew/Cellar/openssl@3/3.0.3/lib/ossl-modules/legacy.dylib
|
94
|
-
/opt/homebrew/Cellar/openssl@3/3.0.3/lib/pkgconfig/ (3 files)
|
95
|
-
/opt/homebrew/Cellar/openssl@3/3.0.3/lib/ (4 other files)
|
96
|
-
/opt/homebrew/Cellar/openssl@3/3.0.3/share/doc/ (787 files)
|
97
|
-
/opt/homebrew/Cellar/openssl@3/3.0.3/share/man/ (5490 files)
|
98
|
-
```
|
63
|
+
installでき、一歩前進できたもののまた詰まっており、
|
64
|
+
このポイントも見た方が良いなどあればご教示いただけますと幸いです。
|
99
65
|
|
100
66
|
|
101
67
|
|
1
which rubyを追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -70,6 +70,9 @@
|
|
70
70
|
```
|
71
71
|
% ruby -v
|
72
72
|
ruby 2.5.9p229 (2021-04-05 revision 67939) [-darwin20]
|
73
|
+
|
74
|
+
% which ruby
|
75
|
+
/Users/Name/.rbenv/shims/ruby
|
73
76
|
```
|
74
77
|
- openssl 確認
|
75
78
|
```
|