質問編集履歴
2
コードブロックの追加とエラー文の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -8,32 +8,39 @@
|
|
8
8
|
railsで作成したアプリをEC2上で起動させるために、gemをbundle installしていると、
|
9
9
|
下記のエラーが出て、いろいろ試行錯誤をしてみたのですが、全く改善が見られず、数日間止まってしまってます。
|
10
10
|
|
11
|
-
|
11
|
+
```terminal
|
12
12
|
An error occurred while installing pg (1.4.5), and Bundler cannot
|
13
13
|
continue.
|
14
14
|
Make sure that `gem install pg -v '1.4.5' --source 'https://rubygems.org/'`
|
15
15
|
succeeds before bundling.
|
16
|
+
```
|
16
17
|
|
17
18
|
#### 経緯
|
18
19
|
1. ローカル環境でGemfileにunicornを記載し、
|
20
|
+
```gemfile
|
19
21
|
group :production do
|
20
22
|
gem 'pg'
|
21
23
|
end
|
22
24
|
group :production do
|
23
25
|
gem 'unicorn', '5.4.1'
|
24
26
|
end
|
27
|
+
```
|
25
28
|
bundle install をし、gemはインストールされました。
|
26
29
|
2. GitHubにコミット、プッシュをし、EC2上でgit pull origin mainを実行しました。
|
27
30
|
3. EC2上でbundle install実行すると、unicornがインストールされていませんでした。
|
28
31
|
4.productionが2つあるせいかと思い、ローカルでgemfileのpgを削除し、プッシュ、EC2上でgit pull origin mainとbundle install をしたところ、
|
32
|
+
```terminal
|
29
33
|
An error occurred while installing pg (1.4.5), and Bundler cannot
|
30
34
|
continue.
|
31
35
|
Make sure that `gem install pg -v '1.4.5' --source 'https://rubygems.org/'`
|
32
36
|
succeeds before bundling
|
37
|
+
```
|
33
38
|
というエラーが出て、
|
34
39
|
gem install pg -v '1.4.5' とすると、
|
40
|
+
```terminal
|
35
41
|
Error installing pg:
|
36
42
|
ERROR: Failed to build gem native extension.
|
43
|
+
```
|
37
44
|
と出て、推奨される方法を繰り返してると、たらい回しのようになり、
|
38
45
|
何をしているのか全くわからなくなってきました。
|
39
46
|
|
@@ -47,17 +54,120 @@
|
|
47
54
|
エラーメッセージ
|
48
55
|
```
|
49
56
|
ターミナルのEC2上でbundle installをしたときのエラーです。
|
50
|
-
|
57
|
+
```
|
58
|
+
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
|
59
|
+
Fetching gem metadata from https://rubygems.org/.........
|
60
|
+
Fetching gem metadata from https://rubygems.org/.
|
61
|
+
Resolving dependencies.......
|
62
|
+
Using rake 13.0.6
|
63
|
+
Using concurrent-ruby 1.1.10
|
64
|
+
Using i18n 1.12.0
|
65
|
+
Using minitest 5.16.3
|
66
|
+
Using thread_safe 0.3.6
|
67
|
+
Using tzinfo 1.2.10
|
68
|
+
Using zeitwerk 2.6.6
|
69
|
+
Using activesupport 6.0.6
|
70
|
+
Using builder 3.2.4
|
71
|
+
Using erubi 1.12.0
|
72
|
+
Using mini_portile2 2.8.1
|
73
|
+
Using racc 1.6.2
|
74
|
+
Using nokogiri 1.13.10 (x86_64-linux)
|
75
|
+
Using rails-dom-testing 2.0.3
|
76
|
+
Using crass 1.0.6
|
77
|
+
Using loofah 2.19.1
|
78
|
+
Using rails-html-sanitizer 1.4.4
|
79
|
+
Using actionview 6.0.6
|
80
|
+
Using rack 2.2.5
|
81
|
+
Using rack-test 2.0.2
|
82
|
+
Using actionpack 6.0.6
|
83
|
+
Using nio4r 2.5.8
|
84
|
+
Using websocket-extensions 0.1.5
|
85
|
+
Using websocket-driver 0.7.5
|
86
|
+
Using actioncable 6.0.6
|
87
|
+
Using globalid 1.0.0
|
88
|
+
Using activejob 6.0.6
|
89
|
+
Using activemodel 6.0.6
|
90
|
+
Using activerecord 6.0.6
|
91
|
+
Using marcel 1.0.2
|
92
|
+
Using activestorage 6.0.6
|
93
|
+
Using mini_mime 1.1.2
|
94
|
+
Using date 3.3.3
|
95
|
+
Using timeout 0.3.1
|
96
|
+
Using net-protocol 0.2.1
|
97
|
+
Using net-imap 0.3.4
|
98
|
+
Using net-pop 0.1.2
|
99
|
+
Using net-smtp 0.3.3
|
100
|
+
Using mail 2.8.0
|
101
|
+
Using actionmailbox 6.0.6
|
102
|
+
Using actionmailer 6.0.6
|
103
|
+
Using actiontext 6.0.6
|
104
|
+
Using active_hash 3.1.1
|
105
|
+
Using public_suffix 5.0.1
|
106
|
+
Using addressable 2.8.1
|
107
|
+
Using ast 2.4.2
|
108
|
+
Using aws-eventstream 1.2.0
|
109
|
+
Using aws-partitions 1.684.0
|
110
|
+
Using aws-sigv4 1.5.2
|
111
|
+
Using jmespath 1.6.2
|
112
|
+
Using aws-sdk-core 3.168.4
|
113
|
+
Using aws-sdk-kms 1.61.0
|
114
|
+
Using aws-sdk-s3 1.117.2
|
115
|
+
Using bcrypt 3.1.18
|
116
|
+
Using bindex 0.8.1
|
117
|
+
Using msgpack 1.6.0
|
118
|
+
Using bootsnap 1.15.0
|
119
|
+
Using bundler 2.1.4
|
120
|
+
Using byebug 11.1.3
|
121
|
+
Using matrix 0.4.2
|
122
|
+
Using regexp_parser 2.6.1
|
123
|
+
Using xpath 3.2.0
|
124
|
+
Using capybara 3.36.0
|
125
|
+
Using childprocess 4.1.0
|
126
|
+
Using coderay 1.1.3
|
127
|
+
Using orm_adapter 0.5.0
|
128
|
+
Using method_source 1.0.0
|
129
|
+
Using thor 1.2.1
|
130
|
+
Using railties 6.0.6
|
131
|
+
Using responders 3.0.1
|
132
|
+
Using warden 1.2.9
|
133
|
+
Using devise 4.8.1
|
134
|
+
Using diff-lcs 1.5.0
|
135
|
+
Using unf_ext 0.0.8.2
|
136
|
+
Using unf 0.1.4
|
137
|
+
Using domain_name 0.5.20190701
|
138
|
+
Using factory_bot 6.2.1
|
139
|
+
Using factory_bot_rails 6.2.0
|
140
|
+
Using faker 2.22.0
|
141
|
+
Using ffi 1.15.5
|
142
|
+
Using romaji 0.2.4
|
143
|
+
Using gimei 1.1.0
|
144
|
+
Using http-accept 1.7.0
|
145
|
+
Using http-cookie 1.0.5
|
146
|
+
Using mini_magick 4.12.0
|
147
|
+
Using ruby-vips 2.1.4
|
148
|
+
Using image_processing 1.12.2
|
149
|
+
Using jbuilder 2.11.5
|
150
|
+
Using json 2.6.3
|
151
|
+
Using kgio 2.11.4
|
152
|
+
Using rb-fsevent 0.11.2
|
153
|
+
Using rb-inotify 0.10.1
|
154
|
+
Using ruby_dep 1.5.0
|
155
|
+
Using listen 3.1.5
|
156
|
+
Using mime-types-data 3.2022.0105
|
157
|
+
Using mime-types 3.4.1
|
158
|
+
Using mysql2 0.5.4
|
159
|
+
Using netrc 0.11.0
|
160
|
+
Using parallel 1.22.1
|
161
|
+
Using parser 3.1.3.0
|
162
|
+
Using rest-client 2.1.0
|
163
|
+
Using payjp 0.0.10
|
51
164
|
Fetching pg 1.4.5
|
52
165
|
Installing pg 1.4.5 with native extensions
|
53
166
|
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
|
54
167
|
|
55
|
-
current directory:
|
56
|
-
/var/www/furima
|
168
|
+
current directory: /var/www/furima/vender/bundle/ruby/2.6.0/gems/pg-1.4.5/ext
|
57
|
-
/home/ec2-user/.rbenv/versions/2.6.5/bin/ruby -I
|
58
|
-
/home/ec2-user/.rbenv/versions/2.6.5/lib/ruby/2.6.0 -r
|
169
|
+
/home/ec2-user/.rbenv/versions/2.6.5/bin/ruby -I /home/ec2-user/.rbenv/versions/2.6.5/lib/ruby/2.6.0 -r
|
59
|
-
./siteconf20221229-30505-74j39y.rb extconf.rb
|
60
|
-
--with-pg-config\=/usr/local/Cellar/postgresql/11.5/bin/pg_config
|
170
|
+
./siteconf20221229-31884-1ap5sy2.rb extconf.rb --with-pg-config\=/usr/local/Cellar/postgresql/11.5/bin/pg_config
|
61
171
|
Calling libpq with GVL unlocked
|
62
172
|
Using config values from /usr/local/Cellar/postgresql/11.5/bin/pg_config
|
63
173
|
*** extconf.rb failed ***
|
@@ -65,29 +175,40 @@
|
|
65
175
|
libraries and/or headers. Check the mkmf.log file for more details. You may
|
66
176
|
need configuration options.
|
67
177
|
|
178
|
+
Provided configuration options:
|
179
|
+
--with-opt-dir
|
180
|
+
--without-opt-dir
|
181
|
+
--with-opt-include
|
68
|
-
|
182
|
+
--without-opt-include=${opt-dir}/include
|
183
|
+
--with-opt-lib
|
184
|
+
--without-opt-lib=${opt-dir}/lib
|
185
|
+
--with-make-prog
|
186
|
+
--without-make-prog
|
187
|
+
--srcdir=.
|
188
|
+
--curdir
|
69
|
-
/usr/
|
189
|
+
--ruby=/home/ec2-user/.rbenv/versions/2.6.5/bin/$(RUBY_BASE_NAME)
|
190
|
+
--with-pg
|
191
|
+
--without-pg
|
192
|
+
--enable-gvl-unlock
|
193
|
+
--disable-gvl-unlock
|
194
|
+
--enable-windows-cross
|
195
|
+
--disable-windows-cross
|
196
|
+
--with-pg-config
|
197
|
+
extconf.rb:40:in `popen': No such file or directory - /usr/local/Cellar/postgresql/11.5/bin/pg_config
|
198
|
+
(Errno::ENOENT)
|
70
199
|
from extconf.rb:40:in `<main>'
|
71
200
|
|
72
201
|
extconf failed, exit code 1
|
73
202
|
|
74
|
-
Gem files will remain installed in
|
75
|
-
/var/www/furima
|
203
|
+
Gem files will remain installed in /var/www/furima/vender/bundle/ruby/2.6.0/gems/pg-1.4.5 for inspection.
|
76
204
|
Results logged to
|
77
|
-
/var/www/furima
|
205
|
+
/var/www/furima/vender/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/pg-1.4.5/gem_make.out
|
78
|
-
|
206
|
+
|
79
|
-
An error occurred while installing pg (1.4.5), and Bundler cannot
|
207
|
+
An error occurred while installing pg (1.4.5), and Bundler cannot continue.
|
80
|
-
continue.
|
81
|
-
Make sure that `gem install pg -v '1.4.5' --source 'https://rubygems.org/'`
|
208
|
+
Make sure that `gem install pg -v '1.4.5' --source 'https://rubygems.org/'` succeeds before bundling.
|
82
|
-
succeeds before bundling.
|
83
209
|
|
84
210
|
In Gemfile:
|
85
211
|
pg
|
86
|
-
|
87
|
-
### 該当のソースコード
|
88
|
-
|
89
|
-
```ここに言語名を入力
|
90
|
-
ソースコード
|
91
212
|
```
|
92
213
|
|
93
214
|
### 試したこと
|
@@ -95,6 +216,10 @@
|
|
95
216
|
下記のエラーが出て、ここで止まってます。
|
96
217
|
ERROR: Error installing pg:
|
97
218
|
ERROR: Failed to build gem native extension.
|
219
|
+
|
220
|
+
MariaDBを使用して、デプロイしようとしているので、pgはいらないのではと思っているのですが、
|
221
|
+
この考え自体が間違いなんでしょうか?
|
222
|
+
|
98
223
|
### 補足情報(FW/ツールのバージョンなど)
|
99
224
|
Macで操作しています。
|
100
225
|
|
1
不要な文章の削除
test
CHANGED
File without changes
|
test
CHANGED
@@ -97,5 +97,5 @@
|
|
97
97
|
ERROR: Failed to build gem native extension.
|
98
98
|
### 補足情報(FW/ツールのバージョンなど)
|
99
99
|
Macで操作しています。
|
100
|
-
ここにより詳細な情報を記載してください。
|
101
100
|
|
101
|
+
|