VIRTUALENV를 생성하고 MySQL을 - 파이썬을 설치하려고 동안 내가 --no-사이트 패키지를 옵션을 사용하면 나중에 내가 얻을 :VIRTUALENV GCC 오류
easy_install-2.7 --install-dir ~/src/lib/ virtualenv==dev
~/src/lib/virtualenv --no-site-packages ENV
.../ENV/bin/pip-2.7 install MySQL-python
다음은
error: command 'gcc' failed with exit status 1
내가 다음 단계입니다
는 또한
.../ENV/bin/python setup.py build
내가 같은 오류 시들어 방법을 얻을 사용하여 MySQL을 - 파이썬을 다운로드하고 설치했습니다. 이 virtualenv에서 gcc가 누락되었다고 가정하지만, --no-site-packages 옵션을 사용하는 동안이 virtualenv에 어떻게 설치해야합니까? 감사합니다.
EDIT : 전체 오류 출력은 다음과 같습니다.
running build
running build_py
copying MySQLdb/release.py -> build/lib.linux-x86_64-2.7/MySQLdb
running build_ext
building '_mysql' extension
gcc -m32 -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Dversion_info=(1,2,3,'final',0) -D__version__=1.2.3 -I/usr/include/mysql -I/opt/lampp/include/python2.7 -c _mysql.c -o build/temp.linux-x86_64-2.7/_mysql.o -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv
In file included from /opt/lampp/include/python2.7/Python.h:58,
from pymemcompat.h:10,
from _mysql.c:29:
/opt/lampp/include/python2.7/pyport.h:849:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
In file included from /usr/include/mysql/my_config.h:11,
from _mysql.c:36:
/usr/include/mysql/my_config_x86_64.h:1032:1: warning: "SIZEOF_LONG" redefined
In file included from /opt/lampp/include/python2.7/Python.h:8,
from pymemcompat.h:10,
from _mysql.c:29:
/opt/lampp/include/python2.7/pyconfig.h:989:1: warning: this is the location of the previous definition
error: command 'gcc' failed with exit status 1
어떤 컴파일 오류가 발생합니까? – AndiDog
어떤 오류가 나타 났습니까? 왜 당신은 virtualenv와 그 모든 것을 통과하고 있습니까? venv와 pip를 바로 '활성화'하지 마시고 바로 거기에서 설치 하시겠습니까? –
필요가 없기 때문에 활성화하지 않았습니다. virtualenv 디렉토리로 이동하여 거기에서 내 virtualenv 파이썬을 시작하면 아무런 차이가 없습니다. 모든 활성화는/usr/bin/env python을 virtualenv와 함께 할 수 있도록 경로에 넣는 것입니다. 내가 옳지 않은가? – biomed