簡體   English   中英

安裝pylibmc時出現Heroku / Django錯誤

[英]Heroku/Django Error when installing pylibmc

嘗試部署到Heroku時,我收到一英里長的錯誤列表。 我遵循他們的指導進行入門,但是顯然它缺乏而且不准確。

我的設置是一個模塊,我的要求是一個文件夾,其中包含針對每個環境的不同.txt文件:

settings/
  base.py
  dev.py
  heroku.py

requirements/
  base.txt
  dev.txt
  heroku.txt

我嘗試在base.txt和heroku.txt(擴展了base.txt)中使用pylibmc==1.2.2 django-pylibmc-sasl==0.2.4部署到Heroku。

錯誤跟蹤(小樣本):

_pylibmcmodule.c:2097: warning: passing argument 1 of ‘PyInt_FromLong’ makes integer from pointer without a cast

       /app/.heroku/python/include/python2.7/intobject.h:38: note: expected ‘long int’ but argument is of type ‘struct PylibMC_Behavior *’

       _pylibmcmodule.c:2097: warning: passing argument 1 of ‘PyObject_SetAttrString’ from incompatible pointer type

       /app/.heroku/python/include/python2.7/object.h:472: note: expected ‘struct PyObject *’ but argument is of type ‘struct PylibMC_Behavior *’

       _pylibmcmodule.c:2098: error: ‘PylibMC_McErr’ has no member named ‘name’

       _pylibmcmodule.c:2098: error: ‘PylibMC_McErr’ has no member named ‘exc’

       _pylibmcmodule.c:2098: warning: passing argument 2 of ‘PyModule_AddObject’ from incompatible pointer type

       /app/.heroku/python/include/python2.7/modsupport.h:40: note: expected ‘const char *’ but argument is of type ‘struct PylibMC_Behavior *’

       _pylibmcmodule.c:2100: error: ‘PylibMC_McErr’ has no member named ‘name’

       _pylibmcmodule.c:2100: error: ‘PylibMC_McErr’ has no member named ‘exc’

       _pylibmcmodule.c: In function ‘init_pylibmc’:

       _pylibmcmodule.c:2176: error: ‘LIBMEMCACHED_VERSION_STRING’ undeclared (first use in this function)

       _pylibmcmodule.c:2176: warning: passing argument 3 of ‘PyModule_AddStringConstant’ from incompatible pointer type

       /app/.heroku/python/include/python2.7/modsupport.h:42: note: expected ‘const char *’ but argument is of type ‘struct PylibMC_Behavior *’

       error: command 'gcc' failed with exit status 1

       ----------------------------------------
       Command /app/.heroku/python/bin/python -c "import setuptools;__file__='/app/build/pylibmc/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-i0GDaz-record/install-record.txt failed with error code 1 in /app/build/pylibmc
       Storing complete log in /app/.pip/pip.log
 !     Heroku push rejected, failed to compile Python app

我發現了這篇相關的文章,這就是試圖將庫添加到base.txt中的想法,但是仍然沒有幫助。

如果Pylibmc存在於requirements.txt中,則會自動得到支持。

擁有所有這些需求文件只是額外的開銷。 查閱十二因子的開發/產品奇偶校驗文章。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM