Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> Linux Crash, No command is working on the prompt...
nvlramakanth
post Sep 7 2003, 04:48 AM
Post #1


Whats this Lie-nix Thing?
*

Group: Members
Posts: 5
Joined: 7-September 03
Member No.: 1,399



hi,

Here's the error am getting which is bogging me and am not able to
run any command on linux

I just updated the profile file with the java1.3 I installed and everything is gone.My X server is giving this error and also the command prompt. It does not recognise any of the basic commands even
ie ls or man or anything, for everything its giving the following error

-bash:/usr/java/j2sdk1.3.1_02/bin:/usr/java/j2sdkee1.3.1/bin :no such file or directory
-bash:dircolors:command not found
-bash:unicode_start:command not found
-bash:cut not found
-bash:id:command not found
-bash:[:too many arguments
-bash:tbut:command not found
-bash:wc:command not found
-bash:[::integer expr expected
[root@localhost root]#

anyone can please get me out of this problem.

thank you and regards.
Go to the top of the page
 
+Quote Post
Joey
post Sep 7 2003, 08:25 AM
Post #2


LinuxHelp Admin
*******

Group: Admin
Posts: 1,096
Joined: 18-September 02
Member No.: 1



What distribution are you running? Can you paste your profile file.
Go to the top of the page
 
+Quote Post
hughesjr
post Sep 7 2003, 08:25 AM
Post #3


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151



it could be a problem with your PATH .... if you have no PATH, only a few built in commands from bash work.

Try this (all one line):

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin; export PATH

and see if you can execute things again...

If this fixes the problem, then you must figure out what caused the issue...

Does it happen with all users or just the currently logged in user?


--------------------
Johnny Hughes
hughesjr@linuxhelp.net
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
 
+Quote Post
nvlramakanth
post Sep 9 2003, 01:57 AM
Post #4


Whats this Lie-nix Thing?
*

Group: Members
Posts: 5
Joined: 7-September 03
Member No.: 1,399



Hi,
Hughes' solution was great. The system is working but still I am not out of the problem. When I say "javac" at the prompt the usual output doesn't come but it shows "gcj:no input files." And when I input some file to "gcj" or "javac" they do not recognise the "Swing" package. I find that the "libgcj" that came with my RedHat9 distribution(kernel 2.4.20-8) doesn't contain the swing package.
I type javac and the command is processed by gcj!! which I don't want to happen.
Also if I set "PATH=/usr/java/jdk1.3.1_02/bin:/usr/java/j2sdkee1.3.1/bin;" it works, but only in that particular command window.

The mistake::
export JAVA_HOME=/usr/java/jdk1.3.1_02:$JAVA_HOME
export J2EE_HOME=/usr/java/j2sdkee1.3.1:$J2EE_HOME
export PATH=/usr/java/jdk1.3.1_02/bin:/usr/java/j2sdkee1.3.1/bin:$PATH
export CLASSPATH=/usr/java/j2sdkee1.3.1/lib/j2ee.jar:$CLASSPATH
export USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC

After correction::
$JAVAHOME=/usr/java/jdk1.3.1_02;
$J2EEHOME=/usr/java/j2sdkee1.3.1;
$PATH=/usr/java/jdk1.3.1_02/bin:/usr/java/j2sdkee1.3.1/bin;
$CLASSPATH=/usr/java/jdk1.3.1_02/src.jar:/usr/java/j2sdkee1.3.1/lib/j2ee.jar;
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC JAVAHOME J2EEHOME CLASSPATH

but no use.

How else do I set the path for java??

********************************************************************************
******
Here's a sequence of steps where the error may be clear to your eyes...

[kanth@localhost kanth]$ su -
Password:
-bash: =/usr/java/jdk1.3.1_02: No such file or directory
-bash: =/usr/java/j2sdkee1.3.1: No such file or directory
-bash: /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin/X11:/usr/X11R6/bin=/usr/java/jdk1.3.1_02/bin:/usr/java/j2sdkee1.3.1/bin: No such file or directory
-bash: =/usr/java/jdk1.3.1_02/src.jar:/usr/java/j2sdkee1.3.1/lib/j2ee.jar: No such file or directory
[root@localhost root]# javac
gcj: no input files
[root@localhost root]# j2ee
-bash: j2ee: command not found
[root@localhost root]# PATH=/usr/java/jdk1.3.1_02/bin:/usr/java/j2sdkee1.3.1/bin; export PATH
[root@localhost root]# javac
Usage: javac <options> <source files>
where possible options include:
-g Generate all debugging info
-g:none Generate no debugging info
-g:{lines,vars,source} Generate only some debugging info
-O Optimize; may hinder debugging or enlarge class file -nowarn Generate no warnings
-verbose Output messages about what the compiler is doing
-deprecation Output source locations where deprecated APIs are used
-classpath <path> Specify where to find user class files
-sourcepath <path> Specify where to find input source files
-bootclasspath <path> Override location of bootstrap class files
-extdirs <dirs> Override location of installed extensions
-d <directory> Specify where to place generated class files
-encoding <encoding> Specify character encoding used by source files
-target <release> Generate class files for specific VM version

[root@localhost root]# j2ee
/usr/java/j2sdkee1.3.1/bin/j2ee: line 1: dirname: command not found
/usr/java/j2sdkee1.3.1/bin/j2ee: line 9: /setenv.sh: No such file or directory
[root@localhost root]#
********************************************************************************
***************

Thank you and regards.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 16th December 2017 - 04:09 AM