Can you please resolve?
sudo pacman -U /var/cache/pacman/pkg/python-cryptography-36.0.0-1-x86_64.pkg.tar.zst
has result
error: '/var/cache/pacman/pkg/python-cryptography-36.0.0-1-x86_64.pkg.tar.zst': could not find or read package
Git Clone URL: | https://aur.archlinux.org/ocrmypdf.git (read-only, click to copy) |
---|---|
Package Base: | ocrmypdf |
Description: | A tool to add an OCR text layer to scanned PDF files, allowing them to be searched |
Upstream URL: | https://github.com/ocrmypdf/OCRmyPDF |
Licenses: | MPL2 |
Submitter: | dreuter |
Maintainer: | fbrennan (pigmonkey) |
Last Packager: | pigmonkey |
Votes: | 125 |
Popularity: | 3.53 |
First Submitted: | 2014-01-27 11:36 (UTC) |
Last Updated: | 2024-12-10 05:10 (UTC) |
« First ‹ Previous 1 2 3 4 5 6 7 8 9 10 .. 22 Next › Last »
Can you please resolve?
sudo pacman -U /var/cache/pacman/pkg/python-cryptography-36.0.0-1-x86_64.pkg.tar.zst
has result
error: '/var/cache/pacman/pkg/python-cryptography-36.0.0-1-x86_64.pkg.tar.zst': could not find or read package
After upgrading ocrmypdf to version 13.4.4, I needed to downgrade the cryptography package with sudo pacman -U /var/cache/pacman/pkg/python-cryptography-36.0.0-1-x86_64.pkg.tar.zst
to get rid of the error
pkg_resources.DistributionNotFound: The 'cryptography~=36.0.0' distribution was not found and is required by pdfminer.six.
Run:
p -U /var/cache/pacman/pkg/python-pdfminer-20220319-1-any.pkg.tar.zst
To downgrade python-pdfminer
to the 20220319 version.
pkg_resources.DistributionNotFound: The 'pdfminer.six!=20200720,<=20220319,>=20191110' distribution was not found and is required by ocrmypdf free(): invalid pointer Aborted (core dumped)
Even if I add the line "sed -i "s|20220319|20220506|g" setup.cfg" before setup.py
The line is now: sed -i "s|20220319|20220506|g" setup.cfg
@frankspace: Yes, it did help. Thank you once again for sharing. It was too logical and clear not to work. I just successfully retried and compile it manually after implementing the fix in the PKGBUILD. There might have been a typo on the first try. Sorry for taking your time away, but at least it helped me starting learning about how to fix this kind of annoyances by myself. Have a nice day and stay safe.
Ps: still out of date though, thence a workaround by the end user is still needed, unfortunately. At least it has not yet crashed on me, under heavy usage.
@NickJolly: Sorry about that.
The purpose of the fix was to implement the upstream commit that fixed pdfminer compatibility: https://github.com/ocrmypdf/OCRmyPDF/commit/04996caac34a418cf233c0f3c8ac436b6f2b5920
I unfortunately don't have any idea how to do that with a python package by way of stuff like a git patch or whatever, but the only functional part of that commit is very simple: changing a version number in setup.cfg. Although sed
's syntax occasionally ranges from opaque to outright insane, that's a pretty simple fix, because no special characters are involved and it's a unique number that occurs only once in a single file.
For context, here is my entire (as amended) package()
section:
package () {
cd "${srcdir}/${pkgname}-${pkgver}"
#until they push a new version, needed to work with current pdfminer
sed -i "s|20211012|20220319|g" setup.cfg
python setup.py install --root="$pkgdir/" --optimize=1
install -Dm644 LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE.rst
}
I just double-checked that it does compile for me, and work afterwards, in a clean chroot. I should point out that I only use AUR helpers to check for packages that need updating, I always compile stuff with makepkg. Also, I use Artix, but that really shouldn't make a difference.
Does that help?
EDIT: I see upstream is claiming their test suite fails here: https://github.com/ocrmypdf/OCRmyPDF/issues/937#issuecomment-1082721212 -- so it's possible this fix works for my (rather simple) use-cases but won't work for everyone. That, I wouldn't have a clue about.
Hi there @frankspace. The fix you kindly shared did not work for me. Would you mind elaborating on it? There must be something I am missing. Thank you
This pkgbuild tracks the upstream package from PyPi, so it will not update to 13.4.2 until upstream pushes the new release there.
Pinned Comments
fbrennan commented on 2023-05-12 22:54 (UTC)
The flag was invalid and has been removed with no action taken as no new version was released. There's nothing to do for this package; no new release has been made. Rebuild, as @eclairevoyant has said.