How do I verify the Java and C runtime installation requirements for any application ?

本文档提供了在安装JBoss Enterprise Application Platform (EAP) 5.0之前,如何验证系统是否已正确安装Java及C运行时环境的方法。通过在命令行中输入特定命令,用户可以检查Java是否在系统路径中,以及对于Linux环境,如何确认glibc的存在。

https://access.redhat.com/solutions/31896

 SOLUTION 已验证 - 已更新 2018年四月26日19:00 - 

English 

环境

  • JBoss Enterprise Application Platform (EAP) 5.0
  • Red Hat Enterprise Linux

问题

  • Documentation on the Installation Guide states "you must have a working installation of Java and a C runtime."
  • How do I verify that I have a working installation of Java and a C runtime prior to installation?

决议

Java

Open up a command shell and type the following to see if java is in the PATH:

Raw

java -version

C runtime

For JBoss EAP on Linux, verfiy that glibc is installed.
For other applications, Run ldd on the application

诊断步骤

  • Use ldd on Linux to determine shared object library dependencies. For example, the following shows glibc dependencies:

    Raw

    
    2] Run ldd on the application, say utility is 'ls' command 
    
    ldd `which ps`
        linux-vdso.so.1 =>  (0x00007ffe97d35000)
        libprocps.so.4 => /lib64/libprocps.so.4 (0x00007ffabd8b0000)
        libsystemd-login.so.0 => /lib64/libsystemd-login.so.0 (0x00007ffabd8a3000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007ffabd69e000)
        libc.so.6 => /lib64/libc.so.6 (0x00007ffabd2db000)
        librt.so.1 => /lib64/librt.so.1 (0x00007ffabd0d3000)
        libcap.so.2 => /lib64/libcap.so.2 (0x00007ffabcecd000)
        libm.so.6 => /lib64/libm.so.6 (0x00007ffabcbcb000)
        libdw.so.1 => /lib64/libdw.so.1 (0x00007ffabc984000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007ffabc76d000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ffabc551000)
        /lib64/ld-linux-x86-64.so.2 (0x00007ffabdaf2000)
        libattr.so.1 => /lib64/libattr.so.1 (0x00007ffabc34c000)
        libelf.so.1 => /lib64/libelf.so.1 (0x00007ffabc133000)
        libz.so.1 => /lib64/libz.so.1 (0x00007ffabbf1d000)
        liblzma.so.5 => /lib64/liblzma.so.5 (0x00007ffabbcf7000)
        libbz2.so.1 => /lib64/libbz2.so.1 (0x00007ffabbae6000)
    
    3] Now you can run rpm -qf for each listed library and compile the list of required packages.
    
    #rpm -qf /lib64/libprocps.so.4
    procps-ng-3.3.10-3.el7.x86_64
    
    #rpm -qf /lib64/libsystemd-login.so.0
    systemd-libs-219-30.el7_3.9.x86_64
    
    
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值