安装程序脚本退出,出现错误:命令“x86_64-linux-gnu-gcc”失败,退出状态为1

2024-04-25 00:59:58 发布

您现在位置:Python中文网/ 问答频道 /正文

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

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

有人能帮我解决这个问题吗?


Tags: odoognuserverlinux错误withsetupexit
3条回答

请尝试安装这些软件包。

sudo apt-get install build-essential autoconf libtool pkg-config python-opengl python-imaging python-pyrex python-pyside.qtopengl idle-python2.7 qt4-dev-tools qt4-designer libqtgui4 libqtcore4 libqt4-xml libqt4-test libqt4-script libqt4-network libqt4-dbus python-qt4 python-qt4-gl libgle3 python-dev libssl-dev

sudo easy_install greenlet

sudo easy_install gevent

我在大学里遇到了同样的问题,在我最后一年的主要项目中安装了LinuxMint,下面的第三个解决方案对我有效。

当遇到此错误时,请注意,在出现错误之前,它可能会说您丢失了包或头文件,您应该找到这些文件并安装它们并验证它是否有效。(例如ssl->;libssl)

对于Python 2.x使用:

   $ sudo apt-get install python-dev

对于Python 2.7使用:

   $ sudo apt-get install libffi-dev

对于Python 3.x使用:

   $ sudo apt-get install python3-dev

对于Python 3.4使用:

   $ sudo apt-get install python3.4-dev

对于Python 3.7使用:

   $ sudo apt-get install python3.7-dev

Python.h is nothing but a header file. It is used by gcc to build applications. You need to install a package called python-dev. This package includes header files, a static library and development tools for building Python modules, extending the Python interpreter or embedding Python in applications.

输入:

$ sudo apt-get install python-dev

# apt-get install python-dev

http://www.cyberciti.biz/faq/debian-ubuntu-linux-python-h-file-not-found-error-solution/

相关问题 更多 >