Recently upgraded php memcached to 2.1.0. because it depends on the libmemcached library, the previously installed version is 1.0.2. An error occurs during compilation and a later version of libmemcached is required. Therefore, download the latest version of libmemcached for compilation and installation. Unfortunately, libmemcached 1.0.14 is saved during compilation. The general error message is:
Libmemcached/auto. cc: In function 'memcached _ return_t text_incr_decr (memcached_server_st *, bool, const char *, size_t, uint64_t, bool) ': libmemcached/auto. cc: 73: error: expected ') 'before' priu64' In file encoded from. /libmemcached/common. h: 72, from. /libmemcached/csl/common. h: 40, from libmemcached/csl/context. cc: 38:
Google queries the problem because the GCC version is low, so we had to upgrade GCC. Fortunately, if there is yum, we can run the following command:
Yum install gcc44 gcc44-c ++ libstdc ++ 44-devel Add the following content to/etc/bashrc export CC =/usr/bin/gcc44export CXX =/usr/bin/g ++ 44
Exit the terminal and log on again. The compilation and installation are successful, and the memcached extension is also successfully upgraded.