导入cv2时出错:“ libSM.so.6:无法打开共享库文件:没有这样的文件或目录”

如何解决导入cv2时出错:“ libSM.so.6:无法打开共享库文件:没有这样的文件或目录”

我正在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 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",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",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",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",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",in url_patterns
Sep 10 19:59:31 ip-172-31-16-39 web: patterns = getattr(self.urlconf_module,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",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",in import_module
Sep 10 19:59:31 ip-172-31-16-39 web: return _bootstrap._gcd_import(name[level:],level)
Sep 10 19:59:31 ip-172-31-16-39 web: File "<frozen importlib._bootstrap>",in _gcd_import
Sep 10 19:59:31 ip-172-31-16-39 web: File "<frozen importlib._bootstrap>",in _find_and_load
Sep 10 19:59:31 ip-172-31-16-39 web: File "<frozen importlib._bootstrap>",in _find_and_load_unlocked
Sep 10 19:59:31 ip-172-31-16-39 web: File "<frozen importlib._bootstrap>",in _load_unlocked
Sep 10 19:59:31 ip-172-31-16-39 web: File "<frozen importlib._bootstrap_external>",in exec_module
Sep 10 19:59:31 ip-172-31-16-39 web: File "<frozen importlib._bootstrap>",in _call_with_frames_removed
Sep 10 19:59:31 ip-172-31-16-39 web: File "/var/app/current/mysite/urls.py",in <module>
Sep 10 19:59:31 ip-172-31-16-39 web: path('',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",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",in _call_with_frames_removed
Sep 10 19:59:31 ip-172-31-16-39 web: File "/var/app/current/main/urls.py",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",in <module>
Sep 10 19:59:31 ip-172-31-16-39 web: from .ml_models import covid_model,severity_model
Sep 10 19:59:31 ip-172-31-16-39 web: File "/var/app/current/main/ml_models.py",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",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",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,server: 
2020/09/10 00:49:00 [warn] 4261#0: *165 using uninitialized "day" variable while logging request,server: 
2020/09/10 00:49:00 [warn] 4261#0: *165 using uninitialized "hour" variable while logging request,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,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,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,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,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,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,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,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,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,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,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,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"

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


依赖报错 idea导入项目后依赖报错,解决方案:https://blog.csdn.net/weixin_42420249/article/details/81191861 依赖版本报错:更换其他版本 无法下载依赖可参考:https://blog.csdn.net/weixin_42628809/a
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下 2021-12-03 13:33:33.927 ERROR 7228 [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPL
错误1:gradle项目控制台输出为乱码 # 解决方案:https://blog.csdn.net/weixin_43501566/article/details/112482302 # 在gradle-wrapper.properties 添加以下内容 org.gradle.jvmargs=-Df
错误还原:在查询的过程中,传入的workType为0时,该条件不起作用 &lt;select id=&quot;xxx&quot;&gt; SELECT di.id, di.name, di.work_type, di.updated... &lt;where&gt; &lt;if test=&qu
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct redisServer’没有名为‘server_cpulist’的成员 redisSetCpuAffinity(server.server_cpulist); ^ server.c: 在函数‘hasActiveC
解决方案1 1、改项目中.idea/workspace.xml配置文件,增加dynamic.classpath参数 2、搜索PropertiesComponent,添加如下 &lt;property name=&quot;dynamic.classpath&quot; value=&quot;tru
删除根组件app.vue中的默认代码后报错:Module Error (from ./node_modules/eslint-loader/index.js): 解决方案:关闭ESlint代码检测,在项目根目录创建vue.config.js,在文件中添加 module.exports = { lin
查看spark默认的python版本 [root@master day27]# pyspark /home/software/spark-2.3.4-bin-hadoop2.7/conf/spark-env.sh: line 2: /usr/local/hadoop/bin/hadoop: No s
使用本地python环境可以成功执行 import pandas as pd import matplotlib.pyplot as plt # 设置字体 plt.rcParams[&#39;font.sans-serif&#39;] = [&#39;SimHei&#39;] # 能正确显示负号 p
错误1:Request method ‘DELETE‘ not supported 错误还原:controller层有一个接口,访问该接口时报错:Request method ‘DELETE‘ not supported 错误原因:没有接收到前端传入的参数,修改为如下 参考 错误2:cannot r
错误1:启动docker镜像时报错:Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen 解决方法:重启docker -&gt; systemctl r
错误1:private field ‘xxx‘ is never assigned 按Altʾnter快捷键,选择第2项 参考:https://blog.csdn.net/shi_hong_fei_hei/article/details/88814070 错误2:启动时报错,不能找到主启动类 #
报错如下,通过源不能下载,最后警告pip需升级版本 Requirement already satisfied: pip in c:\users\ychen\appdata\local\programs\python\python310\lib\site-packages (22.0.4) Coll
错误1:maven打包报错 错误还原:使用maven打包项目时报错如下 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources)
错误1:服务调用时报错 服务消费者模块assess通过openFeign调用服务提供者模块hires 如下为服务提供者模块hires的控制层接口 @RestController @RequestMapping(&quot;/hires&quot;) public class FeignControl
错误1:运行项目后报如下错误 解决方案 报错2:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sb 解决方案:在pom.
参考 错误原因 过滤器或拦截器在生效时,redisTemplate还没有注入 解决方案:在注入容器时就生效 @Component //项目运行时就注入Spring容器 public class RedisBean { @Resource private RedisTemplate&lt;String
使用vite构建项目报错 C:\Users\ychen\work&gt;npm init @vitejs/app @vitejs/create-app is deprecated, use npm init vite instead C:\Users\ychen\AppData\Local\npm-