4

Mac OS X Yosemite を実行している MacBook Pro に libmemcached をインストールする必要があります。

memcached デーモンは既にインストールしていますが、PHP の memcached.so PECL 拡張機能を機能させるには、libmemcached をインストールする必要があります。

https://launchpad.net/libmemcached/+downloadから tar.gz をダウンロードし、ファイル README.FIRST を確認しました。

Hi!

If you are getting this code from http://launchpad.net/libmemcached then
continue reading. Otherwise these directions are not for you (well maybe...).

To obtain code from http://bazaar.launchpad.net/libmemcached you will need to
issue the following command:

bzr branch lp:libmemcached

Once the tree is cloned you will need to build the "configure" script. You
can do this by running the script:

./bootstrap.sh autoreconf

It will set up all of the files you need to build libmemcached. At that
point it is just the typical "./configure; make; make test; make install"

For a tarball release do a "make dist" and for an RPM type "make rpm".

For patches, we prefer you push a branch to launchpad and then submit that 
branch to be merged. For more information, see:

https://help.launchpad.net/Code/UploadingABranch
https://help.launchpad.net/Code/Review

Thanks and keep hacking!

Cheers,
  -Brian
  Seattle, WA.

そこで、Bazaar をインストールしてから、次のコマンドを入力しました。

bzr branch lp:libmemcached

しかし、私が得るものは次のとおりです。

    bzr: warning: unsupported locale setting
  bzr could not set the application locale.
  Although this should be no problem for bzr itself, it might
  cause problems with some plugins. To investigate the issue,
  look at the output of the locale(1p) tool.
Not checking SSL certificate for xmlrpc.launchpad.net.
You have not informed bzr of your Launchpad ID, and you must do this to
write to Launchpad or access private data.  See "bzr help launchpad-login".
bzr: ERROR: Target directory "libmemcached" already exists.  

./configureを実行してからmakeを実行しようとすると、次のような多くの警告が表示されます。

./libmemcached/server.hpp:82:62: warning: implicit conversion loses integer precision: 'uint64_t'
  (aka 'unsigned long long') to 'uint32_t' (aka 'unsigned int') [-Wshorten-64-to-32]

libmemcached/csl/scanner.cc:2070:2: warning: 'register' storage class specifier is deprecated
      [-Wdeprecated-register]

libmemcached/byteorder.cc:75:10: error: use of undeclared identifier 'htonll'

そして2つのエラー:

2 errors generated.
make[1]: *** [libmemcached/libmemcached_libmemcached_la-byteorder.lo] Error 1
make: *** [all] Error 2

したがって、実際にはlibmemcachedをインストールできません。この問題を解決するにはどうすればよいですか? なぜこれらすべてのエラーが発生するのですか?

注目してくれてありがとう!

いくつかの助けを願っています。

4

2 に答える 2