【问题标题】:setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1安装脚本退出并出现错误:命令“x86_64-linux-gnu-gcc”失败,退出状态为 1
【发布时间】:2014-11-21 03:15:16
【问题描述】:

当我尝试安装odoo-server 时,出现以下错误:

error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

谁能帮我解决这个问题?

【问题讨论】:

  • 有时您应该查看此错误上方的行。它应该告诉你缺少什么包。
  • 对我来说,这是需要 python dev - “sudo apt install python3-dev” - 和 build-essential - “sudo apt install build-essential”的组合
  • sudo apt-get install libffi-dev 像魅力一样工作
  • 最令人沮丧的是它隐藏了实际的错误信息。
  • 在安装 ssdeep 时,我遇到了同样的错误apt-get -y install libfuzzy-dev 像魅力一样工作

标签: python gcc pip odoo


【解决方案1】:

在我的例子中,是 oursql 导致了与下面相同的(通用)错误。

In file included from oursqlx/oursql.c:236:0:
  oursqlx/compat.h:13:19: fatal error: mysql.h: No such file or directory
  compilation terminated.
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for oursql
  Running setup.py clean for oursql

所以,我知道我需要 libmysqlcppconn-dev 包。

sudo apt-get install libmysqlcppconn-dev

一切都好!

【讨论】:

  • 总的来说,我后来检查了oursql包的setup.py文件,发现它使用mysqld,因此我安装了sudo apt-get install libmysqld-dev,它对我有用。
  • mysql安装问题的macOS解决方案:askubuntu.com/questions/663919/…
【解决方案2】:

这对我有用:

sudo apt install zlib1g-dev

【讨论】:

    【解决方案3】:

    除了一些其他有用的答案,如果 docker-compose 把你带到这里——带着你的 venv 集,运行:

    
    easy_install docker-compose
    
    

    【讨论】:

      【解决方案4】:

      安装了很多库之后,对我有用的那个!是swig:

      sudo apt-get install swig
      

      安装python的M2Crypto库时出现错误。

      :)

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2014-10-29
        • 2013-11-23
        • 2023-03-14
        • 2016-08-27
        • 1970-01-01
        • 2016-01-08
        • 2015-07-17
        • 2017-05-20
        相关资源
        最近更新 更多