【问题标题】:cffi package installation error on LinuxLinux上的cffi包安装错误
【发布时间】:2017-12-13 22:06:46
【问题描述】:

尝试在我的 linux 机器上的 python 3.4.3 上安装 cffi-1.7.0 源代码。出现以下错误。

$ python setup.py 安装

cc1:错误:无法识别的命令行选项“-Wno-unused-result” cc1:错误:无法识别的命令行选项“-Wno-unused-result”

No working compiler found, or bogus compiler options
passed to the compiler from Python's distutils module.
See the error messages above.
(If they are about -mno-fused-madd and you are on OS/X 10.8,
see http://stackoverflow.com/questions/22313407/ .)

谁能帮我解决这个问题?

【问题讨论】:

  • 您运行的 gcc 版本早于 4.4?
  • 您的系统上是否安装了工作 gcc?在基于 debian 的系统上,包 build-essential 将成为您的朋友。
  • @Patesh ,它的 gcc (GCC) 4.2.1。
  • @Mandraenke,有 gcc (GCC) 4.2.1。我可以毫无问题地安装其他一些软件包,但只有“cffi”给了我这个错误。
  • @Patesh,我应该将 gcc 版本升级到 4.4 吗?还是有任何替代解决方案?

标签: python linux cffi


【解决方案1】:

通过设置以下选项可以解决问题。

setenv CFLAGS=-Qunused-arguments

setenv CPPFLAGS -Qunused-arguments

谢谢大家的帮助!

【讨论】:

    猜你喜欢
    • 2019-03-26
    • 2015-09-22
    • 2015-02-28
    • 2019-03-04
    • 2012-03-02
    • 1970-01-01
    • 2018-02-26
    • 1970-01-01
    相关资源
    最近更新 更多