2

I recently tried to setup https://github.com/NVIDIA/FastPhotoStyle/ locally (issues with Docker that I've been waiting for stability prevented that). After installation, my DNF has started throwing errors due to a missing librepo module.

I'm using Fedora 27.

I've gathered that it has changed how Python loads it's modules (possibly due to Conda, I'm not 100% sure), but I'm struggling to get it working again.

I've tried to install the following packages: http://fedora.is.co.za/linux/releases/27/Everything/x86_64/os/Packages/p/python3-librepo-1.8.0-1.fc27.x86_64.rpm http://fedora.is.co.za/linux/releases/27/Everything/x86_64/os/Packages/p/python2-librepo-1.8.0-1.fc27.x86_64.rpm but to no avail.

I've tried to locate the librepo packages in the pip or conda repositories, again to no avail.

Any command with DNF outputs the following:

Traceback (most recent call last):
  File "/usr/bin/dnf", line 57, in <module>
    from dnf.cli import main
  File "/usr/lib/python3.6/site-packages/dnf/__init__.py", line 31, in <module>
    import dnf.base
  File "/usr/lib/python3.6/site-packages/dnf/base.py", line 26, in <module>
    from dnf.comps import CompsQuery
  File "/usr/lib/python3.6/site-packages/dnf/comps.py", line 29, in <module>
    import dnf.util
  File "/usr/lib/python3.6/site-packages/dnf/util.py", line 32, in <module>
    import librepo
ModuleNotFoundError: No module named 'librepo'

I'd appreciate any help or insight as I've been googling a fair bit, but have yet to come to a solution

aL_eX
  • 1,453
  • 2
  • 15
  • 30
CountNoobula
  • 53
  • 1
  • 8
  • What does the command `rpm -Vv python-librepo` show? – l'L'l Feb 23 '18 at 09:24
  • It outputs: `package python-librepo is not installed` – CountNoobula Feb 23 '18 at 09:47
  • Well you could try to install it with `rpm -ivh python-librepo.rpm` (first download the librepo package you want). – l'L'l Feb 23 '18 at 10:19
  • It outputs that it is already installed. `$ sudo rpm -ivh ./python3-librepo-1.8.0-1.fc27.x86_64.rpm Preparing... ################################# [100%] package python3-librepo-1.8.0-1.fc27.x86_64 is already installed` – CountNoobula Feb 23 '18 at 10:33
  • It seems as if you python isn't aware that you are using `python3-librepo`. You may either have to symlink the location of `librepo` to your version or try installing the regular `librepo` (eg. `python-librepo`). One other thing you can try is to use `--force` at the end of your rpm command to reinstall. – l'L'l Feb 23 '18 at 11:04
  • I appreciate the help thus far. I've tried to use `--force` and that didn't work. I looked at the error and it says it's using `/usr/lib/python3.6`, I have confirmed that the `librepo.so` is there at `/usr/lib64/python3.6/site-packages/librepo/_librepo.so` – CountNoobula Feb 23 '18 at 11:22
  • 1
    I'm about out of suggestions; [maybe take a look here](https://stackoverflow.com/a/48726460/499581) as the problem seems similar. – l'L'l Feb 23 '18 at 12:22
  • 1
    I have the same issue -- conda seems to mess up dnf quite significantly. – Timothée Poisot Mar 08 '18 at 17:07
  • @I'L'I, the linked solution works! – namu Mar 13 '18 at 23:24

0 Answers0