我是Heroku的初学者,目前正在开发一个Python应用程序(版本3.7.3),我正尝试在该应用程序中进行部署,以便可以在SalesForce中实现它。
在执行“ git push heroku master”命令时,我总是被以下语句所击倒:
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
我不确定如何解决该问题。
我已经阅读了许多有关此问题的主题,其中许多主题是使用Linux完成的,涉及视频游戏的分期付款或matplotlib的使用。
我正在使用Windows 10,我认为我的问题特别是由PyQt5引起的。我尝试安装其他站点上其他线程指向的其他库(一个是PyOpenGL),但没有一个解决了这个问题。
我最初的git push:
C:\Users\MyName\PycharmProjects\Gophishv2>git push heroku master
Enumerating objects: 9, done.
Counting objects: 100% (9/9), done.
Delta compression using up to 12 threads
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 762 bytes | 762.00 KiB/s, done.
Total 5 (delta 4), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Python app detected
remote: -----> Installing requirements with pip
remote:
remote: -----> Discovering process types
remote: Procfile declares types -> web
remote:
remote: -----> Compressing...
remote: Done: 217.1M
remote: -----> Launching...
remote: Released v6
remote: https://phishingapp.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.
To https://git.heroku.com/phishingapp.git
4a0b5a7..ce6e69d master -> master
检查Heroku日志后:
C:\Users\MyName\PycharmProjects\Gophishv2>heroku logs
2019-06-20T18:09:28.968957+00:00 app[web.1]: File "/app/MainWindow.py", line 1, in <module>
2019-06-20T18:09:28.968959+00:00 app[web.1]: from PyQt5 import QtCore, QtGui, QtWidgets
2019-06-20T18:09:28.968961+00:00 app[web.1]: ImportError: libGL.so.1: cannot open shared object file: No such file or directory
2019-06-20T18:09:28.969220+00:00 app[web.1]: [2019-06-20 18:09:28 +0000] [10] [INFO] Worker exiting (pid: 10)
2019-06-20T18:09:29.005764+00:00 app[web.1]: Traceback (most recent call last):
2019-06-20T18:09:29.005808+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 210, in run
2019-06-20T18:09:29.006136+00:00 app[web.1]: self.sleep()
2019-06-20T18:09:29.006143+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 360, in sleep
2019-06-20T18:09:29.006390+00:00 app[web.1]: ready = select.select([self.PIPE[0]], [], [], 1.0)
2019-06-20T18:09:29.006395+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 245, in handle_chld
2019-06-20T18:09:29.006615+00:00 app[web.1]: self.reap_workers()
2019-06-20T18:09:29.006670+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 525, in reap_workers
2019-06-20T18:09:29.007008+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)
2019-06-20T18:09:29.007057+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
2019-06-20T18:09:29.007063+00:00 app[web.1]:
2019-06-20T18:09:29.007065+00:00 app[web.1]: During handling of the above exception, another exception occurred:
2019-06-20T18:09:29.007067+00:00 app[web.1]:
2019-06-20T18:09:29.007071+00:00 app[web.1]: Traceback (most recent call last):
2019-06-20T18:09:29.007076+00:00 app[web.1]: File "/app/.heroku/python/bin/gunicorn", line 11, in <module>
2019-06-20T18:09:29.007205+00:00 app[web.1]: sys.exit(run())
2019-06-20T18:09:29.007210+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 61, in run
2019-06-20T18:09:29.007351+00:00 app[web.1]: WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
2019-06-20T18:09:29.007357+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 223, in run
2019-06-20T18:09:29.007525+00:00 app[web.1]: super(Application, self).run()
2019-06-20T18:09:29.007531+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 72, in run
2019-06-20T18:09:29.007665+00:00 app[web.1]: Arbiter(self).run()
2019-06-20T18:09:29.007672+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 232, in run
2019-06-20T18:09:29.007839+00:00 app[web.1]: self.halt(reason=inst.reason, exit_status=inst.exit_status)
2019-06-20T18:09:29.007845+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 345, in halt
2019-06-20T18:09:29.008052+00:00 app[web.1]: self.stop()
2019-06-20T18:09:29.008058+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 393, in stop
2019-06-20T18:09:29.008268+00:00 app[web.1]: time.sleep(0.1)
2019-06-20T18:09:29.008274+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 245, in handle_chld
2019-06-20T18:09:29.008480+00:00 app[web.1]: self.reap_workers()
2019-06-20T18:09:29.008485+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 525, in reap_workers
2019-06-20T18:09:29.008725+00:00 app[web.1]: raise HaltServer(reason, self.WORKER_BOOT_ERROR)
2019-06-20T18:09:29.008793+00:00 app[web.1]: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
2019-06-20T18:09:29.123253+00:00 heroku[web.1]: State changed from starting to crashed
2019-06-20T18:09:29.099357+00:00 heroku[web.1]: Process exited with status 1
2019-06-20T18:40:49.000000+00:00 app[api]: Build started by user dcrindone@gmail.com
2019-06-20T18:41:41.109022+00:00 heroku[web.1]: State changed from crashed to starting
2019-06-20T18:41:40.556795+00:00 app[api]: Release v6 created by user dcrindone@gmail.com
2019-06-20T18:41:40.556795+00:00 app[api]: Deploy ce6e69d4 by user dcrindone@gmail.com
2019-06-20T18:41:59.141059+00:00 heroku[web.1]: Starting process with command `gunicorn test:app`
2019-06-20T18:42:01.501288+00:00 app[web.1]: [2019-06-20 18:42:01 +0000] [4] [INFO] Starting gunicorn 19.9.0
2019-06-20T18:42:01.503407+00:00 app[web.1]: [2019-06-20 18:42:01 +0000] [4] [INFO] Listening at: http://0.0.0.0:36043 (4)
2019-06-20T18:42:01.503531+00:00 app[web.1]: [2019-06-20 18:42:01 +0000] [4] [INFO] Using worker: sync
2019-06-20T18:42:01.508127+00:00 app[web.1]: [2019-06-20 18:42:01 +0000] [10] [INFO] Booting worker with pid: 10
2019-06-20T18:42:01.597759+00:00 app[web.1]: [2019-06-20 18:42:01 +0000] [11] [INFO] Booting worker with pid: 11
2019-06-20T18:42:02.317990+00:00 heroku[web.1]: State changed from starting to up
2019-06-20T18:42:02.201676+00:00 app[web.1]: [2019-06-20 18:42:02 +0000] [11] [ERROR] Exception in worker process
2019-06-20T18:42:02.201707+00:00 app[web.1]: Traceback (most recent call last):
2019-06-20T18:42:02.201710+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
2019-06-20T18:42:02.201713+00:00 app[web.1]: worker.init_process()
2019-06-20T18:42:02.201715+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 129, in init_process
2019-06-20T18:42:02.201717+00:00 app[web.1]: self.load_wsgi()
2019-06-20T18:42:02.201719+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
2019-06-20T18:42:02.201721+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2019-06-20T18:42:02.201724+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
2019-06-20T18:42:02.201726+00:00 app[web.1]: self.callable = self.load()
2019-06-20T18:42:02.201741+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
2019-06-20T18:42:02.201743+00:00 app[web.1]: return self.load_wsgiapp()
2019-06-20T18:42:02.201746+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
2019-06-20T18:42:02.201748+00:00 app[web.1]: return util.import_app(self.app_uri)
2019-06-20T18:42:02.201750+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/util.py", line 350, in import_app
2019-06-20T18:42:02.201753+00:00 app[web.1]: __import__(module)
2019-06-20T18:42:02.201755+00:00 app[web.1]: File "/app/test.py", line 3, in <module>
2019-06-20T18:42:02.201757+00:00 app[web.1]: import MainWindow
2019-06-20T18:42:02.201760+00:00 app[web.1]: File "/app/MainWindow.py", line 1, in <module>
2019-06-20T18:42:02.201762+00:00 app[web.1]: from PyQt5 import QtCore, QtGui, QtWidgets, QtOpenGL
2019-06-20T18:42:02.201765+00:00 app[web.1]: ImportError: libGL.so.1: cannot open shared object file: No such file or directory
2019-06-20T18:42:02.201828+00:00 app[web.1]: [2019-06-20 18:42:02 +0000] [11] [INFO] Worker exiting (pid: 11)
2019-06-20T18:42:02.203045+00:00 app[web.1]: [2019-06-20 18:42:02 +0000] [10] [ERROR] Exception in worker process
2019-06-20T18:42:02.203049+00:00 app[web.1]: Traceback (most recent call last):
2019-06-20T18:42:02.203051+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
2019-06-20T18:42:02.203054+00:00 app[web.1]: worker.init_process()
2019-06-20T18:42:02.203056+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 129, in init_process
2019-06-20T18:42:02.203058+00:00 app[web.1]: self.load_wsgi()
2019-06-20T18:42:02.203061+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
2019-06-20T18:42:02.203063+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2019-06-20T18:42:02.203065+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
2019-06-20T18:42:02.203067+00:00 app[web.1]: self.callable = self.load()
2019-06-20T18:42:02.203069+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
2019-06-20T18:42:02.203072+00:00 app[web.1]: return self.load_wsgiapp()
2019-06-20T18:42:02.203074+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
2019-06-20T18:42:02.203081+00:00 app[web.1]: return util.import_app(self.app_uri)
2019-06-20T18:42:02.203083+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/util.py", line 350, in import_app
2019-06-20T18:42:02.203085+00:00 app[web.1]: __import__(module)
2019-06-20T18:42:02.203087+00:00 app[web.1]: File "/app/test.py", line 3, in <module>
2019-06-20T18:42:02.203089+00:00 app[web.1]: import MainWindow
2019-06-20T18:42:02.203092+00:00 app[web.1]: File "/app/MainWindow.py", line 1, in <module>
2019-06-20T18:42:02.203094+00:00 app[web.1]: from PyQt5 import QtCore, QtGui, QtWidgets, QtOpenGL
2019-06-20T18:42:02.203097+00:00 app[web.1]: ImportError: libGL.so.1: cannot open shared object file: No such file or directory
2019-06-20T18:42:02.203402+00:00 app[web.1]: [2019-06-20 18:42:02 +0000] [10] [INFO] Worker exiting (pid: 10)
2019-06-20T18:42:02.366875+00:00 app[web.1]: [2019-06-20 18:42:02 +0000] [4] [INFO] Shutting down: Master
2019-06-20T18:42:02.371215+00:00 app[web.1]: [2019-06-20 18:42:02 +0000] [4] [INFO] Reason: Worker failed to boot.
2019-06-20T18:42:02.544095+00:00 heroku[web.1]: State changed from up to crashed
2019-06-20T18:42:02.551091+00:00 heroku[web.1]: State changed from crashed to starting
2019-06-20T18:42:02.520322+00:00 heroku[web.1]: Process exited with status 3
2019-06-20T18:42:03.000000+00:00 app[api]: Build succeeded
我的个人档案:
web: gunicorn test:app
我的要求。txt:
alembic==1.0.5
boto==2.49.0
boto3==1.9.74
botocore==1.12.74
certifi==2019.6.16
chardet==3.0.4
click==6.7
docutils==0.14
dominate==2.3.1
Flask==0.12.2
Flask-Bootstrap==3.3.7.1
Flask-Login==0.4.1
Flask-Migrate==2.3.1
Flask-SQLAlchemy==2.3.2
Flask-WTF==0.14.2
gophish==0.2.5
gunicorn==19.9.0
idna==2.8
itsdangerous==0.24
Jinja2==2.10
jmespath==0.9.3
Mako==1.0.7
MarkupSafe==1.0
psycopg2==2.7.6.1
psycopg2-binary==2.7.6.1
PyOpenGL==3.1.0
PyQt5==5.12.2
PyQt5-sip==4.19.17
python-dateutil==2.7.5
python-editor==1.0.3
requests==2.22.0
s3transfer==0.1.13
selenium==3.141.0
six==1.12.0
SQLAlchemy==1.2.15
urllib3==1.24.1
visitor==0.1.3
Werkzeug==0.14.1
WTForms==2.2.1
似乎构建成功,但是由于问题标题中的ImportError每次都崩溃。
我很想听听您对这个问题的意见,并希望能够解决。如果您需要查看其他文件,请让我知道,谢谢!