Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After converting from CentOS 8.4 to RHEL 8.4, the java command soft link is missing #503

Open
wuchuxiong opened this issue May 23, 2022 · 2 comments

Comments

@wuchuxiong
Copy link

wuchuxiong commented May 23, 2022

Yesterday I converted the CentOS 8.4 to RHEL 8.4 successfully with convert2rhel command. But the java command soft link is missing after the convertion. My command is "convert2rhel --disable-submgr --enablerepo rhes84-baseos --enablerepo rhes84-appstream -y --no-rpm-va --debug". The convert log message doesn't complain about the openjdk. Actually the openjdk package is still there.

# rpm -qa|grep jdk
copy-jdk-configs-3.7-4.el8.noarch
java-1.8.0-openjdk-1.8.0.282.b08-4.el8.x86_64
java-1.8.0-openjdk-headless-1.8.0.282.b08-4.el8.x86_64

The java command exists as well.

# ls -l /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.282.b08-4.el8.x86_64/jre/bin/java
-rwxr-xr-x. 1 root root 11520 Feb 24  2021 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.282.b08-4.el8.x86_64/jre/bin/java

But the java soft link is missing.

# which java
/usr/bin/which: no java in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/cdfwendy/bin:/cdfwendy/bin:/root/bin)

# alternatives --list
libnssckbi.so.x86_64    auto    /usr/lib64/pkcs11/p11-kit-trust.so
python                  auto    /usr/libexec/no-python
ifup                    auto    /usr/libexec/nm-ifup
ld                      auto    /usr/bin/ld.bfd
mkisofs                 auto    /usr/bin/genisoimage
print                   auto    /usr/bin/lpr.cups
xinputrc                auto    /etc/X11/xinit/xinput.d/ibus.conf
nmap                    auto    /usr/bin/ncat
python3                 auto    /usr/bin/python3.6
cifs-idmap-plugin       auto    /usr/lib64/cifs-utils/cifs_idmap_sss.so
libwbclient.so.0.15-64  auto    /usr/lib64/samba/wbclient/libwbclient.so.0.15

Before the convert, the java is showed in alternatives list as below.

# alternatives --list
libnssckbi.so.x86_64    auto    /usr/lib64/pkcs11/p11-kit-trust.so
python                  auto    /usr/libexec/no-python
ifup                    auto    /usr/libexec/nm-ifup
ld                      auto    /usr/bin/ld.bfd
mkisofs                 auto    /usr/bin/genisoimage
print                   auto    /usr/bin/lpr.cups
xinputrc                auto    /etc/X11/xinit/xinput.d/ibus.conf
nmap                    auto    /usr/bin/ncat
python3                 auto    /usr/bin/python3.6
cifs-idmap-plugin       auto    /usr/lib64/cifs-utils/cifs_idmap_sss.so
libwbclient.so.0.15-64  auto    /usr/lib64/samba/wbclient/libwbclient.so.0.15
java                    auto    /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.282.b08-4.el8.x86_64/jre/bin/java
jre_openjdk             auto    /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.282.b08-4.el8.x86_64/jre
jre_1.8.0               auto    /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.282.b08-4.el8.x86_64/jre
jre_1.8.0_openjdk       auto    /usr/lib/jvm/jre-1.8.0-openjdk-1.8.0.282.b08-4.el8.x86_64

Any suggestions are appreciated.

@bocekm
Copy link
Member

bocekm commented May 23, 2022

Hi @wuchuxiong, thanks for the report. I believe it's this bug: https://bugzilla.redhat.com/show_bug.cgi?id=2032526. We may need to revisit the decision to close the bug.

As a workaround, running the following command suggested in https://bugzilla.redhat.com/show_bug.cgi?id=1976053#c1 should help:

# rpm -qa --scripts java-{1.8.0,11}-openjdk-{headless,devel} | sed -n '/postinstall/, /exit/{ /postinstall/! { /exit/ ! p} }' | sh

@wuchuxiong
Copy link
Author

Thank you bocekm for the workaround. It looks good. I didn't apply it because I had applied a heavy workaround: uninstall the openjdk package and install it again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants