安装pylibmc
报错,详情如下文:
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-fjnn4u84/pylibmc/setup.py'"'"'; __file__='"'"'/tmp/pip-install-fjnn4u84/pylibmc/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-record-1_eqg_po/install-record.txt --single-version-externally-managed --compile
cwd: /tmp/pip-install-fjnn4u84/pylibmc/
Complete output (28 lines):
/tmp/pip-install-fjnn4u84/pylibmc/setup.py:98: DeprecationWarning: 'U' mode is deprecated
with open("README.rst", "U", encoding="utf-8") as r:
/tmp/pip-install-fjnn4u84/pylibmc/setup.py:100: DeprecationWarning: 'U' mode is deprecated
with open("src/pylibmc-version.h", "U", encoding="utf-8") as r:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.8
creating build/lib.linux-x86_64-3.8/pylibmc
copying src/pylibmc/test.py -> build/lib.linux-x86_64-3.8/pylibmc
copying src/pylibmc/pools.py -> build/lib.linux-x86_64-3.8/pylibmc
copying src/pylibmc/consts.py -> build/lib.linux-x86_64-3.8/pylibmc
copying src/pylibmc/client.py -> build/lib.linux-x86_64-3.8/pylibmc
copying src/pylibmc/autoconf.py -> build/lib.linux-x86_64-3.8/pylibmc
copying src/pylibmc/__main__.py -> build/lib.linux-x86_64-3.8/pylibmc
copying src/pylibmc/__init__.py -> build/lib.linux-x86_64-3.8/pylibmc
running build_ext
building '_pylibmc' extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/src
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DUSE_ZLIB -I/usr/include/python3.8 -c src/_pylibmcmodule.c -o build/temp.linux-x86_64-3.8/src/_pylibmcmodule.o -fno-strict-aliasing -std=c99
In file included from src/_pylibmcmodule.c:34:
src/_pylibmcmodule.h:42:10: 致命错误:libmemcached/memcached.h:没有那个文件或目录
42 | #include <libmemcached/memcached.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
编译中断。
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-fjnn4u84/pylibmc/setup.py'"'"'; __file__='"'"'/tmp/pip-install-fjnn4u84/pylibmc/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-record-1_eqg_po/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
解决办法:
dnf install libmemcached libmemcached-libs cyrus-sasl-devel libmemcached-devel