1

I have an RPM package for a driver for my usb device, and a deb package for it doesn't exist. Alien fails, giving me a bunch of errors.

Lots of:

error: db5 error(-30969) from dbenv->open: BDB0091 DB_VERSION_MISMATCH: Database environment version mismatch

I've heard that I can convert an rpm to a tar archive and then manually copy some files to some directories. Is that true?

Randall
  • 316
  • 4
  • 14
user1685095
  • 372
  • 2
  • 3
  • 17
  • @markkirby Its not a duplicate, because as I've said I can't use alien, nor do I have sources. And there isn't an answer for that in question you gave link for. – user1685095 Aug 04 '15 at 08:44
  • for extracting see [How do I extract a RPM file?](http://askubuntu.com/questions/52230/how-do-i-extract-a-rpm-file) – albal Aug 04 '15 at 08:44
  • 1
    `alien` is possibly the best way apart from compiling from source..perhaps you should try to find the package in Ubuntu, if not available try source code, alien could be the last option..and whoever told you that you can just put some files somewhere will work has lied because the architectures and functionalities are quite different.. – heemayl Aug 04 '15 at 08:45
  • Posting the errors, or what the 'some usb device' is could help – albal Aug 04 '15 at 08:46
  • 1
    "Alien gave me bunch of errors " why not add them to your question then to make it clear, I will retract my dupe vote, if alian does not work, but I highly recommend you to try fixing those errors. – Mark Kirby Aug 04 '15 at 08:47
  • I've added errors. – user1685095 Aug 04 '15 at 08:49
  • 1
    Sorry but to me you are asking all the wrong questions. Why do you not ask how to get a specific hardware (details to be included about the hardware) working with Ubuntu and link to the RPM you found that might work?! Your answer then will be about how to install it using Alien (and if it shows up how to fix any errors if possible) or that you should install a certain .DEB file and forget about RPM. – Rinzwind Aug 04 '15 at 08:59
  • "a driver for some usb device " What USB device? – xangua Aug 04 '15 at 10:57
  • It's a device that reboots machine if it hangs. – user1685095 Aug 04 '15 at 11:01
  • @Rinzwind Yeah, OK. Now you can see errors that alien produces. And you know that I want to install a driver. Then what? Could you help? – user1685095 Aug 04 '15 at 11:03

2 Answers2

3

You can always convert RPM files into DEBs with alien command:

$ sudo apt-get install alien
$ sudo alien my_package.rpm
$ sudo dpkg -i my_package.deb

but chances are you'll fail installing the DEB package, mostly because of the name difference of libraries in RHEL and Debian family.

to extract files from a RPM package, rpm2cpio is the tool to use.

$ sudo apt-get install rpm2cpio
$ rpm2cpio /path/to/file.rpm | cpio -i --make-directories

alternatively, some users confirmed file-roller can open rpm files

AliReza Mosajjal
  • 863
  • 8
  • 16
0

You can use alien to just extract the files, without building the rpm; I would expect that to work without throwing errors:

alien --scripts --generate <package.rpm>

You'll get 2 dirs:

  1. a <package> dir, which it would it would use to build the .deb
  2. a <package>.orig dir that is the direct extraction from the .rpm
Randall
  • 316
  • 4
  • 14
  • Well, okay, and then what? – user1685095 Feb 01 '17 at 22:13
  • then fix the problem (whatever it is) If it's installing to /usr/local, it'll fail with " is not a directory". The workaround is to add the target `override_dh_usrlocal:` to the end of debian/rules . Then cd to the dir, and run 'debian/rules binary' to build a fixed package.deb – user_1818839 Mar 05 '22 at 15:11