Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm trying to install a JRE on Ubuntu 10.04, but I failed:

oneat@oneat-desktop:~/Downloads$ sudo rpm -i --force-debian jre-6u21-linux-i586.rpm
error: Failed dependencies:
    /bin/basename is needed by jre-1.6.0_21-fcs.i586
    /bin/cat is needed by jre-1.6.0_21-fcs.i586
    /bin/cp is needed by jre-1.6.0_21-fcs.i586
    /bin/gawk is needed by jre-1.6.0_21-fcs.i586
    /bin/grep is needed by jre-1.6.0_21-fcs.i586
    /bin/ln is needed by jre-1.6.0_21-fcs.i586
    /bin/ls is needed by jre-1.6.0_21-fcs.i586
    /bin/mkdir is needed by jre-1.6.0_21-fcs.i586
    /bin/mv is needed by jre-1.6.0_21-fcs.i586
    /bin/pwd is needed by jre-1.6.0_21-fcs.i586
    /bin/rm is needed by jre-1.6.0_21-fcs.i586
    /bin/sed is needed by jre-1.6.0_21-fcs.i586
    /bin/sort is needed by jre-1.6.0_21-fcs.i586
    /bin/touch is needed by jre-1.6.0_21-fcs.i586
    /usr/bin/cut is needed by jre-1.6.0_21-fcs.i586
    /usr/bin/dirname is needed by jre-1.6.0_21-fcs.i586
    /usr/bin/expr is needed by jre-1.6.0_21-fcs.i586
    /usr/bin/find is needed by jre-1.6.0_21-fcs.i586
    /usr/bin/tail is needed by jre-1.6.0_21-fcs.i586
    /usr/bin/tr is needed by jre-1.6.0_21-fcs.i586
    /usr/bin/wc is needed by jre-1.6.0_21-fcs.i586
    /bin/sh is needed by jre-1.6.0_21-fcs.i586

How can I work around that?


Edit: I tried Riccardo's answer, but it still doesn't work:

root@oneat-desktop:/home/oneat/Downloads/untitled folder# rpm --nodeps --force-debian -i jre.rpm
Unpacking JAR files...
    rt.jar...
    jsse.jar...
    charsets.jar...
    localedata.jar...
    plugin.jar...
    javaws.jar...
    deploy.jar...
[: 924: /usr/java/jre1.6.0_21: unexpected operator
[: 924: /usr/java/jre1.6.0_21: unexpected operator

Those are only some of the errors:

dpkg-shlibdeps: warning: Can't extract name and version from library name `libjava.so'
dpkg-shlibdeps: warning: couldn't find library libjvm.so needed by debian/jre/usr/java/jre1.6.0_21/lib/i386/libj2gss.so (ELF format: 'elf32-i386'; RPATH: '/usr/java/jre1.6.0_21/lib/i386').
Note: libraries are not searched in other binary packages that do not have any shlibs or symbols file.
To help dpkg-shlibdeps find private libraries, you might need to set LD_LIBRARY_PATH.
dpkg-shlibdeps: warning: Can't extract name and version from library name `libjava.so'
dpkg-shlibdeps: warning: Can't extract name and version from library name `libjava.so'
dpkg-shlibdeps: warning: couldn't find library libjvm.so needed by debian/jre/usr/java/jre1.6.0_21/lib/i386/libjava.so (ELF format: 'elf32-i386'; RPATH: '/usr/java/jre1.6.0_21/lib/i386').
Note: libraries are not searched in other binary packages that do not have any shlibs or symbols file.
To help dpkg-shlibdeps find private libraries, you might need to set LD_LIBRARY_PATH.
dpkg-shlibdeps: warning: Can't extract name and version from library name `libverify.so'
dpkg-shlibdeps: warning: Can't extract name and version from library name `libverify.so'
dpkg-shlibdeps: warning: couldn't find library libjvm.so needed by debian/jre/usr/java/jre1.6.0_21/lib/i386/libjsoundalsa.so (ELF format: 'elf32-i386'; RPATH: '/usr/java/jre1.6.0_21/lib/i386').
Note: libraries are not searched in other binary packages that do not have any shlibs or symbols file.
To help dpkg-shlibdeps find private libraries, you might need to set LD_LIBRARY_PATH.
dpkg-shlibdeps: warning: Can't extract name and version from library name `libjava.so'
dpkg-shlibdeps: warning: Can't extract name and version from library name `libjava.so'
dpkg-shlibdeps: warning: Can't extract name and version from library name `libjli.so'
dpkg-shlibdeps: warning: Can't extract name and version from library name `libjli.so'
dpkg-shlibdeps: warning: couldn't find library libmawt.so needed by debian/jre/usr/java/jre1.6.0_21/lib/i386/libjawt.so (ELF format: 'elf32-i386'; RPATH: '/usr/java/jre1.6.0_21/lib/i386').
Note: libraries are not searched in other binary packages that do not have any shlibs or symbols file.
To help dpkg-shlibdeps find private libraries, you might need to set LD_LIBRARY_PATH.
dpkg-shlibdeps: warning: couldn't find library libjvm.so needed by debian/jre/usr/java/jre1.6.0_21/lib/i386/libjawt.so (ELF format: 'elf32-i386'; RPATH: '/usr/java/jre1.6.0_21/lib/i386').
share|improve this question
    
On which system is this? –  fschmitt Sep 30 '10 at 19:32
    
UBUNTU 10.04 LTS –  oneat Sep 30 '10 at 20:02
    
I merged your answer into your question; in the future you can just edit your question if you need to provide more information –  Michael Mrozek Oct 1 '10 at 16:37

1 Answer 1

Since you're running Ubuntu, can't you just install a JRE that comes from Ubuntu repositories? E.g., sudo apt-get install sun-java6-jre (which is presently at version 6.20dlj-1ubuntu3).

If you still need to go down the RPM route, you have two options:

  1. tell rpm to ignore those dependencies (rpm --nodeps -i ...), since all those listed are programs that are already installed on a standard Ubuntu system. (The only mismatch is gawk, which is /usr/bin/gawk on Ubuntu, but /bin/gawk in the dependency output; you can either make symlink -to be on the safe side- or just ignore it and hope the JRE scripts do not hard-code the path to gawk.)

  2. Use alien (sudo apt-get install alien) to convert the .rpm file into a .deb one; this should also fix dependencies or let you correct them.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.