国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統 > Linux > 正文

Gearman::XS在Centos下的編譯安裝方法

2019-10-26 18:41:18
字體:
來源:轉載
供稿:網友

本文簡述了Gearman::XS在Centos下編譯安裝方法,供大家參考學習一下!

目前Gearman能夠支持各種語言,其官網的描述如下:
 

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.

 
個人嘗試了C、python、perl三種語言的API,感覺perl的API功能相對來說齊全一點。Gearman::XS是perl的開源支持。其鏈接如下:http://search.cpan.org/~krow/Gearman-XS/

在RHEL5.7下安裝的Gearman::XS,中間會出現各種問題,此處給出這些問題的解決方法供大家參考。

首先,我使用了cpanm來安裝Gearman::XS,結果如下:

[@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.

顯然force強制安裝肯定是不行的,所以就找原因。查看 /root/.cpanm/work/1392343258.18128/build.log文件,發現其中有如下的提示:

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.

看到是在編譯的時候出了問題,所以,咱們切換到它的編譯目錄(即 /root/.cpanm/work/1392343258.18128/這個目錄)

cd /root/.cpanm/work/1392343258.18128/Gearman-XS-0.15

然后執行make命令,就可以看到上面報的編譯錯誤了。ok,下面就著手解決它。

vi Makefile

可以找到:

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

刪掉最后的“-Wno-format-invalid-specifier”這個選項,然后保存退出,再次執行make。
 
會發現報出如下錯誤:

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            
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 山阳县| 南城县| 南部县| 夏河县| 固始县| 石景山区| 军事| 腾冲县| 石景山区| 奉贤区| 东光县| 建宁县| 义乌市| 闽侯县| 明星| 宁化县| 镇雄县| 龙井市| 文山县| 宕昌县| 福鼎市| 桂林市| 安西县| 左权县| 乐清市| 南乐县| 西和县| 贵阳市| 怀宁县| 武宁县| 和政县| 文登市| 香河县| 桂东县| 乌兰察布市| 莱西市| 普兰店市| 嘉定区| 婺源县| 宜丰县| 阿拉善右旗|