1

I have python2.6.6(default) and python3.8 installed on Centos 6.10.

Current rpm-python version is 4.8.0.59.

Default content of rpm-python:

/usr/lib/python2.6/site-packages/rpm
/usr/lib/python2.6/site-packages/rpm/__init__.py
/usr/lib/python2.6/site-packages/rpm/__init__.pyc
/usr/lib/python2.6/site-packages/rpm/__init__.pyo
/usr/lib/python2.6/site-packages/rpm/_rpmbmodule.so
/usr/lib/python2.6/site-packages/rpm/_rpmmodule.so
/usr/lib/python2.6/site-packages/rpm/transaction.py
/usr/lib/python2.6/site-packages/rpm/transaction.pyc
/usr/lib/python2.6/site-packages/rpm/transaction.pyo

Is it possible to install rpm-python to Python3.8 path usr/local/lib/python3.8/site-packages?

1

1 Answer 1

0

Unfortunately, I do not have enough points to comment on your question to ask for more info, so I have to use the answer.

  1. Have you tried checking if rpm-python is in /usr/local/lib64?
  2. I do not know if you think that rpm-python is the same as python. In case you did not know, it is not version 4.8.0.59 of the "regular" python package.
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.
    – hexacool
    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.
    – telometto
    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
    – hexacool
    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.
    – telometto
    May 17, 2021 at 18:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .