Hi, i'm trying to build a rpm package for my project. My rpm package has dependencies that are not included in the default repo in Centos. And then i did something. But it doesn't work. Yum can't find python36, python36-setuptools, python36-devel because of epel release.

```
### Rpm spec file

%if "%{?fedora}" >= "28"
Requires:       python3 >= 3.6
%else
%if "%{?rhel}" >= "7"
Requires:       epel-release, python36, python36-setuptools, python36-devel
%endif
%endif
```

``` Console
[vagrant@localhost rpmbuild]$ rpmbuild -bb SPECS/myproject.spec
[vagrant@localhost rpmbuild]$ sudo yum install RPMS/noarch/myproject-2.0-1.el7.centos.noarch.rpm
Loaded plugins: fastestmirror
Examining RPMS/noarch/myproject-2.0-1.el7.centos.noarch.rpm: myproject-2.0-1.el7.centos.noarch
Marking RPMS/noarch/myproject-2.0-1.el7.centos.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package myproject.noarch 0:2.0-1.el7.centos will be installed
--> Processing Dependency: epel-release for package: myproject-2.0-1.el7.centos.noarch
Loading mirror speeds from cached hostfile
 * base: centos.turhost.com
 * extras: centos.turhost.com
 * updates: mirror.muvhost.com
--> Processing Dependency: python36 for package: myproject-2.0-1.el7.centos.noarch
--> Running transaction check
---> Package myproject.noarch 0:2.0-1.el7.centos will be installed
--> Processing Dependency: python36 for package: myproject-2.0-1.el7.centos.noarch
---> Package epel-release.noarch 0:7-11 will be installed
--> Finished Dependency Resolution
Error: Package: myproject-2.0-1.el7.centos.noarch (/myproject-2.0-1.el7.centos.noarch)
           Requires: python36-devel
Error: Package: myproject-2.0-1.el7.centos.noarch (/myproject-2.0-1.el7.centos.noarch)
           Requires: python36
Error: Package: myproject-2.0-1.el7.centos.noarch (/myproject-2.0-1.el7.centos.noarch)
           Requires: python36-setuptools
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
[vagrant@localhost rpmbuild]$
```

How can we solve it?

_______________________________________________
Rpm-ecosystem mailing list
Rpm-ecosystem@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-ecosystem

Reply via email to