arthurnn / memcached

A Ruby interface to the libmemcached C client
Academic Free License v3.0
432 stars 125 forks source link

failed to install memcached in centos 6 #177

Closed augus-zz closed 6 years ago

augus-zz commented 6 years ago

gem install memcached Fetching: memcached-1.8.0.gem (100%) Building native extensions. This could take a while... ERROR: Error installing memcached: ERROR: Failed to build gem native extension.

    /usr/local/bin/ruby extconf.rb

checking for sasl/sasl.h... yes Touching all files so autoconf doesn't run. find . | xargs touch -t 201807041427.47 Configuring libmemcached. env CFLAGS='-fPIC -g -O2 -fPIC -g -O2 -fPIC ' LDFLAGS='-fPIC -L. -rdynamic -Wl,-export-dynamic -L. -rdynamic -Wl,-export-dynamic -L/usr/local/lib' ./configure --prefix=/usr/lib/ruby/gems/1.8/gems/memcached-1.8.0/ext --libdir=/usr/lib/ruby/gems/1.8/gems/memcached-1.8.0/ext/lib --without-memcached --disable-shared --disable-utils --disable-dependency-tracking CC="/usr/local/bin/gcc" 2>&1 checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking target system type... x86_64-unknown-linux-gnu checking for a BSD-compatible install... /usr/local/bin/install -c checking whether build environment is sane... yes /usr/lib/ruby/gems/1.8/gems/memcached-1.8.0/ext/libmemcached-0.32/config/missing: Unknown --is-lightweight' option Try/usr/lib/ruby/gems/1.8/gems/memcached-1.8.0/ext/libmemcached-0.32/config/missing --help' for more information configure: WARNING: 'missing' script is too old or missing checking for a thread-safe mkdir -p... /usr/local/bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking for style of include used by make... GNU checking for gcc... /usr/local/bin/gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether /usr/local/bin/gcc accepts -g... yes checking for /usr/local/bin/gcc option to accept ISO C89... none needed checking whether /usr/local/bin/gcc understands -c and -o together... yes checking dependency style of /usr/local/bin/gcc... none checking for isainfo... no checking how to run the C preprocessor... /usr/local/bin/gcc -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking minix/config.h usability... no checking minix/config.h presence... no checking for minix/config.h... no checking whether it is safe to define EXTENSIONS... yes checking how to print strings... printf checking for a sed that does not truncate output... /bin/sed checking for fgrep... /bin/grep -F checking for ld used by /usr/local/bin/gcc... /usr/local/bin/ld checking if the linker (/usr/local/bin/ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /usr/local/bin/nm -B checking the name lister (/usr/local/bin/nm -B) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 1966080 checking whether the shell understands some XSI constructs... yes checking whether the shell understands "+="... yes checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop checking for /usr/local/bin/ld option to reload object files... -r checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for dlltool... no checking how to associate runtime and link libraries... printf %s\n checking for ar... ar checking for archiver @FILE support... @ checking for strip... strip checking for ranlib... ranlib checking command to parse /usr/local/bin/nm -B output from /usr/local/bin/gcc object... ok checking for sysroot... no checking for mt... no checking if : is a manifest tool... no checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking dependency style of g++... none checking for objdir... .libs checking if /usr/local/bin/gcc supports -fno-rtti -fno-exceptions... no checking for /usr/local/bin/gcc option to produce PIC... -fPIC -DPIC checking if /usr/local/bin/gcc PIC flag -fPIC -DPIC works... yes checking if /usr/local/bin/gcc static flag -static works... no checking if /usr/local/bin/gcc supports -c -o file.o... yes checking if /usr/local/bin/gcc supports -c -o file.o... (cached) yes checking whether the /usr/local/bin/gcc linker (/usr/local/bin/ld -m elf_x86_64) supports shared libraries... yes checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... no checking whether to build static libraries... yes checking how to run the C++ preprocessor... g++ -E checking for ld used by g++... /usr/local/bin/ld -m elf_x86_64 checking if the linker (/usr/local/bin/ld -m elf_x86_64) is GNU ld... yes checking whether the g++ linker (/usr/local/bin/ld -m elf_x86_64) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC -DPIC checking if g++ PIC flag -fPIC -DPIC works... yes checking if g++ static flag -static works... no checking if g++ supports -c -o file.o... yes checking if g++ supports -c -o file.o... (cached) yes checking whether the g++ linker (/usr/local/bin/ld -m elf_x86_64) supports shared libraries... yes checking dynamic linker characteristics... (cached) GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking if g++ supports C++0x features without additional flags... no checking if g++ supports C++0x features with -std=c++0x... no checking if g++ supports C++0x features with -std=gnu++0x... no checking for stdlib.h... (cached) yes checking for GNU libc compatible malloc... yes checking for stdlib.h... (cached) yes checking for GNU libc compatible realloc... yes checking whether we are using the GNU C++ compiler... (cached) yes checking whether g++ accepts -g... (cached) yes checking dependency style of g++... (cached) none checking how to run the C preprocessor... /usr/local/bin/gcc -E checking whether SUNPRO_C is declared... no checking whether __ICC is declared... no checking for ISO C++ 98 include files... no checking memory usability... yes checking memory presence... yes checking for memory... yes checking tr1/memory usability... yes checking tr1/memory presence... yes checking for tr1/memory... yes checking boost/shared_ptr.hpp usability... no checking boost/shared_ptr.hpp presence... no checking for boost/shared_ptr.hpp... no checking the location of shared_ptr header file... configure: WARNING: a usable shared_ptr implementation was not found. Let someone know what your platform is. checking whether byte ordering is bigendian... no checking for an ANSI C-conforming const... yes checking for inline... inline checking for working volatile... yes checking for C/C++ restrict keyword... restrict checking whether time.h and sys/time.h may both be included... no checking for size_t... yes checking for special C compiler options needed for large files... no checking for _FILE_OFFSET_BITS value needed for large files... no checking "C Compiler version--yes"... "gcc (GCC) 4.5.2" checking "C++ Compiler version"... "g++ (GCC) 4.5.2" checking for simple visibility declarations... yes checking whether to enable assertions... yes checking assert.h usability... yes checking assert.h presence... yes checking for assert.h... yes checking whether it is safe to use -fdiagnostics-show-option... yes checking whether it is safe to use -Wconversion... yes checking whether it is safe to use -Wconversion with htons... yes checking whether it is safe to use -Wmissing-declarations from C++... no checking whether it is safe to use -Wlogical-op... yes checking whether it is safe to use -Wredundant-decls from C++... no checking for doxygen... no checking for perl... perl checking for the pthreads library -lpthreads... no checking whether pthreads work without any flags... no checking whether pthreads work with -Kthread... no checking whether pthreads work with -kthread... no checking for the pthreads library -llthread... no checking whether pthreads work with -pthread... no checking whether pthreads work with -pthreads... no checking whether pthreads work with -mthreads... no checking for the pthreads library -lpthread... no checking whether pthreads work with --thread-safe... no checking whether pthreads work with -mt... no checking for pthread-config... no configure: error: could not find libpthread extconf.rb failed Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options.

Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/usr/local/bin/ruby extconf.rb:70:in run': 'env CFLAGS='-fPIC -g -O2 -fPIC -g -O2 -fPIC ' LDFLAGS='-fPIC -L. -rdynamic -Wl,-export-dynamic -L. -rdynamic -Wl,-export-dynamic -L/usr/local/lib' ./configure --prefix=/usr/lib/ruby/gems/1.8/gems/memcached-1.8.0/ext --libdir=/usr/lib/ruby/gems/1.8/gems/memcached-1.8.0/ext/lib --without-memcached --disable-shared --disable-utils --disable-dependency-tracking CC="/usr/local/bin/gcc" 2>&1' failed (RuntimeError) from extconf.rb:50:incheck_libmemcached' from extconf.rb:47:in chdir' from extconf.rb:47:incheck_libmemcached' from extconf.rb:46:in chdir' from extconf.rb:46:incheck_libmemcached' from extconf.rb:73

Gem files will remain installed in /usr/local/lib/ruby/gems/1.8/gems/memcached-1.8.0 for inspection.

augus-zz commented 6 years ago

os: CentOS release 6.6 (Final) ruby: ree gcc (GCC) 4.5.2/g++ (GCC) 4.5.2

augus-zz commented 6 years ago

fixed, install gcc 5.2