Я перехожу по этой ссылке https://docs.bitnami.com/google/apps/wordpress/#how-to-install-the-memcached-module-using-the-libmemcached-library, чтобы установить memcached в стек bitnami nginx платформы Google Centos 7.
wget https://launchpad.net/libmemcached/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gz
tar -zxf libmemcached-1.0.18.tar.gz
cd libmemcached-1.0.18
./configure --prefix=/home/lnmp/common
make
/home/lnmp
это мой путь установки bitnami
когда я запускаю команду make
, журнал ошибок будет показан ниже
make -j2 all-am
make[1]: Entering directory `/home/lnmp/libmemcached-1.0.18'
CXXLD libhashkit/libhashkit.la
/bin/ld: libhashkit/.libs/libhashkit_libhashkit_la-crc32.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/bin/ld: libhashkit/.libs/libhashkit_libhashkit_la-digest.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/bin/ld: libhashkit/.libs/libhashkit_libhashkit_la-function.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/bin/ld: libhashkit/.libs/libhashkit_libhashkit_la-has.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/bin/ld: libhashkit/.libs/libhashkit_libhashkit_la-hashkit.o: relocation R_X86_64_32S against hidden symbol `_Z21hashkit_one_at_a_timePKcmPv' can not be used when making a shared object
/bin/ld: libhashkit/.libs/libhashkit_libhashkit_la-jenkins.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/bin/ld: libhashkit/.libs/libhashkit_libhashkit_la-md5.o: relocation R_X86_64_32 against `.data' can not be used when making a shared object; recompile with -fPIC
/bin/ld: libhashkit/.libs/libhashkit_libhashkit_la-murmur3.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/bin/ld: libhashkit/.libs/libhashkit_libhashkit_la-rijndael.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/bin/ld: libhashkit/.libs/libhashkit_libhashkit_la-str_algorithm.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/bin/ld: libhashkit/.libs/libhashkit_libhashkit_la-strerror.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/bin/ld: libhashkit/.libs/libhashkit_libhashkit_la-aes.o: relocation R_X86_64_PC32 against symbol `calloc@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
make[1]: *** [libhashkit/libhashkit.la] Error 1
make[1]: Leaving directory `/home/lnmp/libmemcached-1.0.18'
make: *** [all] Error 2
Вы можете скачать Makefile, чтобы помочь мне изменить этот файл по этой ссылке libmemcached Makefile
И кто-то сказал, relocation R_X86_64_32 against .rodata can not be used when making a shared object
ошибка в том, что для создания статической библиотеки нужна опция -fPIC, нужно добавить CFLAGS += -fPIC
, чтобы исправить это. Но этот Makefile слишком сложен, я не знаю, как добавить его и как его исправить кто-нибудь может мне помочь?