在学习打包rpm,找到了个不错的参考站点 https://src.fedoraproject.org/cgit/rpms/
过程:
git clone -b el6 git://pkgs.fedoraproject.org/rpms/nginx.git
rpmbuild -bb nginx.spec
出现问题:
......
/usr/bin/perl Makefile.PL "LIB=" "INSTALLSITEMAN3DIR="
Writing Makefile for nginx
==> Your Makefile has been rebuilt. <==
==> Please rerun the make command. <==
false
make[2]: *** [Makefile] Error 1
make[2]: Leaving directory `/root/rpmbuild/BUILD/nginx-1.10.2/objs/src/http/modules/perl'
make[1]: *** [objs/src/http/modules/perl/blib/arch/auto/nginx/nginx.so] Error 2
make[1]: Leaving directory `/root/rpmbuild/BUILD/nginx-1.10.2'
make: *** [build] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.85UQUm (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.85UQUm (%build)
解决:
重新rpmbuild 还是出错,看不出什么毛病,谷歌参考http://www.perlmonks.org/?node_id=990744 然后查看自己系统时间的确是错误的,更新了系统时间后,顺利编译通过。
ntpdate -u time.windows.com