无法在Linux上安装pyodbc [英] Unable to install pyodbc on Linux

查看:941
本文介绍了无法在Linux上安装pyodbc的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我运行Linux(2.6.18-164.15.1.el5.centos.plus)并尝试安装pyodbc。我在做pip安装pyodbc并得到一个非常长的错误列表,其结束在


错误:命令'gcc'失败退出状态1

,我看过以下内容:

p>


InstallationError:Command / usr / local / bin / python -cimport setuptools; file ='/ home / build / pyodbc / setup.py'; execfile('/ home / build / pyodbc / setup.py')install --single-version-external-managed --record / tmp / pip-7MS9Vu-record / install-record .txt失败,错误代码1


有人在安装pyodbc时遇到类似问题吗?



感谢,
Igor

解决方案

我通过 http://code.google.com/p/pyodbc/wiki/Building ,其状态为:



在Linux上,pyodbc通常使用unixODBC头构建,因此您需要安装unixODBC及其头文件。在RedHat / CentOS / Fedora框中,这意味着您需要安装unixODBC-devel:


yum安装unixODBC-devel


I am running Linux (2.6.18-164.15.1.el5.centos.plus) and trying to install pyodbc. I am doing pip install pyodbc and get a very long list of errors, which end in

error: command 'gcc' failed with exit status 1

I looked in /root/.pip/pip.log and saw the following:

InstallationError: Command /usr/local/bin/python -c "import setuptools; file='/home/build/pyodbc/setup.py'; execfile('/home/build/pyodbc/setup.py')" install --single-version-externally-managed --record /tmp/pip-7MS9Vu-record/install-record.txt failed with error code 1

Has anybody had a similar issue installing pyodbc?

Thanks, Igor

解决方案

I resolved my issue by following correct directions on http://code.google.com/p/pyodbc/wiki/Building which state:

On Linux, pyodbc is typically built using the unixODBC headers, so you will need unixODBC and its headers installed. On a RedHat/CentOS/Fedora box, this means you would need to install unixODBC-devel:

yum install unixODBC-devel

这篇关于无法在Linux上安装pyodbc的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆