gpt4 book ai didi

python - 导入cv2时出错: 'libSM.so.6: cannot open shared object file: No such file or directory'

转载 作者:行者123 更新时间:2023-12-02 16:22:53 25 4
gpt4 key购买 nike

我在AWS Elastic beantalk上部署了Django应用,遇到以下错误:

ImportError: libSM.so.6: cannot open shared object file: No such file or directory.
我在下面附上了日志,描述错误的是“var / log / web.stdout.log”。我研究的最初解决方法是将这些行添加到django.config文件中:
  03_install_cv:
command: "sudo apt-get update"
command: "sudo apt-get install -y libsm6 libxext6 libxrender-dev"
但是,我仍然遇到相同的错误。你知道另一种解决办法是什么吗?我在下面包括了我的日志。让我知道我是否还有其他可以提供信息的信息。谢谢!!
/var/log/web.stdout.log
Sep 10 19:43:25 ip-172-31-16-39 web: File "/var/app/venv/staging-LQM1lest/lib/python3.7/site-packages/django/utils/deprecation.py", line 113, in __call__
Sep 10 19:43:25 ip-172-31-16-39 web: response = self.process_request(request)
Sep 10 19:43:25 ip-172-31-16-39 web: File "/var/app/venv/staging-LQM1lest/lib/python3.7/site-packages/django/middleware/common.py", line 53, in process_request
Sep 10 19:43:25 ip-172-31-16-39 web: if self.should_redirect_with_slash(request):
Sep 10 19:43:25 ip-172-31-16-39 web: File "/var/app/venv/staging-LQM1lest/lib/python3.7/site-packages/django/middleware/common.py", line 71, in should_redirect_with_slash
Sep 10 19:43:25 ip-172-31-16-39 web: not is_valid_path(request.path_info, urlconf) and
Sep 10 19:43:25 ip-172-31-16-39 web: File "/var/app/venv/staging-LQM1lest/lib/python3.7/site-packages/django/urls/base.py", line 154, in is_valid_path
Sep 10 19:43:25 ip-172-31-16-39 web: resolve(path, urlconf)
Sep 10 19:43:25 ip-172-31-16-39 web: File "/var/app/venv/staging-LQM1lest/lib/python3.7/site-packages/django/urls/base.py", line 25, in resolve
Sep 10 19:43:25 ip-172-31-16-39 web: return get_resolver(urlconf).resolve(path)
Sep 10 19:43:25 ip-172-31-16-39 web: File "/var/app/venv/staging-LQM1lest/lib/python3.7/site-packages/django/urls/resolvers.py", line 545, in resolve
Sep 10 19:43:25 ip-172-31-16-39 web: for pattern in self.url_patterns:
Sep 10 19:43:25 ip-172-31-16-39 web: File "/var/app/venv/staging-LQM1lest/lib/python3.7/site-packages/django/utils/functional.py", line 48, in __get__
Sep 10 19:43:25 ip-172-31-16-39 web: res = instance.__dict__[self.name] = self.func(instance)
Sep 10 19:43:25 ip-172-31-16-39 web: File "/var/app/venv/staging-LQM1lest/lib/python3.7/site-packages/django/urls/resolvers.py", line 589, in url_patterns
Sep 10 19:43:25 ip-172-31-16-39 web: patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
Sep 10 19:43:25 ip-172-31-16-39 web: File "/var/app/venv/staging-LQM1lest/lib/python3.7/site-packages/django/utils/functional.py", line 48, in __get__
Sep 10 19:43:25 ip-172-31-16-39 web: res = instance.__dict__[self.name] = self.func(instance)
Sep 10 19:43:25 ip-172-31-16-39 web: File "/var/app/venv/staging-LQM1lest/lib/python3.7/site-packages/django/urls/resolvers.py", line 582, in urlconf_module
Sep 10 19:43:25 ip-172-31-16-39 web: return import_module(self.urlconf_name)
Sep 10 19:43:25 ip-172-31-16-39 web: File "/usr/lib64/python3.7/importlib/__init__.py", line 127, in import_module
Sep 10 19:43:25 ip-172-31-16-39 web: return _bootstrap._gcd_import(name[level:], package, level)
Sep 10 19:43:25 ip-172-31-16-39 web: File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
Sep 10 19:43:25 ip-172-31-16-39 web: File "<frozen importlib._bootstrap>", line 983, in _find_and_load
Sep 10 19:43:25 ip-172-31-16-39 web: File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
Sep 10 19:43:25 ip-172-31-16-39 web: File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
Sep 10 19:43:25 ip-172-31-16-39 web: File "<frozen importlib._bootstrap_external>", line 728, in exec_module
Sep 10 19:43:25 ip-172-31-16-39 web: File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
Sep 10 19:43:25 ip-172-31-16-39 web: File "/var/app/current/mysite/urls.py", line 24, in <module>
Sep 10 19:43:25 ip-172-31-16-39 web: path('', include('main.urls')),
Sep 10 19:43:25 ip-172-31-16-39 web: File "/var/app/venv/staging-LQM1lest/lib/python3.7/site-packages/django/urls/conf.py", line 34, in include
Sep 10 19:43:25 ip-172-31-16-39 web: urlconf_module = import_module(urlconf_module)
Sep 10 19:43:25 ip-172-31-16-39 web: File "/usr/lib64/python3.7/importlib/__init__.py", line 127, in import_module
Sep 10 19:43:25 ip-172-31-16-39 web: return _bootstrap._gcd_import(name[level:], package, level)
Sep 10 19:43:25 ip-172-31-16-39 web: File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
Sep 10 19:43:25 ip-172-31-16-39 web: File "<frozen importlib._bootstrap>", line 983, in _find_and_load
Sep 10 19:43:25 ip-172-31-16-39 web: File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
Sep 10 19:43:25 ip-172-31-16-39 web: File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
Sep 10 19:43:25 ip-172-31-16-39 web: File "<frozen importlib._bootstrap_external>", line 728, in exec_module
Sep 10 19:43:25 ip-172-31-16-39 web: File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
Sep 10 19:43:25 ip-172-31-16-39 web: File "/var/app/current/main/urls.py", line 16, in <module>
Sep 10 19:43:25 ip-172-31-16-39 web: from . import views
Sep 10 19:43:25 ip-172-31-16-39 web: File "/var/app/current/main/views.py", line 3, in <module>
Sep 10 19:43:25 ip-172-31-16-39 web: from .ml_models import covid_model, bone_model, severity_model
Sep 10 19:43:25 ip-172-31-16-39 web: File "/var/app/current/main/ml_models.py", line 2, in <module>
Sep 10 19:43:25 ip-172-31-16-39 web: from main import Image_based_severity_prediction
Sep 10 19:43:25 ip-172-31-16-39 web: File "/var/app/current/main/Image_based_severity_prediction.py", line 3, in <module>
Sep 10 19:43:25 ip-172-31-16-39 web: import cv2
Sep 10 19:43:25 ip-172-31-16-39 web: File "/var/app/venv/staging-LQM1lest/lib64/python3.7/site-packages/cv2/__init__.py", line 5, in <module>
Sep 10 19:43:25 ip-172-31-16-39 web: from .cv2 import *
Sep 10 19:43:25 ip-172-31-16-39 web: ImportError: libSM.so.6: cannot open shared object file: No such file or directory
Sep 10 19:59:31 ip-172-31-16-39 web: Internal Server Error: /
Sep 10 19:59:31 ip-172-31-16-39 web: Traceback (most recent call last):
Sep 10 19:59:31 ip-172-31-16-39 web: File "/var/app/venv/staging-LQM1lest/lib/python3.7/site-packages/django/core/handlers/exception.py", line 47, in inner
Sep 10 19:59:31 ip-172-31-16-39 web: response = get_response(request)
Sep 10 19:59:31 ip-172-31-16-39 web: File "/var/app/venv/staging-LQM1lest/lib/python3.7/site-packages/django/core/handlers/base.py", line 165, in _get_response
Sep 10 19:59:31 ip-172-31-16-39 web: callback, callback_args, callback_kwargs = self.resolve_request(request)
Sep 10 19:59:31 ip-172-31-16-39 web: File "/var/app/venv/staging-LQM1lest/lib/python3.7/site-packages/django/core/handlers/base.py", line 288, in resolve_request
Sep 10 19:59:31 ip-172-31-16-39 web: resolver_match = resolver.resolve(request.path_info)
Sep 10 19:59:31 ip-172-31-16-39 web: File "/var/app/venv/staging-LQM1lest/lib/python3.7/site-packages/django/urls/resolvers.py", line 545, in resolve
Sep 10 19:59:31 ip-172-31-16-39 web: for pattern in self.url_patterns:
Sep 10 19:59:31 ip-172-31-16-39 web: File "/var/app/venv/staging-LQM1lest/lib/python3.7/site-packages/django/utils/functional.py", line 48, in __get__
Sep 10 19:59:31 ip-172-31-16-39 web: res = instance.__dict__[self.name] = self.func(instance)
Sep 10 19:59:31 ip-172-31-16-39 web: File "/var/app/venv/staging-LQM1lest/lib/python3.7/site-packages/django/urls/resolvers.py", line 589, in url_patterns
Sep 10 19:59:31 ip-172-31-16-39 web: patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
Sep 10 19:59:31 ip-172-31-16-39 web: File "/var/app/venv/staging-LQM1lest/lib/python3.7/site-packages/django/utils/functional.py", line 48, in __get__
Sep 10 19:59:31 ip-172-31-16-39 web: res = instance.__dict__[self.name] = self.func(instance)
Sep 10 19:59:31 ip-172-31-16-39 web: File "/var/app/venv/staging-LQM1lest/lib/python3.7/site-packages/django/urls/resolvers.py", line 582, in urlconf_module
Sep 10 19:59:31 ip-172-31-16-39 web: return import_module(self.urlconf_name)
Sep 10 19:59:31 ip-172-31-16-39 web: File "/usr/lib64/python3.7/importlib/__init__.py", line 127, in import_module
Sep 10 19:59:31 ip-172-31-16-39 web: return _bootstrap._gcd_import(name[level:], package, level)
Sep 10 19:59:31 ip-172-31-16-39 web: File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
Sep 10 19:59:31 ip-172-31-16-39 web: File "<frozen importlib._bootstrap>", line 983, in _find_and_load
Sep 10 19:59:31 ip-172-31-16-39 web: File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
Sep 10 19:59:31 ip-172-31-16-39 web: File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
Sep 10 19:59:31 ip-172-31-16-39 web: File "<frozen importlib._bootstrap_external>", line 728, in exec_module
Sep 10 19:59:31 ip-172-31-16-39 web: File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
Sep 10 19:59:31 ip-172-31-16-39 web: File "/var/app/current/mysite/urls.py", line 24, in <module>
Sep 10 19:59:31 ip-172-31-16-39 web: path('', include('main.urls')),
Sep 10 19:59:31 ip-172-31-16-39 web: File "/var/app/venv/staging-LQM1lest/lib/python3.7/site-packages/django/urls/conf.py", line 34, in include
Sep 10 19:59:31 ip-172-31-16-39 web: urlconf_module = import_module(urlconf_module)
Sep 10 19:59:31 ip-172-31-16-39 web: File "/usr/lib64/python3.7/importlib/__init__.py", line 127, in import_module
Sep 10 19:59:31 ip-172-31-16-39 web: return _bootstrap._gcd_import(name[level:], package, level)
Sep 10 19:59:31 ip-172-31-16-39 web: File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
Sep 10 19:59:31 ip-172-31-16-39 web: File "<frozen importlib._bootstrap>", line 983, in _find_and_load
Sep 10 19:59:31 ip-172-31-16-39 web: File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
Sep 10 19:59:31 ip-172-31-16-39 web: File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
Sep 10 19:59:31 ip-172-31-16-39 web: File "<frozen importlib._bootstrap_external>", line 728, in exec_module
Sep 10 19:59:31 ip-172-31-16-39 web: File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
Sep 10 19:59:31 ip-172-31-16-39 web: File "/var/app/current/main/urls.py", line 16, in <module>
Sep 10 19:59:31 ip-172-31-16-39 web: from . import views
Sep 10 19:59:31 ip-172-31-16-39 web: File "/var/app/current/main/views.py", line 3, in <module>
Sep 10 19:59:31 ip-172-31-16-39 web: from .ml_models import covid_model, bone_model, severity_model
Sep 10 19:59:31 ip-172-31-16-39 web: File "/var/app/current/main/ml_models.py", line 2, in <module>
Sep 10 19:59:31 ip-172-31-16-39 web: from main import Image_based_severity_prediction
Sep 10 19:59:31 ip-172-31-16-39 web: File "/var/app/current/main/Image_based_severity_prediction.py", line 3, in <module>
Sep 10 19:59:31 ip-172-31-16-39 web: import cv2
Sep 10 19:59:31 ip-172-31-16-39 web: File "/var/app/venv/staging-LQM1lest/lib64/python3.7/site-packages/cv2/__init__.py", line 5, in <module>
Sep 10 19:59:31 ip-172-31-16-39 web: from .cv2 import *
Sep 10 19:59:31 ip-172-31-16-39 web: ImportError: libSM.so.6: cannot open shared object file: No such file or directory
/var/log/nginx/access.log
61.219.11.153 - - [09/Sep/2020:23:02:37 +0000] "\x01A\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" 400 157 "-" "-" "-"
187.19.200.74 - - [09/Sep/2020:23:20:40 +0000] "GET / HTTP/1.1" 200 1567 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36" "-"
193.118.53.210 - - [10/Sep/2020:00:30:23 +0000] "GET /solr/ HTTP/1.1" 404 3152 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36" "-"
45.148.10.28 - - [10/Sep/2020:00:49:00 +0000] "POST /boaform/admin/formLogin HTTP/1.1" 404 3207 "http://54.191.28.187:80/admin/login.asp" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:71.0) Gecko/20100101 Firefox/71.0" "-"
103.138.4.153 - - [10/Sep/2020:04:05:58 +0000] "GET / HTTP/1.1" 500 192473 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36" "-"
27.6.139.208 - - [10/Sep/2020:19:43:27 +0000] "h+/tmp/gpon80&ipv=0" 400 0 "-" "-" "-"
193.138.154.68 - - [10/Sep/2020:19:59:32 +0000] "GET / HTTP/1.1" 500 192431 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/601.7.7 (KHTML, like Gecko) Version/9.1.2 Safari/601.7.7" "-"
/var/log/nginx/error.log
2020/09/09 23:02:37 [warn] 4261#0: *160 using uninitialized "month" variable while logging request, client: 61.219.11.153, server: , request: "A����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������"
2020/09/10 00:49:00 [warn] 4261#0: *165 using uninitialized "year" variable while logging request, client: 45.148.10.28, server:
2020/09/10 00:49:00 [warn] 4261#0: *165 using uninitialized "month" variable while logging request, client: 45.148.10.28, server:
2020/09/10 00:49:00 [warn] 4261#0: *165 using uninitialized "day" variable while logging request, client: 45.148.10.28, server:
2020/09/10 00:49:00 [warn] 4261#0: *165 using uninitialized "hour" variable while logging request, client: 45.148.10.28, server:
2020/09/10 11:40:47 [warn] 20238#0: *42 an upstream response is buffered to a temporary file /var/lib/nginx/tmp/proxy/6/01/0000000016 while reading upstream, client: 192.35.169.96, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8000/", host: "54.191.28.187"
2020/09/10 11:41:01 [warn] 20238#0: *44 an upstream response is buffered to a temporary file /var/lib/nginx/tmp/proxy/7/01/0000000017 while reading upstream, client: 133.34.149.5, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8000/", host: "54.191.28.187
2020/09/10 12:50:52 [warn] 20238#0: *72 an upstream response is buffered to a temporary file /var/lib/nginx/tmp/proxy/7/02/0000000027 while reading upstream, client: 47.115.156.157, server: , request: "GET /thinkphp/html/public/index.php HTTP/1.1", upstream: "http://127.0.0.1:8000/thinkphp/html/public/index.php", host: "54.191.28.187"
2020/09/10 12:50:53 [warn] 20238#0: *74 an upstream response is buffered to a temporary file /var/lib/nginx/tmp/proxy/8/02/0000000028 while reading upstream, client: 47.115.156.157, server: , request: "GET /html/public/index.php HTTP/1.1", upstream: "http://127.0.0.1:8000/html/public/index.php", host: "54.191.28.187"
2020/09/10 12:50:54 [warn] 20238#0: *76 an upstream response is buffered to a temporary file /var/lib/nginx/tmp/proxy/9/02/0000000029 while reading upstream, client: 47.115.156.157, server: , request: "GET /public/index.php HTTP/1.1", upstream: "http://127.0.0.1:8000/public/index.php", host: "54.191.28.187"
2020/09/10 12:50:54 [warn] 20238#0: *78 an upstream response is buffered to a temporary file /var/lib/nginx/tmp/proxy/0/03/0000000030 while reading upstream, client: 47.115.156.157, server: , request: "GET /TP/html/public/index.php HTTP/1.1", upstream: "http://127.0.0.1:8000/TP/html/public/index.php", host: "54.191.28.187"
2020/09/10 12:50:55 [warn] 20238#0: *80 an upstream response is buffered to a temporary file /var/lib/nginx/tmp/proxy/1/03/0000000031 while reading upstream, client: 47.115.156.157, server: , request: "GET /elrekt.php HTTP/1.1", upstream: "http://127.0.0.1:8000/elrekt.php", host: "54.191.28.187"
2020/09/10 13:30:30 [warn] 20238#0: *92 an upstream response is buffered to a temporary file /var/lib/nginx/tmp/proxy/7/03/0000000037 while reading upstream, client: 83.97.20.252, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8000/", host: "54.191.28.187:80"
2020/09/10 13:40:08 [warn] 20238#0: *97 an upstream response is buffered to a temporary file /var/lib/nginx/tmp/proxy/8/03/0000000038 while reading upstream, client: 173.49.32.209, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8000/", host: "testing-env.us-west-2.elasticbeanstalk.com"
2020/09/10 19:43:27 [warn] 31284#0: *24 using uninitialized "hour" variable while logging request, client: 27.6.139.208, server: , request: "h+/tmp/gpon80&ipv=0"
2020/09/10 19:59:31 [warn] 31284#0: *26 an upstream response is buffered to a temporary file /var/lib/nginx/tmp/proxy/2/01/0000000012 while reading upstream, client: 193.138.154.68, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8000/", host: "54.191.28.187:80"
/var/log/eb-engine.log
2020/09/10 20:42:57.767385 [INFO] Executing instruction: StageApplication
2020/09/10 20:43:00.686811 [INFO] extracting /opt/elasticbeanstalk/deployment/app_source_bundle to /var/app/staging/
2020/09/10 20:43:00.686856 [INFO] Running command /bin/sh -c /usr/bin/unzip -q -o /opt/elasticbeanstalk/deployment/app_source_bundle -d /var/app/staging/
2020/09/10 20:43:03.521847 [INFO] finished extracting /opt/elasticbeanstalk/deployment/app_source_bundle to /var/app/staging/ successfully
2020/09/10 20:43:03.524097 [INFO] Executing instruction: RunAppDeployPreBuildHooks
2020/09/10 20:43:03.524116 [INFO] The dir .platform/hooks/prebuild/ does not exist in the application. Skipping this step...
2020/09/10 20:43:03.524121 [INFO] Executing instruction: InstallDependency
2020/09/10 20:43:03.524127 [INFO] checking dependencies file
2020/09/10 20:43:03.524135 [INFO] Installing dependencies with requirements.txt by using Pip
2020/09/10 20:43:03.524153 [INFO] Running command /bin/sh -c /var/app/venv/staging-LQM1lest/bin/pip install -r requirements.txt
2020/09/10 20:43:04.021702 [INFO] Requirement already satisfied: asgiref==3.2.10 in /var/app/venv/staging-LQM1lest/lib/python3.7/site-packages (from -r requirements.txt (line 1)) (3.2.10)
Requirement already satisfied: cycler==0.10.0 in /var/app/venv/staging-LQM1lest/lib/python3.7/site-packages (from -r requirements.txt (line 2)) (0.10.0)
Requirement already satisfied: Django==3.1 in /var/app/venv/staging-LQM1lest/lib/python3.7/site-packages (from -r requirements.txt (line 3)) (3.1)
Requirement already satisfied: django-tinymce==3.0.2 in /var/app/venv/staging-LQM1lest/lib/python3.7/site-packages (from -r requirements.txt (line 4)) (3.0.2)
Requirement already satisfied: efficientnet-pytorch==0.6.3 in /var/app/venv/staging-LQM1lest/lib/python3.7/site-packages (from -r requirements.txt (line 5)) (0.6.3)
Requirement already satisfied: future==0.18.2 in /var/app/venv/staging-LQM1lest/lib/python3.7/site-packages (from -r requirements.txt (line 6)) (0.18.2)
Requirement already satisfied: kiwisolver==1.2.0 in /var/app/venv/staging-LQM1lest/lib64/python3.7/site-packages (from -r requirements.txt (line 7)) (1.2.0)
Requirement already satisfied: matplotlib==3.3.1 in /var/app/venv/staging-LQM1lest/lib64/python3.7/site-packages (from -r requirements.txt (line 8)) (3.3.1)
Requirement already satisfied: numpy==1.19.1 in /var/app/venv/staging-LQM1lest/lib64/python3.7/site-packages (from -r requirements.txt (line 9)) (1.19.1)
Requirement already satisfied: opencv-python==4.2.0.34 in /var/app/venv/staging-LQM1lest/lib64/python3.7/site-packages (from -r requirements.txt (line 10)) (4.2.0.34)
Requirement already satisfied: Pillow==7.2.0 in /var/app/venv/staging-LQM1lest/lib64/python3.7/site-packages (from -r requirements.txt (line 11)) (7.2.0)
Requirement already satisfied: pydicom==2.0.0 in /var/app/venv/staging-LQM1lest/lib/python3.7/site-packages (from -r requirements.txt (line 12)) (2.0.0)
Requirement already satisfied: pynrrd==0.4.2 in /var/app/venv/staging-LQM1lest/lib/python3.7/site-packages (from -r requirements.txt (line 13)) (0.4.2)
Requirement already satisfied: pyparsing==2.4.7 in /var/app/venv/staging-LQM1lest/lib/python3.7/site-packages (from -r requirements.txt (line 14)) (2.4.7)
Requirement already satisfied: python-dateutil==2.8.1 in /var/app/venv/staging-LQM1lest/lib/python3.7/site-packages (from -r requirements.txt (line 15)) (2.8.1)
Requirement already satisfied: pytz==2020.1 in /var/app/venv/staging-LQM1lest/lib/python3.7/site-packages (from -r requirements.txt (line 16)) (2020.1)
Requirement already satisfied: six==1.15.0 in /var/app/venv/staging-LQM1lest/lib/python3.7/site-packages (from -r requirements.txt (line 17)) (1.15.0)
Requirement already satisfied: sqlparse==0.3.1 in /var/app/venv/staging-LQM1lest/lib/python3.7/site-packages (from -r requirements.txt (line 18)) (0.3.1)
Requirement already satisfied: torchvision==0.7.0 in /var/app/venv/staging-LQM1lest/lib64/python3.7/site-packages (from -r requirements.txt (line 19)) (0.7.0)
Requirement already satisfied: torch in /var/app/venv/staging-LQM1lest/lib64/python3.7/site-packages (from efficientnet-pytorch==0.6.3->-r requirements.txt (line 5)) (1.6.0)
Requirement already satisfied: certifi>=2020.06.20 in /var/app/venv/staging-LQM1lest/lib/python3.7/site-packages (from matplotlib==3.3.1->-r requirements.txt (line 8)) (2020.6.20)

2020/09/10 20:43:04.021760 [INFO] No dependency file found
2020/09/10 20:43:04.021767 [INFO] Executing instruction: check Procfile
2020/09/10 20:43:04.021805 [INFO] creating default Procfile...
2020/09/10 20:43:04.021891 [INFO] Executing instruction: configure X-Ray
2020/09/10 20:43:04.021896 [INFO] X-Ray is not enabled.
/var/app/staging/.platform/nginx/. /var/proxy/staging/nginx
2020/09/10 20:43:04.031414 [INFO] Executing instruction: configure healthd specific proxy conf
2020/09/10 20:43:04.032595 [INFO] Running command /bin/sh -c systemctl show -p PartOf healthd.service
2020/09/10 20:43:04.036874 [WARN] Warning: process healthd is already registered...
Deregistering the process ...
2020/09/10 20:43:04.036909 [INFO] Running command /bin/sh -c systemctl show -p PartOf healthd.service
2020/09/10 20:43:04.040803 [INFO] Running command /bin/sh -c systemctl is-active healthd.service
2020/09/10 20:43:04.044033 [INFO] Running command /bin/sh -c systemctl show -p PartOf healthd.service
2020/09/10 20:43:04.047890 [INFO] Running command /bin/sh -c systemctl stop healthd.service
2020/09/10 20:43:04.061943 [INFO] Running command /bin/sh -c systemctl disable healthd.service
2020/09/10 20:43:04.136528 [INFO] Running command /bin/sh -c systemctl daemon-reload
2020/09/10 20:43:04.211834 [INFO] Running command /bin/sh -c systemctl reset-failed
2020/09/10 20:43:04.217419 [INFO] Running command /bin/sh -c systemctl daemon-reload
2020/09/10 20:43:04.289483 [INFO] Running command /bin/sh -c systemctl reset-failed
2020/09/10 20:43:04.293075 [INFO] Running command /bin/sh -c systemctl is-enabled aws-eb.target
2020/09/10 20:43:04.296611 [INFO] Running command /bin/sh -c systemctl enable aws-eb.target
2020/09/10 20:43:04.364041 [INFO] Running command /bin/sh -c systemctl start aws-eb.target
2020/09/10 20:43:04.368106 [INFO] Running command /bin/sh -c systemctl enable healthd.service
2020/09/10 20:43:04.440687 [INFO] Running command /bin/sh -c systemctl show -p PartOf healthd.service
2020/09/10 20:43:04.445226 [INFO] Running command /bin/sh -c systemctl is-active healthd.service
2020/09/10 20:43:04.448676 [INFO] Running command /bin/sh -c systemctl start healthd.service
2020/09/10 20:43:04.469428 [INFO] Copying file /opt/elasticbeanstalk/config/private/healthd/healthd_logformat.conf to /var/proxy/staging/nginx/conf.d/healthd_logformat.conf
2020/09/10 20:43:04.470854 [INFO] Copying file /opt/elasticbeanstalk/config/private/healthd/healthd_nginx.conf to /var/proxy/staging/nginx/conf.d/elasticbeanstalk/healthd.conf
2020/09/10 20:43:04.482498 [INFO] Executing instruction: GetToggleForceRotate
2020/09/10 20:43:04.482511 [INFO] Checking if logs need forced rotation
2020/09/10 20:43:04.482531 [INFO] Running command /bin/sh -c /opt/aws/bin/cfn-get-metadata -s arn:aws:cloudformation:us-west-2:719930975199:stack/awseb-e-kagvpnbvff-stack/2e434ba0-eb98-11ea-a9bf-0ae10a278694 -r AWSEBAutoScalingGroup --region us-west-2
2020/09/10 20:43:04.857832 [INFO] Running command /bin/sh -c /opt/aws/bin/cfn-get-metadata -s arn:aws:cloudformation:us-west-2:719930975199:stack/awseb-e-kagvpnbvff-stack/2e434ba0-eb98-11ea-a9bf-0ae10a278694 -r AWSEBBeanstalkMetadata --region us-west-2
2020/09/10 20:43:05.166358 [INFO] Copying file /opt/elasticbeanstalk/config/private/rsyslog.conf to /etc/rsyslog.d/web.conf
2020/09/10 20:43:05.167742 [INFO] Running command /bin/sh -c systemctl restart rsyslog.service
2020/09/10 20:43:05.185163 [INFO] Executing instruction: PostBuildEbExtension
2020/09/10 20:43:05.185195 [INFO] Starting executing the config set Infra-EmbeddedPostBuild.
2020/09/10 20:43:05.185224 [INFO] Running command /bin/sh -c /opt/aws/bin/cfn-init -s arn:aws:cloudformation:us-west-2:719930975199:stack/awseb-e-kagvpnbvff-stack/2e434ba0-eb98-11ea-a9bf-0ae10a278694 -r AWSEBAutoScalingGroup --region us-west-2 --configsets Infra-EmbeddedPostBuild
2020/09/10 20:43:05.596038 [ERROR] An error occurred during execution of command [app-deploy] - [PostBuildEbExtension]. Stop running the command. Error: Container commands build failed. Please refer to /var/log/cfn-init.log for more details.

2020/09/10 20:43:05.596063 [INFO] Executing cleanup logic
2020/09/10 20:43:05.596165 [INFO] CommandService Response: {"status":"FAILURE","api_version":"1.0","results":[{"status":"FAILURE","msg":"Engine execution has encountered an error.","returncode":1,"events":[{"msg":"Instance deployment successfully generated a 'Procfile'.","timestamp":1599770584,"severity":"INFO"},{"msg":"Instance deployment failed. For details, see 'eb-engine.log'.","timestamp":1599770585,"severity":"ERROR"}]}]}

2020/09/10 20:43:05.596361 [INFO] Platform Engine finished execution on command: app-deploy

2020/09/10 20:46:06.232839 [INFO] Starting...
2020/09/10 20:46:06.232903 [INFO] Starting EBPlatform-PlatformEngine
2020/09/10 20:46:06.232919 [INFO] reading event message file
2020/09/10 20:46:06.233027 [INFO] no eb envtier info file found, skip loading env tier info.
2020/09/10 20:46:06.233093 [INFO] Engine received EB command cfn-hup-exec

2020/09/10 20:46:06.340806 [INFO] Running command /bin/sh -c /opt/aws/bin/cfn-get-metadata -s arn:aws:cloudformation:us-west-2:719930975199:stack/awseb-e-kagvpnbvff-stack/2e434ba0-eb98-11ea-a9bf-0ae10a278694 -r AWSEBAutoScalingGroup --region us-west-2
2020/09/10 20:46:06.698074 [INFO] Running command /bin/sh -c /opt/aws/bin/cfn-get-metadata -s arn:aws:cloudformation:us-west-2:719930975199:stack/awseb-e-kagvpnbvff-stack/2e434ba0-eb98-11ea-a9bf-0ae10a278694 -r AWSEBBeanstalkMetadata --region us-west-2
2020/09/10 20:46:07.006187 [INFO] checking whether command tail-log is applicable to this instance...
2020/09/10 20:46:07.006202 [INFO] this command is applicable to the instance, thus instance should execute command
2020/09/10 20:46:07.006206 [INFO] Engine command: (tail-log)

2020/09/10 20:46:07.006260 [INFO] Executing instruction: GetTailLogs
2020/09/10 20:46:07.006265 [INFO] Tail Logs...
2020/09/10 20:46:07.006509 [INFO] Running command /bin/sh -c tail -n 100 /var/log/web.stdout.log
2020/09/10 20:46:07.008191 [INFO] Running command /bin/sh -c tail -n 100 /var/log/nginx/access.log
2020/09/10 20:46:07.009800 [INFO] Running command /bin/sh -c tail -n 100 /var/log/nginx/error.log
2020/09/10 20:46:07.011355 [INFO] Running command /bin/sh -c tail -n 100 /var/log/eb-engine.log




最佳答案

apt-get适用于 Ubuntu 。 Elastic Beanstalk基于Amazon Linux 2,您应该使用yum。因此,以下操作将无效:

  03_install_cv:
command: "sudo apt-get update"
command: "sudo apt-get install -y libsm6 libxext6 libxrender-dev"
您必须找到适用于Amazon Linux 2的 等效软件包,然后使用 yum进行安装。
也许以下是您所需要的:
  03_install_cv:
command: "yum update -y && yum install -y libXext libSM libXrender"

关于python - 导入cv2时出错: 'libSM.so.6: cannot open shared object file: No such file or directory',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63837617/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com