試著製作一個httpd 2.4.3的rpm包

試著製作一個httpd 2.4.3的rpm包

我的規格文件是:

%prep
tar zxvf $RPM_SOURCE_DIR/httpd-2.4.3.tar.gz

%build

%install
cd httpd-2.4.3
./configure -prefix=/usr/local/apache
make
make install

%preun
if [ -z "`ps aux|grep httpd | grep -v grep`" ];then
   pkill httpd >/dev/null
exit 0
fi

%files
/usr/local/apache

rpmbuild -ba lx.spec 

,httpd-2.4-3.x86_64.rpm的rpm包是可以的。但是當我安裝它時

rpm -ivh httpd-2.4-3.x86_64.rpm

這是不對的,錯誤訊息是:

error: Failed dependencies:
    libpcre.so.1()(64bit) is needed by httpd-2.4-3.x86_64

答案1

如果您的機器是 CentOS 或 RHEL,則需要安裝該pcre.x86_64軟體包。

# yum resolvedep "libpcre.so.0()(64bit)"
Loaded plugins: downloadonly, product-id, rhnplugin, security
This system is receiving updates from RHN Classic or RHN Satellite.
0:pcre-7.8-6.el6.x86_64

相關內容