Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • I am using 32bit Centos 6.10, the rpm 4.8.0.59 in installed at usr/lib/rpm. I know rpm-python is not a regular python package. That's why I am looking for any options to make it work on Python3, so that I can import rpm and manipulate RPM packages and databases. Commented May 15, 2021 at 8:14
  • Sorry for the late reply. I thought that package (rpm-python) was only for 64bit? I could be mistaken, though. Anyway, you could try to relocate the package with the command # rpm -qpi packagename-1.2.3.4 | head -1, then rpm -ivh --prefix=/path/to/new/destination packagename-1.2.3.4 and verify with # rpm -ql packagename-1.2.3.4. Commented May 16, 2021 at 17:36
  • $ rpm -qpi rpm-python-4.8.0-59.el6.i686.rpm | head -1 Name : rpm-python Relocations: (not relocatable) $ rpm -ivh --prefix=/usr/local/lib/python3.8/site-packages rpm-python-4.8.0-59.el6.i686.rpm error: package rpm-python is not relocatable Commented May 17, 2021 at 2:59
  • It appears that the package, unfortunately, cannot be installed to another location, then. In theory, appending --installroot could solve your issue, but the problem is that the packages usually install to several locations in your fs and that could easily become a true headache to get it to work as it's supposed to :/ Sorry I couldn't be of more help. Commented May 17, 2021 at 18:29