首页 > 系统相关 >[Bug0055] centos7.x 报错/usr/libexec/grepconf.sh: line 5: grep: command not found

[Bug0055] centos7.x 报错/usr/libexec/grepconf.sh: line 5: grep: command not found

时间:2022-11-19 16:35:37浏览次数:69  
标签:bin libexec grep centos7 export usr HOME 报错

问题

centos7.x 报错:

/usr/libexec/grepconf.sh: line 5: grep: command not found

场景

centos7.x修改java环境变量,保存后输入命令都不存在报错

原因

centos7.x修改java环境变量时环境变量配错

解决方案

输入

export PATH=/usr/bin:/usr/sbin:/bin:/sbin:/usr/X11R6/bin
source

发现命令可用

sudo vim /etc/profile

编辑正确环境变量:

export JAVA_HOME=/home/xxx/jdk路径
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=$JRE_HOME/lib/ext:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin

配置完下面的内容再执行

source /etc/profile

生效新配置的文件。

https://blog.csdn.net/weixin_43916074/article/details/125657497

标签:bin,libexec,grep,centos7,export,usr,HOME,报错
From: https://www.cnblogs.com/Code-Rain/p/16876450.html

相关文章