为什么将Django代码推送到heroku时出错?

时间:2018-11-23 20:29:46

标签: python django heroku

当我尝试将Django网站的代码推送到Heroku时,出现以下错误:

remote:            /usr/bin/ld: 
/app/.heroku/python/lib/libpython3.6m.a(ceval.o): relocation 
R_X86_64_PC32 against symbol `_Py_NoneStruct' can not be used when 
making a shared object; recompile with -fPIC
remote:            /usr/bin/ld: final link failed: Bad value
remote:            collect2: error: ld returned 1 exit status
remote:            error: command 'gcc' failed with exit status 1
remote:            
remote:            ----------------------------------------
remote:        Command "/app/.heroku/python/bin/python -u -c "import 
setuptools, tokenize;__file__='/tmp/pip-build-hq2rsseo/mod- 
wsgi/setup.py';f=getattr(tokenize, 'open', open) 
(__file__);code=f.read().replace('\r\n', 
'\n');f.close();exec(compile(code, __file__, 'exec'))" install --record 
/tmp/pip-4wci3c07-record/install-record.txt --single-version- 
externally-managed --compile" failed with error code 1 in /tmp/pip- 
build-hq2rsseo/mod-wsgi/
remote:  !     Push rejected, failed to compile Python app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !   Push rejected to stormy-stream-43261.
remote: 
To https://git.heroku.com/stormy-stream-43261.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/stormy- 
stream-43261.git'

我认为这与Heroku不支持某些依赖关系有关,但是无论如何,我不知道该怎么做才能解决此问题。有什么想法吗?

0 个答案:

没有答案