1、安装libmemcached,出现:
clients/ms_conn.o: In function `ms_get_udp_request_id':
/root/soft/libmemcached-0.40/clients/ms_conn.c:194: undefined reference to `__sync_fetch_and_add_4'
clients/ms_conn.o: In function `ms_reconn_socks':
/root/soft/libmemcached-0.40/clients/ms_conn.c:1051: undefined reference to `__sync_fetch_and_add_4'
clients/ms_conn.o: In function `ms_reconn':
/root/soft/libmemcached-0.40/clients/ms_conn.c:919: undefined reference to `__sync_fetch_and_add_4'
/root/soft/libmemcached-0.40/clients/ms_conn.c:956: undefined reference to `__sync_fetch_and_add_4'
clients/ms_thread.o: In function `ms_setup_thread':
/root/soft/libmemcached-0.40/clients/ms_thread.c:225: undefined reference to `__sync_fetch_and_add_4'
clients/ms_thread.o:/root/soft/libmemcached-0.40/clients/ms_thread.c:208: more undefined references to `__sync_fetch_and_add_4' follow
collect2: ld returned 1 exit status
make[2]: *** [clients/memslap] 错误 1
make[2]: Leaving directory `/root/soft/libmemcached-0.40'
make[1]: *** [all-recursive] 错误 1
make[1]: Leaving directory `/root/soft/libmemcached-0.40'
make: *** [all] 错误 2
这个问题是因为在32位操作系统上进行安装出现的,我们需要进行如下操作:
./configure --disable-64bit CFLAGS="-O3 -march=i686"
2、安装memcached_functions_mysql出现以下错误:
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for DEPS... configure: error: Package requirements (libmemcached >= 0.12) were not met:
No package 'libmemcached' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
需要重新设置环境变量,执行export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig,再重新操作即可。
阅读(3411) | 评论(0) | 转发(0) |