安装 python 包失败并显示“无法执行 gcc:没有这样的文件或目录”

问题描述 投票:0回答:2

尝试安装 mysql-python。出现以下错误。已经安装了 mysql 和 pythond。任何帮助将不胜感激

[root@uu include]# easy_install mysql-python
Searching for mysql-python
Reading http://cheeseshop.python.org/pypi/mysql-python/
Couldn't find index page for 'mysql-python' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://cheeseshop.python.org/pypi/
Reading http://cheeseshop.python.org/pypi/MySQL-python/1.2.3c1
Reading http://sourceforge.net/projects/mysql-python
Best match: MySQL-python 1.2.3c1
Downloading http://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.3c1.tar.gz#md5=310dd856e439d070b59ece6dd7a0734d
Processing MySQL-python-1.2.3c1.tar.gz
Running MySQL-python-1.2.3c1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-toQ0nx/MySQL-python-1.2.3c1/egg-dist-tmp-OeN5eG
unable to execute gcc: No such file or directory
error: Setup script exited with error: command 'gcc' failed with exit status 1
centos mysql-python
2个回答
16
投票

这将安装 GCC 和其他经常需要的东西:

yum groupinstall 'Development Tools'

也可以单独安装,即

yum install gcc


9
投票

你需要安装 gcc(在 centos 上,一些开发工具)

© www.soinside.com 2019 - 2024. All rights reserved.