简体   繁体   English

Cygwin“错误:命令'gcc'失败,退出状态为1”

[英]Cygwin “error: command 'gcc' failed with exit status 1”

I was trying to download matplotlib which is required for a python program I'm trying to install and I keep getting: 我正在尝试下载matplotlib,这是我尝试安装的python程序所必需的,并且我不断得到:

"error: command 'gcc' failed with exit status 1" “错误:命令'gcc'失败,退出状态为1”

I've seen several results for how to fix the problem on linux but haven't had much luck in finding a solution for me running python through cygwin. 我已经看到了一些有关如何在Linux上解决问题的结果,但是没有找到足够的运气为我通过cygwin运行python的解决方案。 Could someone lead me in a direction to help solve this problem? 有人可以指导我解决这个问题吗? I saw some results involving sudo apt-get but that was leading me down another path of trouble to work. 我看到了一些涉及sudo apt-get的结果,但这使我走上了另一条麻烦的工作之路。 Thanks. 谢谢。

I just had this problem, The answer was here https://github.com/matplotlib/matplotlib/issues/2463 我只是有这个问题,答案在这里https://github.com/matplotlib/matplotlib/issues/2463

"There is a variable called "_C" defined in lib/matplotlib/tri/_tri.h on line 821 and invoked in tri.cpp on lines 2180 and 2186. For some reason gcc doesn't like this (is it a reserved word in some architecture?). I just renamed the variable to "_Co" in both tri.h and tri.cpp, and the compilation finished successfully." “在第821行的lib / matplotlib / tri / _tri.h中定义了一个名为“ _C”的变量,并在第2180和2186行的tri.cpp中调用了该变量。由于某些原因,gcc不喜欢这样(它是保留字)在某些体系结构中?)。我只是在tri.h和tri.cpp中将变量重命名为“ _Co”,并且编译成功完成。”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM