软件包安装问题rpm规范文件,其中包括yum安装依赖项 [英] package installtion issue , rpm spec file , which include yum to install dependence

查看:109
本文介绍了软件包安装问题rpm规范文件,其中包括yum安装依赖项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

已将这部分规范文件

%post
%{__mv} %{_sysconfdir}/sysconfig/data.py /opt/data.py
%{__mv} %{_sysconfdir}/sysconfig/get-pip.py /opt/get-pip.py



yum -y install python-psycopg2
python /opt/get-pip.py
pip install setuptools --no-use-wheel --upgrade
pip install requests


echo -e "*/5 * * * * /usr/bin/python  /opt/data.py"  >> /var/spool/cron/root

%files
%{_sysconfdir}/sysconfig/data.py
%{_sysconfdir}/sysconfig/get-pip.py

%changelog

没有错误的rpmbuild,但是当我尝试安装卡住的软件包时, 我对依赖项安装有疑问,我使用yum是正确的,还是在这里使用yum有不同的方法

the rpmbuild without error , but when i try to install the package its stuck , i've doubt about dependence installation , im using yum am i right or there is different way to to yum here

推荐答案

我认为它卡住了,因为您试图运行多个YUM/RPM进程(您的程序包和python-psycopg2). 但是,您不应在rpm内运行yum或rpm,而应将python-psycopg2声明为依赖项,因此YUM将在安装RPM之前安装.

I believe it stuck because you are trying to run multiple YUM/RPM processes (Your package and python-psycopg2). However, you should not run yum or rpm within you rpm, but declare python-psycopg2 as a dependency, so YUM will install it before installing your RPM.

这篇关于软件包安装问题rpm规范文件,其中包括yum安装依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆