2017-01-09 18 views
1

,誤差爲什麼當我嘗試安裝它時error.What是that.I解決方案是從上週開始嘗試錯誤發生,所有系統

sudo pip install pyodbc 
Collecting pyodbc 
    Downloading pyodbc-4.0.0.tar.gz (190kB) 
    100% |████████████████████████████████| 194kB 1.0MB/s 
Installing collected packages: pyodbc 
    Running setup.py install for pyodbc ... error 
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-9dU6Pj/pyodbc/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-K98DR9-record/install-record.txt --single-version-externally-managed --compile: 
    running install 
    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/src 
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DPYODBC_VERSION=4.0.0 -DPYODBC_UNICODE_WIDTH=4 -DSQL_WCHART_CONVERT=1 -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include -I/usr/include/python2.7 -c src/pyodbccompat.cpp -o build/temp.linux-x86_64-2.7/src/pyodbccompat.o -Wno-write-strings 
    x86_64-linux-gnu-gcc: error: unrecognized command line option ‘-fstack-protector-strong’ 
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 
+0

谷歌搜索一點點會找到你這樣的:http://stackoverflow.com/a/28138922/5110035 還有你嘗試過什麼做的? – MichaelMMeskhi

+0

不需要更改gcc版本。 –

+0

@MichaelMMeskhi謝謝你的答案。首先我想同樣的事情可能是gcc.and我通過stackoverflow.com/a/28138922/5110035 this site.finally我明白這不是問題.and經過不斷的搜索,我得到了答案,並給出了 –

回答

0

試試這個:

sudo apt-get install python-pyodbc 

它的工作對我來說

相關問題