11

In my case the software I am trying to convert is the Lacie lightscribe labeler.

1.- I renamed the RPM

mv LaCie\ LightScribe\ Labeler\ 1.0\ Linux.rpm lacie-lightscribe-labeler-1.0.rpm

2.- Convert the package with alien

sudo alien lacie-lightscribe-labeler-1.0.rpm

Error:

lacie-lightscribe-labeler-1.0.rpm is for architecture i386 ; the package cannot be built on this system

I know that:

  • I could do this in a x86 system and then copy it from there.
  • Use the simple labeler

I'm curious about how to do this conversion in general.

1
  • 3
    Maybe this can help you. Not sure since I am not familiar with alien.
    – edwin
    Jul 21, 2013 at 16:00

3 Answers 3

15

The process is quite easy, in short you need to modify the control file and that's it.

sudo alien -g package-name.rpm
cd package-dir/
sudo vi debian/control

Now change the architecture (i386 in my case) to be the one you need. For example, I added the amd64 architecture and this is how the line ended up:

Architecture: i386, amd64

Last step:

sudo debian/rules binary

This will produce the .deb file.


References:

1
  • +1 Can one do that on a 32 bit machine too? Or you need only to be on 64 bit to achieve that.
    – fkl
    Apr 25, 2014 at 17:37
10

I made it work with just this command:

fakeroot alien --target=amd64 package.i586.rpm
2
  • fakeroot in action, it was meant for this kind of thing Jul 1, 2016 at 16:16
  • What version of alien is that? I have 8.86 on Ubuntu 12.04.5, and target is an unknown option. (Time to upgrade Ubuntu!) Jul 28, 2016 at 19:58
1

This should be an easy work-around as well, as found on https://www.maketecheasier.com/convert-32bit-rpm-to-deb-64bit/ - use TGZ as an intermediate stage:

sudo alien --scripts --to-tgz <package.rpm>

sudo alien --scripts --to-deb <package.tgz>

The --to-deb is a default, used here only to be explicit about the conversions.

Then, install with dpkg as usual (when using a raw .deb from Alien).

You must log in to answer this question.

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