Installing JDK.rpm file using alien

6,681

First read the whole answer. The first part shows you your errors and the second part shows you that alien is not necessary.

First Part

Use -d to create a DEB file

alien -d packagename.rpm

or

alien packagename.rpm

from man alien

-d, --to-deb
    Make debian packages. This is the default.

-g, --generate
    Generate a temporary directory suitable for building a package from,
    but do not actually create the package. This is useful if you want to
    move files around in the package before building it. The package can be
    built from this temporary directory by running "debian/rules binary",
    if you were creating a Debian package, or by running "rpmbuild -bb
    <packagename>.spec" if you were creating a Red Hat package.

Second Part

To install Oracle Java you don't need alien and a RPM file. Simply use the following commands.

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
Share:
6,681

Related videos on Youtube

Charlotte45
Author by

Charlotte45

Updated on September 18, 2022

Comments

  • Charlotte45
    Charlotte45 over 1 year

    I'm trying to install JDK on my Ubuntu virtual machine to use it for Netbeans but for some reason it won't work. I downloaded JDK from oracle's site, the .rpm file. I read online that I should use

    sudo alien -g packagename.rpm 
    

    to change the file from .rpm to .deb but it just like extracted my archive and nothing else. There's no .deb file anywhere, no executable either. I'm completely lost. Now if I do sudo aline -g package.rpm again, it says that there's already a folder with the name created but I'm stuck. What else should I do to install the JDK?

    enter image description here

    • steeldriver
      steeldriver over 8 years
      I think the recommended way to install Oracle Java on Ubuntu is via the webupd8 PPA
    • goo
      goo over 8 years
      Read man alien? Do ls -rlt?
    • Charlotte45
      Charlotte45 over 8 years
      I posted a photo os the ls -rlt result.
  • Yngve Sneen Lindal
    Yngve Sneen Lindal over 5 years
    Well, yes, alien is not necessary given that you're connected to the internet.
  • Devil's Dream
    Devil's Dream over 4 years
    Probably the second part is not working anymore