2020-05-31 18:40:35
之前是在centos 5上对软件进行rpm打包,今天需要在centos 6上打包,发现File not found: /root/rpmbuild/BUILDROOT/…的错误,看是centos 6中的rpmbuild topdir已经改变,为了能兼容centos 5的spec文件,需要对topdir进行修改:
打开/usr/lib/rpm/macros文件:
%_topdir %{getenv:HOME}/rpmbuild
更改为:
%_topdir %{_usrsrc}/redhat
另外还需要定义buildroot
在spec文件中的make install后面加上DESTDIR=%{buildroot},即:
make install DESTDIR=%{buildroot}
DESTDIR是Makefile文件中定义的一个安装路径的变量,根据实际情况修改,比如mysql和nginx的是DESTDIR,而php的是INSTALL_ROOT。
centos 7 yum安装配置apache 2.4
07-15
centos7.1 LVS健康检查bash脚本
06-26
centos7.3下配置LAMP部署WordPress博客
07-04
centos7安装配置gitlab(使用外部nginx)
06-11
centos7安装配置squid正向代理
06-23
Debian系统apt-get包管理命令用法
05-25
Dockerfile参考(1) – 用法
05-22
expect spawn、linux expect 用法小记
03-22
linux vim的基本用法介绍
05-10
ngx_http_mirror_module- nginx流量镜像模块用法
03-31
centos 6.x 上搭建docker
07-12
centos 7 JDK、Tomcat9 安装并配置
05-29
centos 7.0安装LAMP服务器(PHP+MariaDB+Apache)
06-07
centos 7编译安装及yum安装Python 3
06-15
centos 7配置并更换为本地或网络yum源
07-17
centos7下Etcd集群搭建
07-07
centos7安装配置PostgreSQL数据库服务器
06-20
centos7源码编译安装Nginx
06-11
Linux centos 7 重置root用户密码
07-12
Linux alias设置指令的别名命令详解
07-18