![](/img/trans.png)
[英]PyXML Ubuntu 13.1, error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
[英]Ubuntu Cython compilation error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
我有一個 Cython/Python Dash/Flask 應用程序,我正在嘗試在 Digitalocean 上編譯和部署。
我設法很好地部署了以前的版本 - 但是在提取最新的編譯之后現在失敗了:
building 'event' extension
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/var/www/anagami/anagamienv/include -I/usr/include/python3.8 -c event.c -o build/temp.linux-x86_64-3.8/event.o
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
我正在使用 ubuntu 20 + python 3.8。 相同的代碼在 Windows 上編譯和運行得非常好,一個稍早的版本也用於在 ubuntu 上編譯和運行 jsut 。
編譯器在一個特定的擴展上卡住了很長時間(比如 15-20 分鍾)並且總是給出那個錯誤。
到目前為止我嘗試過的 - 沒有任何效果:
我以前遇到過這個問題,那個時候只是刪除+重新編譯似乎可以解決問題 - 但現在我完全陷入困境 - 我已經嘗試了我能想到的任何方法,但我沒有解決方案。
更新:
我通過運行python3 event.pyx
隔離了錯誤,它給出了以下內容:
cdef class master_event_table:
^
SyntaxError: invalid syntax
最終的問題是雲提供商:digitalocean 的共享模型似乎存在一些內存問題,即使代碼完全有效,也無法編譯。
我最終切換到專用 CPU 計划,所有內容都編譯並運行,無需修改。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.