RedHat Linux下安装JDK1.7报错Permission denied

来源:互联网 发布:daxulu域名更换 编辑:程序博客网 时间:2024/05/01 21:56
在RedHat Linux5 中安装JDK1.7时,当我解压jdk,并且配置好了环境变量,测试的时候,报以下错误。
[root@jingfeng01 ~]# java -versionError: dl failure on line 863Error: failed /usr/java/jdk1.7.0_60/jre/lib/i386/client/libjvm.so, because /usr/java/jdk1.7.0_60/jre/lib/i386/client/libjvm.so: cannot restore segment prot after reloc: Permission denied


在网上找了找错误,最后发现原来是SELinux的缘故,关闭SELinux即可解决

 解决方案:

[root@jingfeng01 ~]# vi /etc/sysconfig/selinux# This file controls the state of SELinux on the system.# SELINUX= can take one of these three values:#       enforcing - SELinux security policy is enforced.#       permissive - SELinux prints warnings instead of enforcing.#       disabled - SELinux is fully disabled.SELINUX=disabled# SELINUXTYPE= type of policy in use. Possible values are:#       targeted - Only targeted network daemons are protected.#       strict - Full SELinux protection.SELINUXTYPE=targeted


 

 将SELINUX=enforcing  改为SELINUX=disabled   关闭,然后重启机器,让其生效

0 0
原创粉丝点击