rpmbuile 制作drbd RPM包

drbd-8.4.3.tar.gz 源码编译制作rpm 包

解压tar -axf drbd-8.4.3.tar.gz
./configure --enable-spec --with-km  
## --enable-spec           Rather than creating Makefiles, create an RPM spe
## --with-km               Enable kernel module

如果编译出现 :configure: error: no acceptable C compiler found in $PATH
则 yum install -y gcc


configure: error: Cannot build utils without flex, either install flex or pass the --without-utils option. #缺少flex 包
yum install -y fiex

rpmbuild -bb drbd.spec    ##Build  drbd  package
出现 error: File /root/rpmbuild/SOURCES/drbd-8.4.3.tar.gz: No such file or directory  #没有找见原压缩包
cp drbd-8.4.3.tar.gz  /root/rpmbuild/SOURCES/  #将原压缩包放在SOURCES目录下

rpmbuild -bb drbd-km.spec   ## Build  drbd内核  package
出现依赖关系  kernel-devel is needed by drbd-km-8.4.3-2.el6.x86_64
yum install -y kernel-devel




發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章