Ask Your Question
3

dnf vs rpm difference to install oracle jdk

asked 2018-11-03 17:46:35 -0500

rigbyk3 gravatar image

updated 2018-11-04 01:57:03 -0500

villykruse gravatar image

Hi, when install oracle jdk 11 in fedora 29 KDE with (superuser) rpm:

rpm -ivh jdk-11.0.1_linux-x64_bin.rpm

don't show any problem and can use the compiler and all about jdk, but if use (superuser)dnf:

dnf install jdk-11.0.1_linux-x64_bin.rpm

show the follow error:

Error: 
 Problem: conflicting requests
  - nothing provides /bin/basename needed by jdk-11.0.1-2000:11.0.1-ga.x86_64
  - nothing provides /bin/cp needed by jdk-11.0.1-2000:11.0.1-ga.x86_64
  - nothing provides /bin/ls needed by jdk-11.0.1-2000:11.0.1-ga.x86_64
  - nothing provides /bin/mkdir needed by jdk-11.0.1-2000:11.0.1-ga.x86_64
  - nothing provides /bin/mv needed by jdk-11.0.1-2000:11.0.1-ga.x86_64
  - nothing provides /bin/pwd needed by jdk-11.0.1-2000:11.0.1-ga.x86_64
  - nothing provides /bin/sort needed by jdk-11.0.1-2000:11.0.1-ga.x86_64

Please someone can tell me what's diference?

edit retag flag offensive close merge delete

Comments

May suggest installing java-11-openjdk instead? It is available in the fedora repositories for fc29.

And it does not require an Oracle licence fee.

villykruse gravatar imagevillykruse ( 2018-11-04 08:40:22 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
3

answered 2018-11-04 07:22:23 -0500

FranciscoD_ gravatar image

RPM is the low level package manager, and is not aware of "dependencies". You must provide the dependencies yourself to RPM. So when you use the rpm command to install it, all it does is check if the transaction can completed, and if it can, it runs it. RPM does not know about repositories.

DNF/PackageKit/Yum on the other hand are built on top of RPM. They permit us to handle "dependencies" automatically. DNF/PackageKit/Yum look at the dependencies of a package and try to fetch them from whatever repos are available to them. They then call RPM via its API to run the transaction.

So, here, when you're trying to use DNF, DNF looks at the requirements of this package and tries to fetch them. However, nothing in the Fedora repositories provides /bin/basename etc., since in Fedora /bin/ is merely a link to /usr/bin, and so, DNF is unable to complete the transaction (This is a bug in the jdk package---it should not require these files explicitly):

$ sudo dnf whatprovides /bin/basename
[sudo] password for asinha:
Error: No Matches found

$ sudo dnf whatprovides /usr/bin/basename
coreutils-8.30-5.fc29.x86_64 : A set of basic GNU tools commonly used in shell scripts
Repo        : @System
Matched from:
Filename    : /usr/bin/basename

coreutils-8.30-5.fc29.x86_64 : A set of basic GNU tools commonly used in shell scripts
Repo        : updates
Matched from:
Filename    : /usr/bin/basename

coreutils-single-8.30-5.fc29.x86_64 : coreutils multicall binary
Repo        : updates
Matched from:
Filename    : /usr/bin/basename

coreutils-8.30-4.fc29.x86_64 : A set of basic GNU tools commonly used in shell scripts
Repo        : fedora
Matched from:
Filename    : /usr/bin/basename

coreutils-single-8.30-4.fc29.x86_64 : coreutils multicall binary
Repo        : fedora
Matched from:
Filename    : /usr/bin/basename

One can get information on what an rpm requires/provides using the rpm command. Please read man rpm and man dnf for more information.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-11-03 17:46:35 -0500

Seen: 2,073 times

Last updated: Nov 04 '18