質問編集履歴

4

タイトル変更

2021/01/08 14:05

投稿

nanami0221
nanami0221

スコア18

test CHANGED
@@ -1 +1 @@
1
- [wkhtmltopdf / Laravel / Laravel-Snappy-PDF] The exit status code '126' says something went wrong: s
1
+ [wkhtmltopdf / Laravel / Laravel-Snappy-PDF] 実行(excutive)で失敗する
test CHANGED
File without changes

3

書式の改善

2021/01/08 14:05

投稿

nanami0221
nanami0221

スコア18

test CHANGED
@@ -1 +1 @@
1
- [Laravel / Laravel-Snappy-PDF] 「バイナリファイルを実行できない」というエラーが出てしまう
1
+ [wkhtmltopdf / Laravel / Laravel-Snappy-PDF] The exit status code '126' says something went wrong: s
test CHANGED
@@ -32,63 +32,55 @@
32
32
 
33
33
  ### やったこと
34
34
 
35
- ###### 1.ファイルのコピー
35
+ ###### 1.Macにwkhtmltopdfをンストー
36
+
37
+ ###### 2.ローカル環境にwkhtmltopdf-amd64をコピー
36
38
 
37
39
  /usr/local/bin/ディレクトリにwkhtmltopdf-amd64をコピーしました。
38
40
 
39
41
  ```
40
42
 
41
- cp -r /Applications/MAMP/htdocs/app/vendor/h4cc/wkhtmltopdf-amd64 /usr/local/bin
43
+ $ cp -r /Applications/MAMP/htdocs/app/vendor/h4cc/wkhtmltopdf-amd64 /usr/local/bin
42
44
 
43
- -rwxrwxrwx /usr/local/bin/wkhtmltopdf-amd64
45
+ $ ls -l /usr/local/bin/wkhtmltopdf-amd64
46
+
47
+ // -rwxrwxrwx /usr/local/bin/wkhtmltopdf-amd64
44
48
 
45
49
  ```
46
50
 
47
51
 
48
52
 
49
- ###### .権限の付与
53
+ ###### 3.権限の付与
50
54
 
51
55
  色々やってみました。
52
56
 
53
57
  ```
54
58
 
55
- chmod -R 777 /Applications/MAMP/htdocs/app/vendor/h4cc/wkhtmltoimage-amd64
59
+ $ chmod +x /Applications/MAMP/htdocs/app/vendor/h4cc/wkhtmltoimage-amd64
56
60
 
57
- chmod -R 777 /Applications/MAMP/htdocs/app/vendor/h4cc/wkhtmltopdf-amd64
61
+ $ chmod +x /Applications/MAMP/htdocs/app/vendor/h4cc/wkhtmltopdf-amd64
58
62
 
59
- chmod -R 777 /Applications/MAMP/htdocs/app/vendor/h4cc/wkhtmltoimage-amd64/bin/wkhtmltoimage-amd64
63
+ $ chmod +x /Applications/MAMP/htdocs/app/vendor/h4cc/wkhtmltoimage-amd64/bin/wkhtmltoimage-amd64
60
64
 
61
- chmod -R 777 /Applications/MAMP/htdocs/app/vendor/h4cc/wkhtmltopdf-amd64/bin/wkhtmltopdf-amd64
65
+ $ chmod +x /Applications/MAMP/htdocs/app/vendor/h4cc/wkhtmltopdf-amd64/bin/wkhtmltopdf-amd64
62
66
 
63
- chmod -R 777 /usr/local/bin/wkhtmltopdf-amd64
64
-
65
- chmod +x /Applications/MAMP/htdocs/app/vendor/h4cc/wkhtmltoimage-amd64
66
-
67
- chmod +x /Applications/MAMP/htdocs/app/vendor/h4cc/wkhtmltopdf-amd64
68
-
69
- chmod +x /Applications/MAMP/htdocs/app/vendor/h4cc/wkhtmltoimage-amd64/bin/wkhtmltoimage-amd64
70
-
71
- chmod +x /Applications/MAMP/htdocs/app/vendor/h4cc/wkhtmltopdf-amd64/bin/wkhtmltopdf-amd64
72
-
73
- chmod +x /usr/local/bin/wkhtmltopdf-amd64
67
+ $ chmod +x /usr/local/bin/wkhtmltopdf-amd64
74
-
75
- chmod 777 /Applications/MAMP/htdocs/app/vendor/h4cc/wkhtmltoimage-amd64
76
-
77
- chmod 777 /Applications/MAMP/htdocs/app/vendor/h4cc/wkhtmltopdf-amd64
78
-
79
- chmod 777 /Applications/MAMP/htdocs/app/vendor/h4cc/wkhtmltoimage-amd64/bin/wkhtmltoimage-amd64
80
-
81
- chmod 777 /Applications/MAMP/htdocs/app/vendor/h4cc/wkhtmltopdf-amd64/bin/wkhtmltopdf-amd64
82
-
83
- chmod 777 /usr/local/bin/wkhtmltopdf-amd64
84
68
 
85
69
 
86
70
 
87
- -rwxrwxrwx /Applications/MAMP/htdocs/app/vendor/h4cc/wkhtmltopdf-amd64/bin/wkhtmltopdf-amd64
71
+ // 権限確認
88
72
 
89
- -rwxrwxrwx /Applications/MAMP/htdocs/app/vendor/h4cc/wkhtmltoimage-amd64/bin/wkhtmltoimage-amd64
73
+ $ ls -l /Applications/MAMP/htdocs/app/vendor/h4cc/wkhtmltopdf-amd64/bin/wkhtmltopdf-amd64
90
74
 
75
+ // -rwxrwxrwx
76
+
77
+ $ ls -l /Applications/MAMP/htdocs/app/vendor/h4cc/wkhtmltoimage-amd64/bin/wkhtmltoimage-amd64
78
+
79
+ // -rwxrwxrwx
80
+
91
- -rwxrwxrwx /usr/local/bin/wkhtmltoimage-amd64
81
+ $ ls -l /usr/local/bin/wkhtmltopdf-amd64
82
+
83
+ // -rwxrwxrwx
92
84
 
93
85
  ```
94
86
 
@@ -98,14 +90,12 @@
98
90
 
99
91
  ### 補足
100
92
 
101
- ###### ファイが崩れてい
93
+ ターミナで実行すと、以下のようになります。
102
94
 
103
95
  ```
104
96
 
105
- % sh ./wkhtmltopdf-amd64
97
+ % sh /usr/local/bin/wkhtmltopdf-amd64
106
98
 
107
- ./wkhtmltopdf-amd64: ./wkhtmltopdf-amd64: cannot execute binary file
99
+ // /usr/local/bin/wkhtmltopdf-amd64: /usr/local/bin/wkhtmltopdf-amd64: cannot execute binary file
108
-
109
-
110
100
 
111
101
  ```

2

書式の改善

2021/01/07 14:28

投稿

nanami0221
nanami0221

スコア18

test CHANGED
File without changes
test CHANGED
@@ -98,7 +98,7 @@
98
98
 
99
99
  ### 補足
100
100
 
101
- ###### 3.ファイルが崩れている:?
101
+ ###### ファイルが崩れている
102
102
 
103
103
  ```
104
104
 

1

誤字脱字

2021/01/07 11:54

投稿

nanami0221
nanami0221

スコア18

test CHANGED
File without changes
test CHANGED
@@ -84,9 +84,9 @@
84
84
 
85
85
 
86
86
 
87
- -rwxrwxrwx /Applications/MAMP/htdocs/sample/vendor/h4cc/wkhtmltopdf-amd64/bin/wkhtmltopdf-amd64
87
+ -rwxrwxrwx /Applications/MAMP/htdocs/app/vendor/h4cc/wkhtmltopdf-amd64/bin/wkhtmltopdf-amd64
88
88
 
89
- -rwxrwxrwx /Applications/MAMP/htdocs/ZOTMAN/vendor/h4cc/wkhtmltoimage-amd64/bin/wkhtmltoimage-amd64
89
+ -rwxrwxrwx /Applications/MAMP/htdocs/app/vendor/h4cc/wkhtmltoimage-amd64/bin/wkhtmltoimage-amd64
90
90
 
91
91
  -rwxrwxrwx /usr/local/bin/wkhtmltoimage-amd64
92
92