pypolicyd-spf and opendkim packages are broken on AlmaLinux 9

Hello,

Please note that Epel-release is already installed.

sudo dnf install pypolicyd-spf

Problem: conflicting requests - nothing provides python3-pyspf needed by pypolicyd-spf-2.0.2-15.el9.noarch

(try to add ‘–skip-broken’ to skip uninstallable packages or ‘–nobest’ to use not only best candidate packages)

There is also nothing python3-pyspf or python2-pyspf or python-pyspf or pyspf.

If dependency is not there why the package is still on repos?

How can I install this package?

The same error for opendkim package:

sudo dnf install opendkim

Error:
Problem: conflicting requests

nothing provides libmilter.so.1.0()(64bit) needed by opendkim-2.11.0-0.28.el9.x86_64
nothing provides libmemcached.so.11()(64bit) needed by opendkim-2.11.0-0.28.el9.x86_64

(try to add ‘–skip-broken’ to skip uninstallable packages or ‘–nobest’ to use not only best candidate packages)

5 Replies

Hi @penguin -

I created a test Linode running AlmaLinux 9. After running dnf install epel-release, I was encountering the same errors as you.

For pypolicyd-spf I installed pip3, which I then used to install pypolicyd-spf.

dnf install python3-pip

pip3 install pypolicyd-spf
Collecting pypolicyd-spf
  Downloading pypolicyd-spf-2.0.2.tar.gz (38 kB)
Using legacy 'setup.py install' for pypolicyd-spf, since package 'wheel' is not installed.
Installing collected packages: pypolicyd-spf
    Running setup.py install for pypolicyd-spf ... done
Successfully installed pypolicyd-spf-2.0.2

Which is located here:

pypolicyd-spf in /usr/local/lib/python3.9/site-packages (2.0.2)

The pip3 command runs the same .py setup script as recommended in the README that's available when downloading and extracting the pypolicyd-spf-2.0.2 tarball directly from the site below.

We also have a guide on managing python packages, should you need it.


With opendkim the issue is with the missing milter packages. Another user brought this up in the AlmaLinux forums, and was able to find a work around by enabling the CodeReady Linux Builder (CRB) repository.

After running the suggested command to enable CRB I was able to install opendkim:

dnf config-manager --set-enabled crb

dnf install opendkim

You can download both these from the web and build them from source.

-- sw

@mcivitarese

Thanks for the detailed answer.

How come a prominent server OS like RedHat omits these packages?
People run mail servers on Redhat and variants, no?
My previous server was Debian I wanted to try RHEL but i guess that Debian have not these problems.

@stevewi, By building them source how dependency issue is being solved?

It won’t but in a pickle the option is always available…and you don’t have to deal with packaging issues…since you do the 'packaging' yourself.

-- sw

EDIT (MAYBE A BETTER SOLUTION THAN USING PYTHON PIP):

Instead of using python-pip we can build the package from source easily with Mock from Fedora 36 or CentOS 8. I don't know it is harmful but I've done it and it works:

Get the pacakge from CentOS or Fedora with wget:

wget https://download-ib01.fedoraproject.org/pub/epel/8/Everything/SRPMS/Packages/p/python-pyspf-2.0.14-8.el8.src.rpm 

or

wget https://download-ib01.fedoraproject.org/pub/fedora/linux/releases/36/Everything/source/tree/Packages/p/python-pyspf-2.0.14-11.fc36.src.rpm 
sudo dnf install -y epel-release
sudo dnf install -y mock rpm-build
sudo usermod -a -G mock username
rpm -i ./fullpackagename.src.rpm

If it doesn't work for regular user, switch to root and do with it.
The files will be under /root directory

cd SPECS/

Change the specs file if needed.

rpmbuild -bs packagename.spec
mock -r almalinux-9-x86_64 --rebuild fullpackagename.src.rpm
dnf localinstall /var/lib/mock/almalinux-9-x86_64/result/python3-pyspf-2.0.14-8.el9.noarch.rpm

Now the dependency is ready. We can install pypolicyd-spf from repos:

dnf install pypolicyd-spf

Enjoy.

Sources:
https://pkgs.org/search/?q=python3-pyspf
https://wiki.almalinux.org/documentation/building-packages-guide.html

Thanks stevewi for the packaging suggestion.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct