Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

fatal error: libmemcached/memcached.h: no such file or directory

I try to setup a development environment for developing on django itself.

Docs: Contributing / Running the test suite for the first time

python -m pip install -r requirements/py3.txt

It fails:

...
    x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DUSE_ZLIB -I/home/guettli/.virtualenvs/djangodev/include -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: fatal error: libmemcached/memcached.h: no such file or directory
       42 | #include <libmemcached/memcached.h>
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

What can I do to fix this?

like image 998
guettli Avatar asked Dec 13 '20 06:12

guettli


1 Answers

You need to install the development header files via your OS package manager:

For example on Ubuntu:

sudo apt install libmemcached-dev

like image 98
guettli Avatar answered Oct 05 '22 10:10

guettli