簡體   English   中英

Python pip無法安裝zbarlight:錯誤:命令'gcc'失敗,退出狀態為1

[英]Python pip cannot install zbarlight: error: command 'gcc' failed with exit status 1

首先,我安裝了Python 3.5.1:

yum -y install zbar gcc gcc-c++ kernel-devel
./configure --enable-shared --prefix=/usr/local LDFLAGS="-Wl,--rpath=/usr/local/lib"
make && make install

試圖安裝zbarlight pypi軟件包,但失敗了:

    src/zbarlight/_zbarlight.c:137: error: ‘ZBAR_QRCODE’ undeclared (first use in this function)
    src/zbarlight/_zbarlight.c:138: error: ‘ZBAR_CODE128’ undeclared (first use in this function)
    error: command 'gcc' failed with exit status 1

    ----------------------------------------
Command "/usr/local/bin/python3.5 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-ur77y560/zbarlight/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-hoalto9f-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-ur77y560/zbarlight/

我該如何解決? 我嘗試了pip3.5 -v,但未顯示任何更有意義的錯誤。

不得不安裝

yum install zbar-devel

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM