環境は
CentOS6系でPython3.5.3です。
pipでscrapyをインストールしようとすると下記エラーとなります。
gcc gcc-c++ kernel-devel libffi-devel python-devel openssl-devel libxslt-devel openssl pyOpenSSL
などを入れてみたり、色々検索して試してみたのですが一向に解決しないので、投稿いたしました。
全ては載せきれなかったので怪しそうな部分を載せます。
大変恐縮ですが、初心者にもわかりやすく解説して頂ければ幸いです。
running egg_info writing src/cryptography.egg-info/PKG-INFO writing entry points to src/cryptography.egg-info/entry_points.txt writing requirements to src/cryptography.egg-info/requires.txt writing dependency_links to src/cryptography.egg-info/dependency_links.txt writing top-level names to src/cryptography.egg-info/top_level.txt reading manifest file 'src/cryptography.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' no previously-included directories found matching 'docs/_build' warning: no previously-included files matching '*' found under directory 'vectors' writing manifest file 'src/cryptography.egg-info/SOURCES.txt' running build_ext generating cffi module 'build/temp.linux-x86_64-3.5/_padding.c' creating build/temp.linux-x86_64-3.5 generating cffi module 'build/temp.linux-x86_64-3.5/_constant_time.c' generating cffi module 'build/temp.linux-x86_64-3.5/_openssl.c' building '_openssl' extension creating build/temp.linux-x86_64-3.5/build creating build/temp.linux-x86_64-3.5/build/temp.linux-x86_64-3.5 gcc -pthread -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python3.5m -c build/temp.linux-x86_64-3.5/_openssl.c -o build/temp.linux-x86_64-3.5/build/temp.linux-x86_64-3.5/_openssl.o build/temp.linux-x86_64-3.5/_openssl.c:12:24: error: pyconfig.h: そのようなファイルやディレクトリはありません build/temp.linux-x86_64-3.5/_openssl.c:18:20: error: Python.h: そのようなファイルやディレクトリはありません build/temp.linux-x86_64-3.5/_openssl.c:363: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token build/temp.linux-x86_64-3.5/_openssl.c:713:22: error: pythread.h: そのようなファイルやディレクトリはありません build/temp.linux-x86_64-3.5/_openssl.c: In function ‘dev_urandom_fd’: build/temp.linux-x86_64-3.5/_openssl.c:2538: 警告: implicit declaration of function ‘fstat’ build/temp.linux-x86_64-3.5/_openssl.c: トップレベル: build/temp.linux-x86_64-3.5/_openssl.c:3554: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token build/temp.linux-x86_64-3.5/_openssl.c: In function ‘_ssl_thread_locking_function’: build/temp.linux-x86_64-3.5/_openssl.c:3572: error: ‘_ssl_locks’ undeclared (first use in this function) build/temp.linux-x86_64-3.5/_openssl.c:3572: error: (Each undeclared identifier is reported only once build/temp.linux-x86_64-3.5/_openssl.c:3572: error: for each function it appears in.) build/temp.linux-x86_64-3.5/_openssl.c:3578: 警告: implicit declaration of function ‘PyThread_acquire_lock’ build/temp.linux-x86_64-3.5/_openssl.c:3580: 警告: implicit declaration of function ‘PyThread_release_lock’ build/temp.linux-x86_64-3.5/_openssl.c: In function ‘_setup_ssl_threads’: build/temp.linux-x86_64-3.5/_openssl.c:3587: error: ‘_ssl_locks’ undeclared (first use in this function) build/temp.linux-x86_64-3.5/_openssl.c:3589: 警告: implicit declaration of function ‘PyMem_New’ build/temp.linux-x86_64-3.5/_openssl.c:3589: error: ‘PyThread_type_lock’ undeclared (first use in this function) build/temp.linux-x86_64-3.5/_openssl.c:3591: 警告: implicit declaration of function ‘PyErr_NoMemory’ build/temp.linux-x86_64-3.5/_openssl.c:3596: 警告: implicit declaration of function ‘PyThread_allocate_lock’ build/temp.linux-x86_64-3.5/_openssl.c:3600: 警告: implicit declaration of function ‘PyThread_free_lock’ build/temp.linux-x86_64-3.5/_openssl.c:3602: 警告: implicit declaration of function ‘PyMem_Free’ build/temp.linux-x86_64-3.5/_openssl.c: トップレベル: build/temp.linux-x86_64-3.5/_openssl.c:12998: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token build/temp.linux-x86_64-3.5/_openssl.c:13034: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token build/temp.linux-x86_64-3.5/_openssl.c:13058: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token .....(上記の数字違いが数十行) build/temp.linux-x86_64-3.5/_openssl.c:70617: error: ‘_cffi_f_ASN1_IA5STRING_new’ undeclared here (not in a function) build/temp.linux-x86_64-3.5/_openssl.c:70618: error: ‘_cffi_f_ASN1_INTEGER_cmp’ undeclared here (not in a function) build/temp.linux-x86_64-3.5/_openssl.c:70619: error: ‘_cffi_f_ASN1_INTEGER_dup’ undeclared here (not in a function) .....(上記の数字違いが数十行) build/temp.linux-x86_64-3.5/_openssl.c:73317: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘init_openssl’ error: command 'gcc' failed with exit status 1 ---------------------------------------- Command "/usr/bin/python3.5 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-2uh6etal/cryptography/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-p1x27bcm-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-2uh6etal/cryptography/
回答4件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/03/24 00:26