pip install numpy失败,错误' cc1:错误:无法识别的调试输出级别" record-gcc-switches"'

时间:2014-11-04 15:09:16

标签: python gcc numpy

当我尝试在virtualenv中安装numpy时(我无法尝试系统范围的安装),它失败并出现以下错误:

RuntimeError: Broken toolchain: cannot link a simple C program

这里有一些看似有用的输出:

$ pip install --upgrade numpy | grep -i "error\|gcc\|warning"

warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.pyo' found anywhere in distribution
warning: no previously-included files matching '*.pyd' found anywhere in distribution
/usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'define_macros'
warnings.warn(msg)
C compiler: gcc -pthread -fno-strict-aliasing -fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables -g -DNDEBUG -fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables -g -DOPENSSL_LOAD_CONF -fPIC
gcc: _configtest.c
cc1: error: unrecognised debug output level "record-gcc-switches"
cc1: error: unrecognised debug output level "record-gcc-switches"
cc1: error: unrecognised debug output level "record-gcc-switches"
cc1: error: unrecognised debug output level "record-gcc-switches"
raise RuntimeError("Broken toolchain: cannot link a simple C program")
RuntimeError: Broken toolchain: cannot link a simple C program
/usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'define_macros'
warnings.warn(msg)
C compiler: gcc -pthread -fno-strict-aliasing -fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables -g -DNDEBUG -fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables -g -DOPENSSL_LOAD_CONF -fPIC
gcc: _configtest.c
cc1: error: unrecognised debug output level "record-gcc-switches"
cc1: error: unrecognised debug output level "record-gcc-switches"
cc1: error: unrecognised debug output level "record-gcc-switches"
cc1: error: unrecognised debug output level "record-gcc-switches"
raise RuntimeError("Broken toolchain: cannot link a simple C program")
RuntimeError: Broken toolchain: cannot link a simple C program

我在openSUSE 13.1(x86_64)上运行gcc版本4.4.7。

1 个答案:

答案 0 :(得分:0)

更新gcc(例如更新到4.7.4)解决了这个问题。