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




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