質問編集履歴

2

2021/05/06 07:58

投稿

退会済みユーザー
test CHANGED
@@ -1 +1 @@
1
- php-cliのmakeに失敗するので成功させたい
1
+ php-cliのmakeに失敗する
test CHANGED
@@ -1,237 +1,3 @@
1
- ### 前提・実現したいこと
1
+ この投稿は問題があったため、削除まし
2
2
 
3
- 既存のシステムをローカルに落として開発環境を構築しいと思っています
4
-
5
- VirtualBox上にDockerコンテナを立てて起動させているのですが、vagrant up時に読み込むDockerFileでエラーが出てしまうので、解決させるため、ご助力願えますでしょうか。
6
-
7
- ### 発生している問題・エラーメッセージ
8
-
9
- ```error
10
-
11
- default: running: make
12
-
13
- default: /bin/sh /tmp/pear/temp/pear-build-defaultuserCR5Vh1/gnupg-1.5.0/libtool --mode=compile cc -I. -I/tmp/pear/temp/gnupg -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-defaultuserCR5Vh1/gnupg-1.5.0/include -I/tmp/pear/temp/pear-build-defaultuserCR5Vh1/gnupg-1.5.0/main -I/tmp/pear/temp/gnupg -I/usr/include/php/7.2/php -I/usr/include/php/7.2/php/main -I/usr/include/php/7.2/php/TSRM -I/usr/include/php/7.2/php/Zend -I/usr/include/php/7.2/php/ext -I/usr/include/php/7.2/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/gnupg/gnupg.c -o gnupg.lo
14
-
15
- default: libtool: compile: cc -I. -I/tmp/pear/temp/gnupg -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-defaultuserCR5Vh1/gnupg-1.5.0/include -I/tmp/pear/temp/pear-build-defaultuserCR5Vh1/gnupg-1.5.0/main -I/tmp/pear/temp/gnupg -I/usr/include/php/7.2/php -I/usr/include/php/7.2/php/main -I/usr/include/php/7.2/php/TSRM -I/usr/include/php/7.2/php/Zend -I/usr/include/php/7.2/php/ext -I/usr/include/php/7.2/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/gnupg/gnupg.c -fPIC -DPIC -o .libs/gnupg.o
16
-
17
- default: /tmp/pear/temp/gnupg/gnupg.c: In function 'zif_gnupg_keyinfo':
18
-
19
- default: /tmp/pear/temp/gnupg/gnupg.c:1121:20: error: 'struct _gpgme_subkey' has no member named 'curve'
20
-
21
- default: if (gpgme_subkey->curve) {
22
-
23
- default: ^~
24
-
25
- default: In file included from /usr/include/php/7.2/php/main/php.h:39:0,
26
-
27
- default: from /tmp/pear/temp/gnupg/gnupg.c:21:
28
-
29
- default: /tmp/pear/temp/gnupg/gnupg.c:523:54: error: 'struct _gpgme_subkey' has no member named 'curve'
30
-
31
- default: PHPC_VAL_CAST_TO_PZVAL(_g_arr), #_g_name, _g_struct->_g_key)
32
-
33
- default: ^
34
-
35
- default: /usr/include/php/7.2/php/Zend/zend_API.h:424:96: note: in definition of macro 'add_assoc_string'
36
-
37
- default: #define add_assoc_string(__arg, __key, __str) add_assoc_string_ex(__arg, __key, strlen(__key), __str)
38
-
39
- default: ^~~~~
40
-
41
- default: /tmp/pear/temp/gnupg/gnupg.c:525:2: note: in expansion of macro 'PHP_GNUPG_ARRAY_ADD_ASSOC_CSTR_EX'
42
-
43
- default: PHP_GNUPG_ARRAY_ADD_ASSOC_CSTR_EX(_g_arr, _g_name, _g_struct, _g_name)
44
-
45
- default: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
46
-
47
- default: /tmp/pear/temp/gnupg/gnupg.c:1122:5: note: in expansion of macro 'PHP_GNUPG_ARRAY_ADD_ASSOC_CSTR'
48
-
49
- default: PHP_GNUPG_ARRAY_ADD_ASSOC_CSTR(subkey, curve, gpgme_subkey);
50
-
51
- default: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
52
-
53
- default: make: *** [gnupg.lo] Error 1
54
-
55
- default: ERROR: `make' failed
56
-
57
- default: Service 'php7-cli' failed to build: The command '/bin/sh -c yum update -y && yum install -y gcc72 gcc72-c++ php${PHP_MAJOR}${PHP_MINOR}-cli php${PHP_MAJOR}${PHP_MINOR}-devel php${PHP_MAJOR}${PHP_MINOR}-common php${PHP_MAJOR}${PHP_MINOR}-json php${PHP_MAJOR}${PHP_MINOR}-mbstring php${PHP_MAJOR}${PHP_MINOR}-process php${PHP_MAJOR}${PHP_MINOR}-xml php${PHP_MAJOR}${PHP_MINOR}-bcmath php${PHP_MAJOR}${PHP_MINOR}-dba php${PHP_MAJOR}${PHP_MINOR}-dbg php${PHP_MAJOR}${PHP_MINOR}-gd php${PHP_MAJOR}${PHP_MINOR}-intl php${PHP_MAJOR}${PHP_MINOR}-mcrypt php${PHP_MAJOR}${PHP_MINOR}-mysqlnd php${PHP_MAJOR}${PHP_MINOR}-pdo php${PHP_MAJOR}${PHP_MINOR}-pecl-redis php${PHP_MAJOR}${PHP_MINOR}-xmlrpc php${PHP_MAJOR}${PHP_MINOR}-opcache php${PHP_MAJOR}${PHP_MINOR}-pecl-apcu php${PHP_MAJOR}${PHP_MINOR}-pecl-apcu-devel php${PHP_MAJOR}${PHP_MINOR}-pecl-memcache php${PHP_MAJOR}${PHP_MINOR}-pecl-memcached php${PHP_MAJOR}-pear && rm -rf /var/cache/yum/* && yum clean all && rm -f /etc/php-${PHP_MAJOR}.${PHP_MINOR}.d/redis.ini && yum install -y php7-pear && yum install -y gpgme-devel && sed -i '/$v_att_list = & func_get_args();/c$v_att_list = func_get_args();' /usr/share/pear7/Archive/Tar.php && /usr/bin/pecl7 install gnupg && echo "extension=gnupg.so" > /etc/php-${PHP_MAJOR}.${PHP_MINOR}.d/60-gnupg.ini' returned a non-zero code: 1
58
-
59
- default: +++ docker exec vagrant_frontend-webapp_1 bash -c '[ ! -f /www/.env ] && cp /www/.env.example /www/.env'
60
-
61
- default: Error: No such container: vagrant_frontend-webapp_1
62
-
63
- default: +++ docker exec vagrant_frontend-webapp_1 bash -c 'cd /www && php composer.phar install'
64
-
65
- default: Error: No such container: vagrant_frontend-webapp_1
66
-
67
- default: +++ docker exec vagrant_frontend-webapp_1 bash -c 'cp /www/package.json /tmp/'
68
-
69
- default: Error: No such container: vagrant_frontend-webapp_1
70
-
71
- default: +++ docker exec vagrant_frontend-webapp_1 bash -c 'cp /www/package-lock.json /tmp/'
72
-
73
- default: Error: No such container: vagrant_frontend-webapp_1
74
-
75
- default: +++ docker exec vagrant_frontend-webapp_1 bash -c 'npm install -g cross-env cross-spawn'
76
-
77
- default: Error: No such container: vagrant_frontend-webapp_1
78
-
79
- default: +++ docker exec vagrant_frontend-webapp_1 bash -c 'cd /tmp && npm install --no-bin-links'
80
-
81
- default: Error: No such container: vagrant_frontend-webapp_1
82
-
83
- default: +++ docker exec vagrant_frontend-webapp_1 bash -c 'mv /tmp/package-lock.json /www/'
84
-
85
- default: Error: No such container: vagrant_frontend-webapp_1
86
-
87
- default: +++ docker exec vagrant_frontend-webapp_1 bash -c 'mv /tmp/node_modules/ /www/'
88
-
89
- default: Error: No such container: vagrant_frontend-webapp_1
90
-
91
- default: +++ docker exec vagrant_frontend-webapp_1 bash -c 'cd /www && npm run dev'
92
-
93
- default: Error: No such container: vagrant_frontend-webapp_1
94
-
95
- ```
96
-
97
- ### 該当のソースコード
98
-
99
- ```DockerFile
100
-
101
- # description
102
-
103
- ARG FROM="amazonlinux:1"
104
-
105
- FROM ${FROM}
106
-
107
- MAINTAINER ***** *****
108
-
109
-
110
-
111
- # network
112
-
113
- RUN touch /etc/sysconfig/network
114
-
115
-
116
-
117
- # install
118
-
119
- ARG PHP_MAJOR=7
120
-
121
- ARG PHP_MINOR=1
122
-
123
- RUN yum update -y && yum install -y \
124
-
125
- gcc72 \
126
-
127
- gcc72-c++ \
128
-
129
- php${PHP_MAJOR}${PHP_MINOR}-cli \
130
-
131
- php${PHP_MAJOR}${PHP_MINOR}-devel \
132
-
133
- php${PHP_MAJOR}${PHP_MINOR}-common \
134
-
135
- php${PHP_MAJOR}${PHP_MINOR}-json \
136
-
137
- php${PHP_MAJOR}${PHP_MINOR}-mbstring \
138
-
139
- php${PHP_MAJOR}${PHP_MINOR}-process \
140
-
141
- php${PHP_MAJOR}${PHP_MINOR}-xml \
142
-
143
- php${PHP_MAJOR}${PHP_MINOR}-bcmath \
144
-
145
- php${PHP_MAJOR}${PHP_MINOR}-dba \
146
-
147
- php${PHP_MAJOR}${PHP_MINOR}-dbg \
148
-
149
- php${PHP_MAJOR}${PHP_MINOR}-gd \
150
-
151
- php${PHP_MAJOR}${PHP_MINOR}-intl \
152
-
153
- php${PHP_MAJOR}${PHP_MINOR}-mcrypt \
154
-
155
- php${PHP_MAJOR}${PHP_MINOR}-mysqlnd \
156
-
157
- php${PHP_MAJOR}${PHP_MINOR}-pdo \
158
-
159
- php${PHP_MAJOR}${PHP_MINOR}-pecl-redis \
160
-
161
- php${PHP_MAJOR}${PHP_MINOR}-xmlrpc \
162
-
163
- php${PHP_MAJOR}${PHP_MINOR}-opcache \
164
-
165
- php${PHP_MAJOR}${PHP_MINOR}-pecl-apcu \
166
-
167
- php${PHP_MAJOR}${PHP_MINOR}-pecl-apcu-devel \
168
-
169
- php${PHP_MAJOR}${PHP_MINOR}-pecl-memcache \
170
-
171
- php${PHP_MAJOR}${PHP_MINOR}-pecl-memcached \
172
-
173
- php${PHP_MAJOR}-pear \
174
-
175
- && rm -rf /var/cache/yum/* \
176
-
177
- && yum clean all \
178
-
179
- && rm -f /etc/php-${PHP_MAJOR}.${PHP_MINOR}.d/redis.ini \
180
-
181
- && yum install -y php7-pear \
182
-
183
- && yum install -y gpgme-devel \
184
-
185
- && sed -i '/$v_att_list = & func_get_args();/c$v_att_list = func_get_args();' /usr/share/pear7/Archive/Tar.php \
186
-
187
- && /usr/bin/pecl7 install gnupg \
188
-
189
- && echo "extension=gnupg.so" > /etc/php-${PHP_MAJOR}.${PHP_MINOR}.d/60-gnupg.ini
190
-
191
-
192
-
193
- COPY ./etc/php-${PHP_MAJOR}.${PHP_MINOR}.ini /etc/php-${PHP_MAJOR}.${PHP_MINOR}.ini
194
-
195
- COPY ./etc/php-${PHP_MAJOR}.${PHP_MINOR}.d/10-opcache.ini /etc/php-${PHP_MAJOR}.${PHP_MINOR}.d/10-opcache.ini
196
-
197
- COPY ./etc/php-${PHP_MAJOR}.${PHP_MINOR}.d/40-apcu.ini /etc/php-${PHP_MAJOR}.${PHP_MINOR}.d/40-apcu.ini
198
-
199
- COPY ./etc/php-${PHP_MAJOR}.${PHP_MINOR}.d/50-memcached.ini /etc/php-${PHP_MAJOR}.${PHP_MINOR}.d/50-memcached.ini
200
-
201
- COPY ./etc/php-${PHP_MAJOR}.${PHP_MINOR}.d/50-redis.ini /etc/php-${PHP_MAJOR}.${PHP_MINOR}.d/50-redis.ini
202
-
203
-
204
-
205
- # run daemon
206
-
207
- USER root
208
-
209
- CMD [ "/usr/bin/php", "-i" ]
210
-
211
- ```
212
-
213
- ### 試したこと
214
-
215
- ・Hyper-Vの無効化(相性問題があると聞きましたので試しました。有効状態でも実施しておりますが、ダメでした)
216
-
217
- ・vagrant up時、及びreload時の--provisionオプション
218
-
219
- ・Vagrant、VirtualBoxの再インストール
220
-
221
- ⇒アンインストール時にSystemファイルをレジストリからも削除
222
-
223
- ・gitからソースの再clone(知人の環境ではうまくいってますので、ソースそのものに問題があるようには見えませんでした)
224
-
225
- ・DockerFileのタイムアウト時間の変更
226
-
227
- ⇒sed -i "s/timeout=5/timeout=30/" /etc/yum.conf \の追記
228
-
229
- ### 補足情報(FW/ツールのバージョンなど)
230
-
231
- Vagrant:2.2.15
232
-
233
- VirtualBox:6.1.18
234
-
235
-
236
-
237
- 以上です。よろしくお願いいたします。
3
+ 回答ありがうございました。

1

errorを追記しました。

2021/05/06 07:57

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -54,7 +54,43 @@
54
54
 
55
55
  default: ERROR: `make' failed
56
56
 
57
- default: Service 'php7-cli' failed to build: The command '/bin/sh -c yum update -y && yum install -y gcc72 gcc72-c++
57
+ default: Service 'php7-cli' failed to build: The command '/bin/sh -c yum update -y && yum install -y gcc72 gcc72-c++ php${PHP_MAJOR}${PHP_MINOR}-cli php${PHP_MAJOR}${PHP_MINOR}-devel php${PHP_MAJOR}${PHP_MINOR}-common php${PHP_MAJOR}${PHP_MINOR}-json php${PHP_MAJOR}${PHP_MINOR}-mbstring php${PHP_MAJOR}${PHP_MINOR}-process php${PHP_MAJOR}${PHP_MINOR}-xml php${PHP_MAJOR}${PHP_MINOR}-bcmath php${PHP_MAJOR}${PHP_MINOR}-dba php${PHP_MAJOR}${PHP_MINOR}-dbg php${PHP_MAJOR}${PHP_MINOR}-gd php${PHP_MAJOR}${PHP_MINOR}-intl php${PHP_MAJOR}${PHP_MINOR}-mcrypt php${PHP_MAJOR}${PHP_MINOR}-mysqlnd php${PHP_MAJOR}${PHP_MINOR}-pdo php${PHP_MAJOR}${PHP_MINOR}-pecl-redis php${PHP_MAJOR}${PHP_MINOR}-xmlrpc php${PHP_MAJOR}${PHP_MINOR}-opcache php${PHP_MAJOR}${PHP_MINOR}-pecl-apcu php${PHP_MAJOR}${PHP_MINOR}-pecl-apcu-devel php${PHP_MAJOR}${PHP_MINOR}-pecl-memcache php${PHP_MAJOR}${PHP_MINOR}-pecl-memcached php${PHP_MAJOR}-pear && rm -rf /var/cache/yum/* && yum clean all && rm -f /etc/php-${PHP_MAJOR}.${PHP_MINOR}.d/redis.ini && yum install -y php7-pear && yum install -y gpgme-devel && sed -i '/$v_att_list = & func_get_args();/c$v_att_list = func_get_args();' /usr/share/pear7/Archive/Tar.php && /usr/bin/pecl7 install gnupg && echo "extension=gnupg.so" > /etc/php-${PHP_MAJOR}.${PHP_MINOR}.d/60-gnupg.ini' returned a non-zero code: 1
58
+
59
+ default: +++ docker exec vagrant_frontend-webapp_1 bash -c '[ ! -f /www/.env ] && cp /www/.env.example /www/.env'
60
+
61
+ default: Error: No such container: vagrant_frontend-webapp_1
62
+
63
+ default: +++ docker exec vagrant_frontend-webapp_1 bash -c 'cd /www && php composer.phar install'
64
+
65
+ default: Error: No such container: vagrant_frontend-webapp_1
66
+
67
+ default: +++ docker exec vagrant_frontend-webapp_1 bash -c 'cp /www/package.json /tmp/'
68
+
69
+ default: Error: No such container: vagrant_frontend-webapp_1
70
+
71
+ default: +++ docker exec vagrant_frontend-webapp_1 bash -c 'cp /www/package-lock.json /tmp/'
72
+
73
+ default: Error: No such container: vagrant_frontend-webapp_1
74
+
75
+ default: +++ docker exec vagrant_frontend-webapp_1 bash -c 'npm install -g cross-env cross-spawn'
76
+
77
+ default: Error: No such container: vagrant_frontend-webapp_1
78
+
79
+ default: +++ docker exec vagrant_frontend-webapp_1 bash -c 'cd /tmp && npm install --no-bin-links'
80
+
81
+ default: Error: No such container: vagrant_frontend-webapp_1
82
+
83
+ default: +++ docker exec vagrant_frontend-webapp_1 bash -c 'mv /tmp/package-lock.json /www/'
84
+
85
+ default: Error: No such container: vagrant_frontend-webapp_1
86
+
87
+ default: +++ docker exec vagrant_frontend-webapp_1 bash -c 'mv /tmp/node_modules/ /www/'
88
+
89
+ default: Error: No such container: vagrant_frontend-webapp_1
90
+
91
+ default: +++ docker exec vagrant_frontend-webapp_1 bash -c 'cd /www && npm run dev'
92
+
93
+ default: Error: No such container: vagrant_frontend-webapp_1
58
94
 
59
95
  ```
60
96