Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to build due to checking for libmemcached location... configure: error: Unable to find memcached.h #140

Closed
weizhu-us opened this issue Jun 13, 2014 · 8 comments

Comments

@weizhu-us
Copy link

@weizhu-us weizhu-us commented Jun 13, 2014

I was trying to build php-memcached,
./configure --with-libmemcached-dir=/u/weiz/libmemcached-1.0.16

got the following error
checking for libmemcached location... configure: error: Unable to find memcached.h under /u/weiz/libmemcached-1.0.16

by looking at the
https://github.com/php-memcached-dev/php-memcached/blob/master/config.m4#L277

It's looking for
if test ! -f "$PHP_LIBMEMCACHED_DIR/include/libmemcached/memcached.h";

I have downloaded libmemcached-1.0.16 and built it.

find ./ -name memcached.h
./libmemcached-1.0.16/libtest/memcached.h
./libmemcached-1.0.16/libmemcached-1.0/memcached.h
./libmemcached-1.0.16/libmemcached-1.0/struct/memcached.h
./libmemcached-1.0.16/libmemcached/memcached.h

None of them are under /include/ directory. Did I miss anything obvious?

@intellix
Copy link

@intellix intellix commented Jun 22, 2014

I was just attempting to do the same on CentOS: ./configure --with-libmemcached-dir=/usr/include/libmemcached/

Which errors with: checking for libmemcached location... configure: error: Unable to find memcached.h under /usr/include/libmemcached/

It's definitely in there. That memcached.h is referencing libmemcached-1.0/ and if I point it there, same story.

Actually.... now I remove the --with-libmemcached-dir option it suddenly works

@mkoppanen
Copy link
Member

@mkoppanen mkoppanen commented Jun 27, 2014

The test checks for if test ! -f "$PHP_LIBMEMCACHED_DIR/include/libmemcached/memcached.h"
hence your --with-libmemcached-dir should be /usr

@mkoppanen
Copy link
Member

@mkoppanen mkoppanen commented Oct 9, 2014

No feedback. Please reopen if the issue persists.

@mkoppanen mkoppanen closed this Oct 9, 2014
@szupervigyor
Copy link

@szupervigyor szupervigyor commented Oct 29, 2014

If you compile a module from source, you have to installed all required headers, in this case you have to install "libmemcached-dev" package which contains the required headers.
If you know which files are missing you can search for it with:
'apt-file search "libmemcached/memcached.h"'

@winos
Copy link

@winos winos commented Aug 26, 2015

this worked for me.

you should put the absolute path of your libmemcached. E.g:

 --with-libmemcached-dir=/usr/local/libmemcached/ --disable-memcached-sasl

The script config (when you perfom ./config ) contain this line:

 if test ! -f "$PHP_LIBMEMCACHED_DIR/include/libmemcached/memcached.h"; then
  278:       AC_MSG_ERROR(Unable to find memcached.h under $PHP_LIBMEMCACHED_DIR)

@mariusz-buk
Copy link

@mariusz-buk mariusz-buk commented Nov 17, 2017

First install libmemcached eg. sudo yum install libmemcached-devel

I have memcached.h located in /usr/include/libmemcached.

So I executed ./configure --with-libmemcached-dir=/usr --disable-memcached-sasl

I hope this helps anyone.

@generalconsensus
Copy link

@generalconsensus generalconsensus commented Feb 6, 2019

libmemcached-dev for ubuntu18

@Saneesh
Copy link

@Saneesh Saneesh commented May 9, 2019

libmemcached-dev for ubuntu18

From where you downloaded it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
8 participants
You can’t perform that action at this time.