alien is a command-line tool for converting Linux software packages between Debian .deb, Red Hat .rpm, Software .tgz and even Solaris .pkg file formats. The resulting converted packages it produces may or may not install and they may or may not work depending on the original package which has been converted. Converted packages who do install will, in most cases, only do so after going through some hoops.
Features And Usability
alien to convert a package from one format to another is as simple as:
alien --to-rpm naver-whale-stable_amd64.deb
-r can be used as an alias for
Alien can be used as a regular user but it will warn that "Ownerships of files in the generated packages will probably be wrong.". This is correct, it has to be executed as root to get the right permissions in the resulting package.
Alien will not convert scripts that are included in a .deb or .rpm package unless the
--scripts switch is provided.
naver-whale-stable_amd64.deb package for the NAVER whale web browser as shown in the example above on Fedora 31 results in a .rpm package which, when one attempts to install it on Fedora with
rpm -vih naver-whale-stable-18.104.22.168-2.x86_64.rpm
produces the following fine error message:
error: Failed dependencies: libnelo2-multi.so()(64bit) is needed by naver-whale-stable-22.214.171.124-2.x86_64
There is, of course, no Fedora package which provides
libnelo2-multi.so and there does not need to be.
A close-up inspection of the .rpm package with
less naver-whale-stable-126.96.36.199-2.x86_64.rpm reveals that resulting .rpm package actually includes
/opt/naver/whale/libnelo2-multi.so yet it lists it as a requirement (Nelo2 is a part of the Naver Business Platform SDK, there are no separate packages with it available). That hurdle can be solved by using the rpm
Trying to install the package with
--nodeps to ignore the not-actually required dependency presents yet another odd error:
file /usr/bin from install of naver-whale-stable-188.8.131.52-2.x86_64 conflicts with file from package filesystem-3.12-2.fc31.x86_64
That error means is that the rpm package is asking to create the folder
/usr/bin, which will exists on every single Linux distribution out there, and rpm does not want it to do that since another package has already created that folder. Errors like that can be ignored by adding
--replacefiles to the rpm command. You should absolutely not blindly do that. However, this command does make the package install in this particular example:
rpm -ivh --nodeps --replacefiles naver-whale-stable-184.108.40.206-2.x86_64.rpm
|Warning: You should absolutely not use |
The resulting package does, in this particular case, install just fine and it does actually work as expected. However, that may not be the case with other packages you may want to convert.
Verdict And Conclusion
alien can be a useful tool and it can produce working packages which, using some not at all safe installation parameters, can be installed and used. It is not a tool for everyone. Using it and the resulting converted packages it not at all strait forward. If can be useful if you are a wizard with some Linux experience and understanding. Just be aware that installing some random .rpm or .deb file you found on a obscure website with parameters like
--replacefiles is not a good idea and you should not do that unless you have checked what, if any, files would be replaced. A package trying to create
/usr/bin exists is a non-issue, a package replacing
/usr/bin/bash with something malicious could lead to disaster.
Don't use alien unless you know what you are doing.
- The alien package is available at sourceforge.net/projects/alien-pkg-convert/. Most distributions have it in their repositories, installing it from your distributions repositories (it is just named
alienon Debian, Ubuntu, Fedora and most others) is a better idea.
- The source for the perl module it uses is maintained at github.com/Perl5-Alien/Alien-Build.