checkinstall打包工具使用

时间:2022-02-17 23:07:00

checkinstall官网: http://asic-linux.com.mx/~izto/checkinstall/

该工具适用于针对源码编译时(比如 *.tar.gz)进行制作rpm包

 

下载安装checkinstall,安装完成后生成 /usr/local/sbin/checkinstall

# git clone http://checkinstall.izto.org/checkinstall.git

# make && make install

 

然后安装打包软件,生成打包路径

# yum install rpmbuild  rpmdevtools -y

# rpmdev-setuptree

 

该工具使用时机为:  在执行完 ./configure 和 make 之后开始使用。

sudo checkinstall

此时同时会有一些交互信息,主要的就是叫你选择压制包的格式,有RPM /Debian 或Slackware,记住一定要用sudo即使你是root用户

默认只生成安装包,不进行安装操作。生成的安装包放在 /root/rpmbuild/RPMS/x86_64/目录下,使用  rpm -qpi  查看安装包的相关信息。

-------------------------------------------------------------------------------------------------------------------------------

注意:对于 64位的系统,制作过程中可能会出现如下错误:
Error with checkinstall on 64 bit system 
By jbayer - Last updated: Friday, July 15, 2011
The following error can occur on 64 bit systems when trying to use the checkinstall program:
ERROR: ld.so: object '/usr/local/lib64/installwatch.so’ from LD_PRELOAD cannot be preloaded: ignored.
The problem occurs because the loader can’t find the shared object file.  The solution is very simple.  Assuming that the installwatch.so is 
解决方法如下:
located in /usr/local/lib, just type the following commands:


# echo "/usr/local/lib64" >/etc/ld.so.conf.d/installwatch.conf
# ldconfig
# ln -s /usr/local/lib/installwatch.so /usr/local/lib64/installwatch.so

 

参考资料: http://www.360doc.com/content/12/0712/00/10384031_223689045.shtml