回答編集履歴
1
記述が足りなかったため
answer
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
chrome
|
1
|
+
chromeが壊れているかもしれないというエラーに変更になりました。
|
2
2
|
```AWS
|
3
3
|
ec2-user:~/environment/ch2 $ python3 chromedriver.py
|
4
4
|
Traceback (most recent call last):
|
@@ -17,4 +17,76 @@
|
|
17
17
|
selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally
|
18
18
|
(unknown error: DevToolsActivePort file doesn't exist)
|
19
19
|
(The process started from chrome location /opt/google/chrome/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
|
20
|
+
|
20
|
-
```
|
21
|
+
```
|
22
|
+
|
23
|
+
尚、/opt/google/chromeは以下の通りです。
|
24
|
+
|
25
|
+
```AWS
|
26
|
+
ec2-user:/opt/google/chrome $ ls
|
27
|
+
chrome lib product_logo_16.png swiftshader
|
28
|
+
chrome_100_percent.pak locales product_logo_24.png v8_context_snapshot.bin
|
29
|
+
chrome_200_percent.pak MEIPreload product_logo_256.png WidevineCdm
|
30
|
+
chrome-sandbox nacl_helper product_logo_32.png xdg-mime
|
31
|
+
default-app-block nacl_helper_bootstrap product_logo_32.xpm xdg-settings
|
32
|
+
default_apps nacl_irt_x86_64.nexe product_logo_48.png
|
33
|
+
google-chrome natives_blob.bin product_logo_64.png
|
34
|
+
icudtl.dat product_logo_128.png resources.pak
|
35
|
+
```
|
36
|
+
|
37
|
+
また、vi google-chromeは以下のようになっています。
|
38
|
+
|
39
|
+
|
40
|
+
```vim
|
41
|
+
#!/bin/bash
|
42
|
+
#
|
43
|
+
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
44
|
+
# Use of this source code is governed by a BSD-style license that can be
|
45
|
+
# found in the LICENSE file.
|
46
|
+
|
47
|
+
# Let the wrapped binary know that it has been run through the wrapper.
|
48
|
+
export CHROME_WRAPPER="`readlink -f "$0"`"
|
49
|
+
|
50
|
+
HERE="`dirname "$CHROME_WRAPPER"`"
|
51
|
+
|
52
|
+
# We include some xdg utilities next to the binary, and we want to prefer them
|
53
|
+
# over the system versions when we know the system versions are very old. We
|
54
|
+
# detect whether the system xdg utilities are sufficiently new to be likely to
|
55
|
+
# work for us by looking for xdg-settings. If we find it, we leave $PATH alone,
|
56
|
+
# so that the system xdg utilities (including any distro patches) will be used.
|
57
|
+
if ! which xdg-settings &> /dev/null; then
|
58
|
+
# Old xdg utilities. Prepend $HERE to $PATH to use ours instead.
|
59
|
+
export PATH="$HERE:$PATH"
|
60
|
+
else
|
61
|
+
# Use system xdg utilities. But first create mimeapps.list if it doesn't
|
62
|
+
# exist; some systems have bugs in xdg-mime that make it fail without it.
|
63
|
+
xdg_app_dir="${XDG_DATA_HOME:-$HOME/.local/share/applications}"
|
64
|
+
mkdir -p "$xdg_app_dir"
|
65
|
+
[ -f "$xdg_app_dir/mimeapps.list" ] || touch "$xdg_app_dir/mimeapps.list"
|
66
|
+
fi
|
67
|
+
|
68
|
+
# Always use our versions of ffmpeg libs.
|
69
|
+
# This also makes RPMs find the compatibly-named library symlinks.
|
70
|
+
if [[ -n "$LD_LIBRARY_PATH" ]]; then
|
71
|
+
LD_LIBRARY_PATH="$HERE:$HERE/lib:$LD_LIBRARY_PATH"
|
72
|
+
else
|
73
|
+
LD_LIBRARY_PATH="$HERE:$HERE/lib"
|
74
|
+
fi
|
75
|
+
export LD_LIBRARY_PATH
|
76
|
+
|
77
|
+
export CHROME_VERSION_EXTRA="stable"
|
78
|
+
|
79
|
+
# We don't want bug-buddy intercepting our crashes. http://crbug.com/24120
|
80
|
+
export GNOME_DISABLE_CRASH_DIALOG=SET_BY_GOOGLE_CHROME
|
81
|
+
|
82
|
+
# Sanitize std{in,out,err} because they'll be shared with untrusted child
|
83
|
+
# processes (http://crbug.com/376567).
|
84
|
+
exec < /dev/null
|
85
|
+
exec > >(exec cat)
|
86
|
+
exec 2> >(exec cat >&2)
|
87
|
+
|
88
|
+
# Note: exec -a below is a bashism.
|
89
|
+
exec -a "$0" "$HERE/chrome" "$@"
|
90
|
+
```
|
91
|
+
|
92
|
+
引き続き、よろしくお願いします。
|