gcc: command not found windows系统下

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了gcc: command not found windows系统下相关的知识,希望对你有一定的参考价值。

找不到指令,应该是你没安装gcc吧!~安装的时候有一个开发,只有点上了才会安装gcc,如果你安装的时候选择的是desktop,默认是不安装的,只有选择了开发,才会装上gcc,去如果有网的话yum install gcc 安装一个就可以了
参考技术A 因为你的windows电脑上没有gcc编译器
去网上下载一个,加到环境变量里就可以啦!
参考技术B 你以为是linux啊

mysql_config not found和error: command 'gcc' failed with exit status 1

要想使python可以操作mysql 就需要MySQL-python驱动,它是python 操作mysql必不可少的模块。

下载地址:https://pypi.python.org/pypi/MySQL-python/

下载MySQL-python-1.2.5.zip 文件之后直接解压。进入MySQL-python-1.2.5目录:

python setup.py install

报错:

[[email protected] MySQL-python-1.2.4]# python setup.py install

sh: mysql_config: command not found

Traceback (most recent call last):

  File "setup.py", line 18, in <module>

    metadata, options = get_config()

  File "/root/MySQL-python-1.2.4/setup_posix.py", line 43, in get_config

    libs = mysql_config("libs_r")

  File "/root/MySQL-python-1.2.4/setup_posix.py", line 25, in mysql_config

    raise EnvironmentError("%s not found" % (mysql_config.path,))

EnvironmentError: mysql_config not found

网上查了一下需安装mysql-devel 

#yum -y install mysql-devel 

安装成功后

# python setup.py install

安装成功。

 

[[email protected] MySQL-python-1.2.5]# python

Python 2.7.5 (default, Jun 17 2014, 18:11:42) 

[GCC 4.8.2 20140120 (Red Hat 4.8.2-16)] on linux2

Type "help", "copyright", "credits" or "license" for more information.

>>> import MySQLdb

/usr/lib64/python2.7/site-packages/MySQL_python-1.2.5-py2.7-linux-x86_64.egg/_mysql.py:3: UserWarning: Module _mysql was already imported from /usr/lib64/python2.7/site-packages/MySQL_python-1.2.5-py2.7-linux-x86_64.egg/_mysql.pyc, but /root/MySQL-python-1.2.5 is being added to sys.path

 

 

用安装Python模块出现error: command ‘gcc‘ failed with exit status 1 ,明明装了gcc的,怎么会不行呢,然后发觉是failed不是not found,这说明这个错误个gcc没多大关系,应该是缺少某些功能模块,然后谷歌了一下,先后安装了python-devel,libffi-devel后还是不行,最后发觉要安装openssl-devel才行

可如下命令行安装:

yum install gcc libffi-devel python-devel openssl-devel

以上是关于gcc: command not found windows系统下的主要内容,如果未能解决你的问题,请参考以下文章

用mingw32 出现 gcc: command not found 怎么办?

arm-none-linux-gnueabi-gcc command not found

编译redis时 提示make cc Command not found

MISP版本嵌入式QT编译时出现mips-linux-gcc command not found

mysql_config not found和error: command 'gcc' failed with exit status 1

centos7 安装mysql--python模块出现EnvironmentError: mysql_config not found和error: command 'gcc' fai