首页 新闻 会员 周边 捐助

Linux下安装pyodbc报错 error: command 'gcc' failed with exit status 1

0
悬赏园豆:20 [已关闭问题] 关闭于 2014-12-03 12:20

请大家帮忙看看什么错误,谢谢!

 

[root@localhost software]# unzip pyodbc-3.0.6.zip
Archive:  pyodbc-3.0.6.zip
  inflating: pyodbc-3.0.6/LICENSE.txt  
  inflating: pyodbc-3.0.6/MANIFEST.in  
  inflating: pyodbc-3.0.6/PKG-INFO   
  inflating: pyodbc-3.0.6/README.rst  
  inflating: pyodbc-3.0.6/setup.cfg  
  inflating: pyodbc-3.0.6/setup.py   
  inflating: pyodbc-3.0.6/pyodbc.egg-info/dependency_links.txt  
  inflating: pyodbc-3.0.6/pyodbc.egg-info/PKG-INFO  
  inflating: pyodbc-3.0.6/pyodbc.egg-info/SOURCES.txt  
  inflating: pyodbc-3.0.6/pyodbc.egg-info/top_level.txt  
  inflating: pyodbc-3.0.6/src/buffer.cpp  
  inflating: pyodbc-3.0.6/src/buffer.h  
  inflating: pyodbc-3.0.6/src/cnxninfo.cpp  
  inflating: pyodbc-3.0.6/src/cnxninfo.h  
  inflating: pyodbc-3.0.6/src/connection.cpp  
  inflating: pyodbc-3.0.6/src/connection.h  
  inflating: pyodbc-3.0.6/src/cursor.cpp  
  inflating: pyodbc-3.0.6/src/cursor.h  
  inflating: pyodbc-3.0.6/src/dbspecific.h  
  inflating: pyodbc-3.0.6/src/errors.cpp  
  inflating: pyodbc-3.0.6/src/errors.h  
  inflating: pyodbc-3.0.6/src/getdata.cpp  
  inflating: pyodbc-3.0.6/src/getdata.h  
  inflating: pyodbc-3.0.6/src/params.cpp  
  inflating: pyodbc-3.0.6/src/params.h  
  inflating: pyodbc-3.0.6/src/pyodbc.h  
  inflating: pyodbc-3.0.6/src/pyodbccompat.cpp  
  inflating: pyodbc-3.0.6/src/pyodbccompat.h  
  inflating: pyodbc-3.0.6/src/pyodbcdbg.cpp  
  inflating: pyodbc-3.0.6/src/pyodbcmodule.cpp  
  inflating: pyodbc-3.0.6/src/pyodbcmodule.h  
  inflating: pyodbc-3.0.6/src/resource.h  
  inflating: pyodbc-3.0.6/src/row.cpp  
  inflating: pyodbc-3.0.6/src/row.h  
  inflating: pyodbc-3.0.6/src/sqlwchar.cpp  
  inflating: pyodbc-3.0.6/src/sqlwchar.h  
  inflating: pyodbc-3.0.6/src/wrapper.h  
[root@localhost software]# cd pyodbc-3.0.6
[root@localhost pyodbc-3.0.6]# ls
LICENSE.txt  MANIFEST.in  PKG-INFO  pyodbc.egg-info  README.rst  setup.cfg  setup.py  src
[root@localhost pyodbc-3.0.6]# python setup.py build
running build
running build_ext
building 'pyodbc' extension
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/opt
creating build/temp.linux-x86_64-2.7/opt/software
creating build/temp.linux-x86_64-2.7/opt/software/pyodbc-3.0.6
creating build/temp.linux-x86_64-2.7/opt/software/pyodbc-3.0.6/src
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPYODBC_VERSION=3.0.6 -I/usr/local/include/python2.7 -c /opt/software/pyodbc-3.0.6/src/cursor.cpp -o build/temp.linux-x86_64-2.7/opt/software/pyodbc-3.0.6/src/cursor.o -Wno-write-strings
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
In file included from /opt/software/pyodbc-3.0.6/src/cursor.cpp:16:
/opt/software/pyodbc-3.0.6/src/pyodbc.h:48:17: error: sql.h: No such file or directory
/opt/software/pyodbc-3.0.6/src/pyodbc.h:49:20: error: sqlext.h: No such file or directory
In file included from /opt/software/pyodbc-3.0.6/src/cursor.cpp:16:
/opt/software/pyodbc-3.0.6/src/pyodbc.h:65: error: ‘IsSet’ declared as an ‘inline’ variable
/opt/software/pyodbc-3.0.6/src/pyodbc.h:65: error: ‘DWORD’ was not declared in this scope
/opt/software/pyodbc-3.0.6/src/pyodbc.h:65: error: ‘DWORD’ was not declared in this scope
/opt/software/pyodbc-3.0.6/src/pyodbc.h:65: error: initializer expression list treated as compound expression
/opt/software/pyodbc-3.0.6/src/pyodbc.h:66: error: expected ‘,’ or ‘;’ before ‘{’ token
In file included from /opt/software/pyodbc-3.0.6/src/cursor.cpp:17:
/opt/software/pyodbc-3.0.6/src/cursor.h:21: error: ‘SQLSMALLINT’ does not name a type
/opt/software/pyodbc-3.0.6/src/cursor.h:29: error: ‘SQLULEN’ does not name a type
/opt/software/pyodbc-3.0.6/src/cursor.h:40: error: ‘SQLSMALLINT’ does not name a type
/opt/software/pyodbc-3.0.6/src/cursor.h:41: error: ‘SQLSMALLINT’ does not name a type
/opt/software/pyodbc-3.0.6/src/cursor.h:42: error: ‘SQLULEN’ does not name a type
/opt/software/pyodbc-3.0.6/src/cursor.h:43: error: ‘SQLSMALLINT’ does not name a type
/opt/software/pyodbc-3.0.6/src/cursor.h:47: error: ‘SQLPOINTER’ does not name a type
/opt/software/pyodbc-3.0.6/src/cursor.h:49: error: ‘SQLLEN’ does not name a type
/opt/software/pyodbc-3.0.6/src/cursor.h:50: error: ‘SQLLEN’ does not name a type
/opt/software/pyodbc-3.0.6/src/cursor.h:66: error: ‘TIMESTAMP_STRUCT’ does not name a type
/opt/software/pyodbc-3.0.6/src/cursor.h:67: error: ‘DATE_STRUCT’ does not name a type
/opt/software/pyodbc-3.0.6/src/cursor.h:68: error: ‘TIME_STRUCT’ does not name a type
/opt/software/pyodbc-3.0.6/src/cursor.h:80: error: ‘HSTMT’ does not name a type
/opt/software/pyodbc-3.0.6/src/cursor.h:97: error: ISO C++ forbids declaration of ‘SQLSMALLINT’ with no type
/opt/software/pyodbc-3.0.6/src/cursor.h:97: error: expected ‘;’ before ‘*’ token
In file included from /opt/software/pyodbc-3.0.6/src/cursor.cpp:18:
/opt/software/pyodbc-3.0.6/src/pyodbcmodule.h:36: error: ‘HENV’ does not name a type
In file included from /opt/software/pyodbc-3.0.6/src/cursor.cpp:19:
/opt/software/pyodbc-3.0.6/src/connection.h:24: error: ‘HDBC’ does not name a type
/opt/software/pyodbc-3.0.6/src/connection.h:63: error: ISO C++ forbids declaration of ‘SQLSMALLINT’ with no type
/opt/software/pyodbc-3.0.6/src/connection.h:63: error: expected ‘;’ before ‘*’ token
In file included from /opt/software/pyodbc-3.0.6/src/cursor.cpp:19:
/opt/software/pyodbc-3.0.6/src/connection.h:79: error: ‘SQLSMALLINT’ has not been declared
In file included from /opt/software/pyodbc-3.0.6/src/cursor.cpp:21:
/opt/software/pyodbc-3.0.6/src/buffer.h:46: error: ‘SQLLEN’ has not been declared
In file included from /opt/software/pyodbc-3.0.6/src/cursor.cpp:23:
/opt/software/pyodbc-3.0.6/src/errors.h:12: error: ‘HDBC’ has not been declared
/opt/software/pyodbc-3.0.6/src/errors.h:12: error: ‘HSTMT’ has not been declared
/opt/software/pyodbc-3.0.6/src/errors.h:37: error: ‘HDBC’ has not been declared
/opt/software/pyodbc-3.0.6/src/errors.h:37: error: ‘HSTMT’ has not been declared
/opt/software/pyodbc-3.0.6/src/errors.h:50: error: ‘bool HasSqlState’ redeclared as different kind of symbol
/opt/software/pyodbc-3.0.6/src/errors.h:44: error: previous declaration of ‘bool HasSqlState(PyObject*, const char*)’
/opt/software/pyodbc-3.0.6/src/errors.h:50: error: ‘HSTMT’ was not declared in this scope
/opt/software/pyodbc-3.0.6/src/errors.h:50: error: expected primary-expression before ‘const’
In file included from /opt/software/pyodbc-3.0.6/src/cursor.cpp:24:
/opt/software/pyodbc-3.0.6/src/getdata.h:13: error: ‘SQLSMALLINT’ has not been declared
In file included from /opt/software/pyodbc-3.0.6/src/cursor.cpp:25:
/opt/software/pyodbc-3.0.6/src/dbspecific.h:26: error: ‘SQLUSMALLINT’ does not name a type
/opt/software/pyodbc-3.0.6/src/dbspecific.h:27: error: ‘SQLUSMALLINT’ does not name a type
/opt/software/pyodbc-3.0.6/src/dbspecific.h:28: error: ‘SQLUSMALLINT’ does not name a type
/opt/software/pyodbc-3.0.6/src/dbspecific.h:29: error: ‘SQLUINTEGER’ does not name a type
In file included from /opt/software/pyodbc-3.0.6/src/cursor.cpp:26:
/opt/software/pyodbc-3.0.6/src/sqlwchar.h:11: error: ISO C++ forbids declaration of ‘SQLWCHAR’ with no type
/opt/software/pyodbc-3.0.6/src/sqlwchar.h:11: error: expected ‘;’ before ‘*’ token
/opt/software/pyodbc-3.0.6/src/sqlwchar.h:36: error: expected type-specifier before ‘SQLWCHAR’
/opt/software/pyodbc-3.0.6/src/sqlwchar.h:37: error: ISO C++ forbids declaration of ‘type name’ with no type
/opt/software/pyodbc-3.0.6/src/sqlwchar.h:37: error: ‘operator const int’ does not name a type
/opt/software/pyodbc-3.0.6/src/sqlwchar.h:41: error: ISO C++ forbids declaration of ‘SQLWCHAR’ with no type
/opt/software/pyodbc-3.0.6/src/sqlwchar.h:41: error: expected ‘;’ before ‘*’ token
/opt/software/pyodbc-3.0.6/src/sqlwchar.h:47: error: expected ‘;’ before ‘const’
/opt/software/pyodbc-3.0.6/src/sqlwchar.h:47: error: ISO C++ forbids declaration of ‘SQLWCHAR’ with no type
/opt/software/pyodbc-3.0.6/src/sqlwchar.h:47: error: expected ‘;’ before ‘*’ token
/opt/software/pyodbc-3.0.6/src/sqlwchar.h:52: error: expected ‘;’ before ‘}’ token
/opt/software/pyodbc-3.0.6/src/sqlwchar.h: In constructor ‘SQLWChar::SQLWChar()’:
/opt/software/pyodbc-3.0.6/src/sqlwchar.h:18: error: ‘pch’ was not declared in this scope
/opt/software/pyodbc-3.0.6/src/sqlwchar.h: In member function ‘SQLWChar::operator bool() const’:
/opt/software/pyodbc-3.0.6/src/sqlwchar.h:38: error: ‘pch’ was not declared in this scope
/opt/software/pyodbc-3.0.6/src/sqlwchar.h: At global scope:
/opt/software/pyodbc-3.0.6/src/sqlwchar.h:58: error: ISO C++ forbids declaration of ‘SQLWCHAR’ with no type
/opt/software/pyodbc-3.0.6/src/sqlwchar.h:58: error: expected ‘,’ or ‘...’ before ‘*’ token
/opt/software/pyodbc-3.0.6/src/sqlwchar.h:60: error: expected constructor, destructor, or type conversion before ‘*’ token
/opt/software/pyodbc-3.0.6/src/cursor.cpp: In function ‘bool StatementIsValid(Cursor*)’:
/opt/software/pyodbc-3.0.6/src/cursor.cpp:39: error: ‘struct Connection’ has no member named ‘hdbc’
/opt/software/pyodbc-3.0.6/src/cursor.cpp:39: error: ‘SQL_NULL_HANDLE’ was not declared in this scope
/opt/software/pyodbc-3.0.6/src/cursor.cpp:39: error: ‘struct Cursor’ has no member named ‘hstmt’
/opt/software/pyodbc-3.0.6/src/cursor.cpp: At global scope:
/opt/software/pyodbc-3.0.6/src/cursor.cpp:49: error: ‘DWORD’ has not been declared
/opt/software/pyodbc-3.0.6/src/cursor.cpp: In function ‘Cursor* Cursor_Validate(PyObject*, int)’:
/opt/software/pyodbc-3.0.6/src/cursor.cpp:80: error: ‘IsSet’ cannot be used as a function
/opt/software/pyodbc-3.0.6/src/cursor.cpp:82: error: ‘struct Cursor’ has no member named ‘hstmt’
/opt/software/pyodbc-3.0.6/src/cursor.cpp:82: error: ‘SQL_NULL_HANDLE’ was not declared in this scope
/opt/software/pyodbc-3.0.6/src/cursor.cpp:89: error: ‘struct Connection’ has no member named ‘hdbc’
/opt/software/pyodbc-3.0.6/src/cursor.cpp:89: error: ‘SQL_NULL_HANDLE’ was not declared in this scope
/opt/software/pyodbc-3.0.6/src/cursor.cpp:97: error: ‘IsSet’ cannot be used as a function
/opt/software/pyodbc-3.0.6/src/cursor.cpp: At global scope:
/opt/software/pyodbc-3.0.6/src/cursor.cpp:108: error: ‘IsNumericType’ declared as an ‘inline’ variable
/opt/software/pyodbc-3.0.6/src/cursor.cpp:108: error: ‘SQLSMALLINT’ was not declared in this scope
/opt/software/pyodbc-3.0.6/src/cursor.cpp:109: error: expected ‘,’ or ‘;’ before ‘{’ token
/usr/local/include/python2.7/datetime.h:188: warning: ‘PyDateTimeAPI’ defined but not used
/opt/software/pyodbc-3.0.6/src/cursor.cpp:49: warning: ‘Cursor* Cursor_Validate(PyObject*, int)’ defined but not used
error: command 'gcc' failed with exit status 1

Eko的主页 Eko | 菜鸟二级 | 园豆:208
提问于:2014-12-02 20:33
< >
分享
所有回答(1)
0

unixODBC  没有装好, 重新安装了一遍,可以了

Eko | 园豆:208 (菜鸟二级) | 2014-12-03 12:18
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册