-----------Bad line 52 in /etc/environment ': not a valid identifier------------
本帖最后由 horizonlyhw 于 2011-09-13 16:14:47 编辑 每次登录的时候 就会报这个错误
*******************************************************************************
* *
* *
* Welcome to AIX Version 6.1! *
* *
* *
* Please see the README file in /usr/lpp/bos for information pertinent to *
* this release of the AIX Operating System. *
* *
* *
*******************************************************************************
Bad line 52 in /etc/environment
': not a valid identifier
但是查找/etc/environment的第52行 是 export PATH JAVA_HOME JDK_HOME 根本没有'这个符号。
整个environment里面也没有这个符号。
下面是/etc/environment的内容,还请大家帮忙看看 是什么问题,感谢!
sp:这个异常 还没发现会影响其他功能的使用
# @(#)18 1.26 src/bos/etc/environment/environment, cmdsh, bos61B, b2007_34A0 7/23/07 09:46:21
# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# bos61B src/bos/etc/environment/environment 1.26
#
# Licensed Materials - Property of IBM
#
# COPYRIGHT International Business Machines Corp. 1989,1994
# All Rights Reserved
#
# US Government Users Restricted Rights - Use, duplication or
# disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
#
# IBM_PROLOG_END_TAG
#
# COMPONENT_NAME: (CMDSH) Shell related commands
#
# ORIGINS: 27
#
# (C) COPYRIGHT International Business Machines Corp. 1989, 1994
# All Rights Reserved
# Licensed Materials - Property of IBM
#
# US Government Users Restricted Rights - Use, duplication or
# disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
#
################################################################
# System wide environment file. This file should only contain
# 1. comment lines which have a # in the first column,
# 2. blank lines, and
# 3. Lines in the form name=value.
#
# WARNING: This file is only for establishing environment variables.
# Execution of commands from this file or any lines other
# than specified above may cause failure of the initialization
# process.
#
# Searching the current directory last is usually a BIG time saver.
# If /usr/ucb is at the beginning of the PATH the BSD version of commands will
# be found.
#
JAVA_HOME=/usr/java6
JDK_HOME=$JAVA_HOME
PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:$JAVA_HOME/bin:$PATH
export PATH JAVA_HOME JDK_HOME
TZ=Asia/Chongqing
LANG=ZH_CN
LOCPATH=/usr/lib/nls/loc
NLSPATH=/usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/%L/%N.cat
LC__FASTMSG=true
# ODM routines use ODMDIR to determine which objects to operate on
# the default is /etc/objrepos - this is where the device objects
# reside, which are required for hardware configuration
ODMDIR=/etc/objrepos
LC_MESSAGES=C@lft
[最优解释]
Bad line 52 in /etc/environment
': not a valid identifier
尝试着用普通的文本编辑器打开,查看一下,
实在不行恢复到初始状态
[其他解释]
比较下别的机器,或者用liveCD看下
[其他解释]
sed -n '52l' /etc/environment
看看
[其他解释]
说句实话,这个问题,我在ix5.3 上夜配到过,其实没有啥要紧的,原因是你配置java 环境变量的时候,有不干净的字符。空格,或者半全角。
我当时改的是 .profile 文件,但是报 /etc/environment 的报错,希望我的经验对你有帮助。
[其他解释]
问题找到,还不结贴,O(∩_∩)O~
[其他解释]
没备份 应该没办法恢复了吧?
[其他解释]
顶一下~~
[其他解释]
恩 profile 里面有空格 今天我已经去掉了~ 那个会影响su切换时候,总是会提示一个问题
恩 我再找找~
[其他解释]
去掉那几个空格 还是不行 还是会报这个错误~
那几个文档 我都一行一行的检查过了 ~~ 没找到什么问题