LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 11-03-2012, 12:38 PM   #1
vignesh4vi
LQ Newbie
 
Registered: Nov 2012
Posts: 2

Rep: Reputation: Disabled
Error in bashrc filr


Hi,

i installed java nd set env java home in /etc/bash.bashrc
os-ubuntu 12.04LTS

I getting error now. i cant able to use any commands. please help me
bash: export: `/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:{JAVA_HOME}/bin': not a valid identifier
bash: groups: No such file or directory
bash: lesspipe: No such file or directory
bash: dircolors: No such file or directory
bash: uname: No such file or directory
bash: [: =: unary operator expected
bash: sed: No such file or directory
bash: ls: No such file or directory
how to recover this. please help me
 
Old 11-03-2012, 01:21 PM   #2
kakaka
Member
 
Registered: Sep 2003
Posts: 382

Rep: Reputation: 86
Since you haven't shown us your code, we can only guess.

My guess would be that you didn't include the dollar sign when you should have, when you added JAVA_HOME to your path, and you included a dollar sign when you exported the PATH variable, when you should not have.

In other words, I'm guessing you have something like these lines in your /etc/bash.bashrc

Code:
PATH=$PATH:{JAVA_HOME}

export $PATH
when what you actually should have had were these lines:


Code:
PATH=$PATH:${JAVA_HOME}

export PATH
 
Old 11-04-2012, 02:19 AM   #3
vignesh4vi
LQ Newbie
 
Registered: Nov 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thanks for reply.

I cant able to edit the file /etc/bash.bashrc
its showing error
Quote:
nov@Lot:~$ vi /etc/bash.bashrc
bash: vi: No such file or directory
How can i edit the file.

When i open the konsole.
its showing error

Quote:
bash: export: `/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:{JAVA_HOME}/bin': not a valid identifier
bash: groups: No such file or directory
bash: lesspipe: No such file or directory
bash: dircolors: No such file or directory
bash: uname: No such file or directory
bash: [: =: unary operator expected
bash: sed: No such file or directory
bash: ls: No such file or directory
so how can i use command to edit.
please reply.

Last edited by vignesh4vi; 11-04-2012 at 02:35 AM.
 
Old 11-04-2012, 02:39 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,266

Rep: Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661Reputation: 2661
# 3

sudo gedit /etc/bash.bashrc


Also : The java PATH settings are handled by the /etc/alternatives/ functions.
Configuring java : sudo update-alternatives --config java
Installing "java entries" to /etc/alternatives/ , example ..
http://www.linuxquestions.org/questi...-4175411922/#4

.
 
Old 11-04-2012, 07:46 AM   #5
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,563
Blog Entries: 29

Rep: Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179
Quote:
Originally Posted by vignesh4vi View Post
so how can i use command to edit.
Code:
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
vi /etc/bash.bashrc
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
bashrc error, while sourcing linux_2010 Programming 3 07-13-2010 01:36 AM
Setting path: /etc/profile, /etc/bashrc or ~/.bashrc Swakoo Linux - General 1 08-07-2007 11:59 PM
Logging in Error in Fedora 5, /etc/bashrc command not found EmmaTheViking Linux - Newbie 10 05-25-2006 12:59 AM
error on .bashrc ashley75 Linux - General 2 09-19-2005 08:09 PM
.bashrc error upon sourcing psiakr3w Linux - General 2 08-07-2004 01:44 AM


All times are GMT -5. The time now is 09:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration