In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly explains "the compilation and installation method tutorial of Gearman::XS under Centos". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn the "Gearman::XS compilation and installation method tutorial under Centos".
At present, Gearman can support various languages, and its official website is described as follows:
Language Bindings/Drivers/FrameworksSelect your language-cross links to download section which details all your options.C, C#/.NET, Go, Java, Lisp, Nodejs, PHP, Perl, Python, Ruby, Database UDFs.
I have tried API in C, python and perl, and I feel that the API function of perl is relatively complete. Gearman::XS is open source support for perl. The link is as follows: http://search.cpan.org/~krow/Gearman-XS/
There are all kinds of problems in the Gearman::XS installed under RHEL5.7. Here are the solutions to these problems for your reference.
First, I used cpanm to install Gearman::XS, and the results are as follows:
[@ localhost yunfei] # cpanm Gearman::XS-- > Working on Gearman::XSFetching http://www.cpan.org/authors/id/K/KR/KROW/Gearman-XS-0.15.tar.gz... OKConfiguring Gearman-XS-0.15... OKBuilding and testing Gearman-XS-0.15... FAIL! Installing Gearman::XS failed. See / root/.cpanm/work/1392343258.18128/build.log for details. Retry with-- force to force install it.
Obviously, the mandatory installation of force will not work, so look for the reason. Look at the / root/.cpanm/work/1392343258.18128/build.log file and find the following prompt:
Gcc-c-Wall-Wundef-Wno-shadow-Wmissing-prototypes-fdiagnostics-show-option-Wformat=2-Wstrict-aliasing-Wextra-Wmissing-declarations-Wcast-align-Wswitch-default-Wswitch-enum-Wno-undef-Wno-unused-value-Wno-unused-variable-Wno-unused-parameter-Wno-format-invalid-specifier-O2-g-pipe-Wall-Wp -D_FORTIFY_SOURCE=2-fexceptions-fstack-protector-- param=ssp-buffer-size=4-M64-mtune=generic-DVERSION=\ "0.15\"-DXS_VERSION=\ "0.15\"-fPIC "- I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE" XS.ccc1: error: unrecognized command line option "- Wno-format-invalid-specifier" make: * * [XS.o] Error 1-> FAIL Installing Gearman::XS failed.
Seeing that there was a problem during compilation, we switched to its compilation directory (that is, / root/.cpanm/work/1392343258.18128/)
Cd / root/.cpanm/work/1392343258.18128/Gearman-XS-0.15
Then execute the make command, and you can see the compilation error reported above. Ok, let's start to solve it.
Vi Makefile
You can find:
CCFLAGS =-Wall-Wundef-Wno-shadow-Wmissing-prototypes-fdiagnostics-show-option-Wformat=2-Wstrict-aliasing-Wextra-Wmissing-declarations-Wcast-align-Wswitch-default-Wswitch-enum-Wno-undef-Wno-unused-value-Wno-unused-variable-Wno-unused-parameter-Wno-format-invalid-specifier
Delete the last "- Wno-format-invalid-specifier" option, then save the exit, and execute make again.
You will find the following error reported:
In file included from XS.xs:11:gearman_xs.h:18:36: error: libgearman-1.0/gearman.h: No such file or directoryXS.c: In function 'XS_Gearman__XS_strerror':XS.c:229: error:' gearman_return_t' undeclared (first use in this function) XS.c:229: error: (Each undeclared identifier is reported only onceXS.c:229: error: for each function it appears in.) XS.c:229: error: expected' 'before' rc'XS.xs:82: warning: implicit declaration of function 'gearman_strerror'XS.xs:82: error:' rc' undeclared (first use in this function) XS.xs:82: warning: assignment makes pointer from integer without a castmake: * * [XS.o] Error 1
Obviously, you can't find gearman.h, which means you need gearman-devel. Normally, you can solve this problem by installing the gearman-devel package directly through yum. However, my rhel is a manually installed version of Gearman-1.1.11, which is not consistent with the version installed by yum, so open and modify Makefile again.
Find INC and LDDLFLAGS, and modify them as follows:
LDDLFLAGS =-shared-O2-g-pipe-Wall-Wp,-D_FORTIFY_SOURCE=2-fexceptions-fstack-protector-- param=ssp-buffer-size=4-M64-mtune=generic-L/usr/local/gearman/lib/-lgearman INC =-I/usr/local/gearman/include/-L/usr/local/gearman/lib/
You can see that incule and lib related things have been added to Gearman. Save and exit Makefile, execute make again, pass smoothly, and then make install is installed.
At this point, I believe you have a deeper understanding of the "tutorial on compiling and installing Gearman::XS under Centos". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.